Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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 am on homepage
29
    And I navigate to "Competencies > Learning plan templates" in site administration
30
    And I click on ".template-userplans" "css_element" in the "Science template" "table_row"
31
    And I open the autocomplete suggestions list
32
    And I click on "Admin User" item in the autocomplete list
33
    And I press the escape key
34
    When I click on "Create learning plans" "button"
35
    Then I should see "A learning plan was created"
36
    And I should see "Admin User" in the "Science template" "table_row"
37
 
38
  Scenario: Create a learning plan from template cohort
39
    Given the following lp "templates" exist:
40
      | shortname | description |
41
      | Science template cohort | science template description |
42
    And the following "users" exist:
43
      | username | firstname | lastname | email |
44
      | student-plan1 | Student | 1 | studentplan1@example.com |
45
      | student-plan2 | Student | 2 | studentplan2@example.com |
46
    And the following "cohorts" exist:
47
      | name            | idnumber |
48
      | cohort plan | COHORTPLAN |
49
    And the following "cohort members" exist:
50
      | user     | cohort |
51
      | student-plan1 | COHORTPLAN |
52
      | student-plan2 | COHORTPLAN |
53
    And I am on homepage
54
    And I navigate to "Competencies > Learning plan templates" in site administration
55
    And I click on ".template-cohorts" "css_element" in the "Science template cohort" "table_row"
56
    And I set the field "Select cohorts to sync" to "cohort plan"
57
    When I click on "Add cohorts" "button"
58
    Then I should see "2 learning plans were created."
59
    And I navigate to "Competencies > Learning plan templates" in site administration
60
    And I click on ".template-userplans" "css_element" in the "Science template cohort" "table_row"
61
    And I should see "Student 1"
62
    And I should see "Student 2"
63
 
64
  Scenario: Read a learning plan
65
    Given the following lp "plans" exist:
66
      | name | user | description |
67
      | Science plan Year-1 | admin | science plan description |
68
    And I follow "Learning plans"
69
    And I should see "Science plan Year-1"
70
    When I click on "Science plan Year-1" "link"
71
    Then I should see "Science plan Year-1"
72
    And I should see "Learning plan competencies"
73
 
74
  Scenario: Manage a learning plan competencies
75
    Given the following lp "plans" exist:
76
      | name | user | description |
77
      | Science plan Year-manage | admin | science plan description |
78
    And the following lp "frameworks" exist:
79
      | shortname | idnumber |
80
      | Framework 1 | sc-y-2 |
81
    And the following lp "competencies" exist:
82
      | shortname | framework |
83
      | comp1 | sc-y-2 |
84
      | comp2 | sc-y-2 |
85
    And I follow "Learning plans"
86
    And I should see "Science plan Year-manage"
87
    And I follow "Science plan Year-manage"
88
    And I should see "Add competency"
89
    And I press "Add competency"
90
    And "Competency picker" "dialogue" should be visible
91
    And I select "comp1" of the competency tree
92
    When I click on "Add" "button" in the "Competency picker" "dialogue"
93
    Then "comp1" "table_row" should exist
94
    And I click on "Delete" of edit menu in the "comp1" row
95
    And "Confirm" "dialogue" should be visible
96
    And I click on "Confirm" "button"
97
    And I wait until the page is ready
98
    And "comp1" "table_row" should not exist
99
 
100
  Scenario: Edit a learning plan
101
    Given the following lp "plans" exist:
102
      | name | user | description |
103
      | Science plan Year-2 | admin | science plan description |
104
      | Science plan Year-3 | admin | science plan description |
105
    And I follow "Learning plans"
106
    And I should see "Science plan Year-2"
107
    And I should see "Science plan Year-3"
108
    And I click on "Edit" of edit menu in the "Science plan Year-3" row
109
    And the field "Name" matches value "Science plan Year-3"
110
    And I set the field "Name" to "Science plan Year-3 Edited"
111
    When I press "Save changes"
112
    Then I should see "Learning plan updated"
113
    And I should see "Science plan Year-3 Edited"
114
 
115
  Scenario: Delete a learning plan
116
    Given the following lp "plans" exist:
117
      | name | user | description |
118
      | Science plan Year-4 | admin | science plan description |
119
    And I follow "Learning plans"
120
    And I should see "Science plan Year-4"
121
    And I click on "Delete" of edit menu in the "Science plan Year-4" row
122
    And "Confirm" "dialogue" should be visible
123
    And "Delete" "button" should exist in the "Confirm" "dialogue"
124
    And "Cancel" "button" should exist in the "Confirm" "dialogue"
125
    And I click on "Cancel" "button" in the "Confirm" "dialogue"
126
    And I click on "Delete" of edit menu in the "Science plan Year-4" row
127
    And "Confirm" "dialogue" should be visible
128
    When I click on "Delete" "button" in the "Confirm" "dialogue"
129
    And I wait until the page is ready
130
    Then I should not see "Science plan Year-4"
131
 
132
  Scenario: See a learning plan from a course
133
    Given the following lp "plans" exist:
134
      | name | user | description |
135
      | Science plan Year-manage | admin | science plan description |
136
    And the following lp "frameworks" exist:
137
      | shortname | idnumber |
138
      | Framework 1 | sc-y-2 |
139
    And the following lp "competencies" exist:
140
      | shortname | framework |
141
      | comp1 | sc-y-2 |
142
      | comp2 | sc-y-2 |
143
    And I follow "Learning plans"
144
    And I should see "Science plan Year-manage"
145
    And I follow "Science plan Year-manage"
146
    And I should see "Add competency"
147
    And I press "Add competency"
148
    And "Competency picker" "dialogue" should be visible
149
    And I select "comp1" of the competency tree
150
    When I click on "Add" "button" in the "Competency picker" "dialogue"
151
    Then "comp1" "table_row" should exist
152
    And I create a course with:
153
      | Course full name | New course fullname |
154
      | Course short name | New course shortname |
155
    And I navigate to "Competencies" in current page administration
156
    And I press "Add competencies to course"
157
    And "Competency picker" "dialogue" should be visible
158
    And I select "comp1" of the competency tree
159
    And I click on "Add" "button" in the "Competency picker" "dialogue"
160
    And I should see "Learning plans"
161
    And I should see "Science plan Year-manage"