[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/admin/tool/lp/tests/behat/ -> plan_crud.feature (source)

   1  @tool @javascript @tool_lp @tool_lp_plan
   2  Feature: Manage plearning plan
   3    As a learning plan admin
   4    In order to perform CRUD operations on learning plan
   5    I need to create, update and delete learning plan
   6  
   7    Background:
   8      Given I log in as "admin"
   9      And I am on site homepage
  10      When I follow "Profile" in the user menu
  11      Then I should see "Learning plans"
  12  
  13    Scenario: Create a new learning plan
  14      Given I follow "Learning plans"
  15      And I should see "List of learning plan"
  16      And I click on "Add new learning plan" "button"
  17      And I should see "Add new learning plan"
  18      And I set the field "Name" to "Science plan"
  19      And I set the field "Description" to "Here description of learning plan"
  20      When I press "Save changes"
  21      Then I should see "Learning plan created"
  22      And I should see "Science plan"
  23  
  24    Scenario: Create a learning plan based on template
  25      Given the following lp "templates" exist:
  26        | shortname | description |
  27        | Science template | science template description |
  28      And I follow "Home"
  29      And I expand "Site administration" node
  30      And I expand "Competencies" node
  31      And I follow "Learning plan templates"
  32      And I click on ".template-userplans" "css_element" in the "Science template" "table_row"
  33      And I click on ".form-autocomplete-downarrow" "css_element"
  34      And I click on "Admin" item in the autocomplete list
  35      When I click on "Create learning plans" "button"
  36      Then I should see "A learning plan was created"
  37      And I should see "Admin User" in the "Science template" "table_row"
  38  
  39    Scenario: Create a learning plan from template cohort
  40      Given the following lp "templates" exist:
  41        | shortname | description |
  42        | Science template cohort | science template description |
  43      And the following "users" exist:
  44        | username | firstname | lastname | email |
  45        | student-plan1 | Student | 1 | studentplan1@example.com |
  46        | student-plan2 | Student | 2 | studentplan2@example.com |
  47      And the following "cohorts" exist:
  48        | name            | idnumber |
  49        | cohort plan | COHORTPLAN |
  50      And the following "cohort members" exist:
  51        | user     | cohort |
  52        | student-plan1 | COHORTPLAN |
  53        | student-plan2 | COHORTPLAN |
  54      And I follow "Home"
  55      And I expand "Site administration" node
  56      And I expand "Competencies" node
  57      And I follow "Learning plan templates"
  58      And I click on ".template-cohorts" "css_element" in the "Science template cohort" "table_row"
  59      And I click on ".form-autocomplete-downarrow" "css_element"
  60      And I click on "cohort plan" item in the autocomplete list
  61      When I click on "Add cohorts" "button"
  62      Then I should see "2 learning plans were created."
  63      And I follow "Learning plan templates"
  64      And I click on ".template-userplans" "css_element" in the "Science template cohort" "table_row"
  65      And I should see "Student 1"
  66      And I should see "Student 2"
  67  
  68    Scenario: Read a learning plan
  69      Given the following lp "plans" exist:
  70        | name | user | description |
  71        | Science plan Year-1 | admin | science plan description |
  72      And I follow "Learning plans"
  73      And I should see "Science plan Year-1"
  74      When I click on "Science plan Year-1" "link"
  75      Then I should see "Science plan Year-1"
  76      And I should see "Learning plan competencies"
  77  
  78    Scenario: Manage a learning plan competencies
  79      Given the following lp "plans" exist:
  80        | name | user | description |
  81        | Science plan Year-manage | admin | science plan description |
  82      And the following lp "frameworks" exist:
  83        | shortname | idnumber |
  84        | Framework 1 | sc-y-2 |
  85      And the following lp "competencies" exist:
  86        | shortname | framework |
  87        | comp1 | sc-y-2 |
  88        | comp2 | sc-y-2 |
  89      And I follow "Learning plans"
  90      And I should see "Science plan Year-manage"
  91      And I follow "Science plan Year-manage"
  92      And I should see "Add competency"
  93      And I press "Add competency"
  94      And "Competency picker" "dialogue" should be visible
  95      And I select "comp1" of the competency tree
  96      When I click on "Add" "button" in the "Competency picker" "dialogue"
  97      Then "comp1" "table_row" should exist
  98      And I click on "Delete" of edit menu in the "comp1" row
  99      And "Confirm" "dialogue" should be visible
 100      And I click on "Confirm" "button"
 101      And "comp1" "table_row" should not exist
 102  
 103    Scenario: Edit a learning plan
 104      Given the following lp "plans" exist:
 105        | name | user | description |
 106        | Science plan Year-2 | admin | science plan description |
 107        | Science plan Year-3 | admin | science plan description |
 108      And I follow "Learning plans"
 109      And I should see "Science plan Year-2"
 110      And I should see "Science plan Year-3"
 111      And I click on "Edit" of edit menu in the "Science plan Year-3" row
 112      And the field "Name" matches value "Science plan Year-3"
 113      And I set the field "Name" to "Science plan Year-3 Edited"
 114      When I press "Save changes"
 115      Then I should see "Learning plan updated"
 116      And I should see "Science plan Year-3 Edited"
 117  
 118    Scenario: Delete a learning plan
 119      Given the following lp "plans" exist:
 120        | name | user | description |
 121        | Science plan Year-4 | admin | science plan description |
 122      And I follow "Learning plans"
 123      And I should see "Science plan Year-4"
 124      And I click on "Delete" of edit menu in the "Science plan Year-4" row
 125      And "Confirm" "dialogue" should be visible
 126      And "Delete" "button" should exist in the "Confirm" "dialogue"
 127      And "Cancel" "button" should exist in the "Confirm" "dialogue"
 128      And I click on "Cancel" "button"
 129      And I click on "Delete" of edit menu in the "Science plan Year-4" row
 130      And "Confirm" "dialogue" should be visible
 131      When I click on "Delete" "button"
 132      Then I should not see "Science plan Year-4"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1