1 |
efrain |
1 |
@tool @javascript @tool_lp @tool_lp_framework
|
|
|
2 |
Feature: Manage competency frameworks
|
|
|
3 |
As a competency framework admin
|
|
|
4 |
In order to perform CRUD operations on competency framework
|
|
|
5 |
I need to create, update and delete competency framework
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given I log in as "admin"
|
|
|
9 |
And I change window size to "small"
|
|
|
10 |
And I am on site homepage
|
|
|
11 |
|
|
|
12 |
Scenario: Create a new framework
|
|
|
13 |
Given I navigate to "Competencies > Competency frameworks" in site administration
|
|
|
14 |
And I should see "List of competency frameworks"
|
|
|
15 |
And I click on "Add new competency framework" "button"
|
|
|
16 |
And I should see "General"
|
|
|
17 |
And I should see "Taxonomies"
|
|
|
18 |
And I set the field "Name" to "Science Year-1"
|
|
|
19 |
And I set the field "ID number" to "Comp-frm-1"
|
|
|
20 |
And I press "Save changes"
|
|
|
21 |
And I should see "The scale needs to be configured by selecting default and proficient items."
|
|
|
22 |
And "Configure scales" "button" should be visible
|
|
|
23 |
And I press "Configure scales"
|
|
|
24 |
And I click on "//input[@data-field='tool_lp_scale_default_1']" "xpath_element"
|
|
|
25 |
And I click on "//input[@data-field='tool_lp_scale_proficient_1']" "xpath_element"
|
|
|
26 |
And I click on "//input[@value='Close']" "xpath_element"
|
|
|
27 |
When I press "Save changes"
|
|
|
28 |
Then I should see "Competency framework created"
|
|
|
29 |
And I should see "Science Year-1"
|
|
|
30 |
|
|
|
31 |
Scenario: Read a framework
|
|
|
32 |
Given the following lp "frameworks" exist:
|
|
|
33 |
| shortname | idnumber |
|
|
|
34 |
| Science Year-2 | sc-y-2 |
|
|
|
35 |
And I navigate to "Competencies > Competency frameworks" in site administration
|
|
|
36 |
And I should see "Science Year-2"
|
|
|
37 |
When I click on "Science Year-2" "link"
|
|
|
38 |
Then I should see "Science Year-2"
|
|
|
39 |
|
|
|
40 |
Scenario: Edit a framework
|
|
|
41 |
Given the following lp "frameworks" exist:
|
|
|
42 |
| shortname | idnumber |
|
|
|
43 |
| Science Year-3 | sc-y-3 |
|
|
|
44 |
And I navigate to "Competencies > Competency frameworks" in site administration
|
|
|
45 |
And I should see "Science Year-3"
|
|
|
46 |
And I click on "Edit" of edit menu in the "Science Year-3" row
|
|
|
47 |
And the field "Name" matches value "Science Year-3 "
|
|
|
48 |
And I set the field "Name" to "Science Year-3 Edited"
|
|
|
49 |
When I press "Save changes"
|
|
|
50 |
Then I should see "Competency framework updated"
|
|
|
51 |
And I should see "Science Year-3 Edited"
|
|
|
52 |
And I should see "sc-y-3"
|
|
|
53 |
|
|
|
54 |
Scenario: Delete a framework
|
|
|
55 |
Given the following lp "frameworks" exist:
|
|
|
56 |
| shortname | idnumber |
|
|
|
57 |
| Science Year-4 | sc-y-4 |
|
|
|
58 |
And I navigate to "Competencies > Competency frameworks" in site administration
|
|
|
59 |
And I should see "Science Year-4"
|
|
|
60 |
And I should see "sc-y-4"
|
|
|
61 |
And I click on "Delete" of edit menu in the "Science Year-4" row
|
|
|
62 |
And "Confirm" "dialogue" should be visible
|
|
|
63 |
And "Delete" "button" should exist in the "Confirm" "dialogue"
|
|
|
64 |
And "Cancel" "button" should exist in the "Confirm" "dialogue"
|
|
|
65 |
And I click on "Cancel" "button" in the "Confirm" "dialogue"
|
|
|
66 |
And I click on "Delete" of edit menu in the "Science Year-4" row
|
|
|
67 |
And "Confirm" "dialogue" should be visible
|
|
|
68 |
When I click on "Delete" "button" in the "Confirm" "dialogue"
|
|
|
69 |
Then I should not see "Science Year-4"
|
|
|
70 |
And I should not see "sc-y-4"
|
|
|
71 |
|
|
|
72 |
Scenario: Edit a framework with competencies in user competency
|
|
|
73 |
Given the following lp "frameworks" exist:
|
|
|
74 |
| shortname | idnumber |
|
|
|
75 |
| Science Year-5 | sc-y-5 |
|
|
|
76 |
And the following lp "competencies" exist:
|
|
|
77 |
| shortname | framework |
|
|
|
78 |
| Comp1 | sc-y-5 |
|
|
|
79 |
| Comp2 | sc-y-5 |
|
|
|
80 |
And the following lp "plans" exist:
|
|
|
81 |
| name | user | description |
|
|
|
82 |
| Plan Science-5 | admin | Plan description |
|
|
|
83 |
And the following lp "plancompetencies" exist:
|
|
|
84 |
| plan | competency |
|
|
|
85 |
| Plan Science-5 | Comp1 |
|
|
|
86 |
| Plan Science-5 | Comp2 |
|
|
|
87 |
And the following lp "usercompetencies" exist:
|
|
|
88 |
| user | competency |
|
|
|
89 |
| admin | Comp1 |
|
|
|
90 |
| admin | Comp2 |
|
|
|
91 |
And I navigate to "Competencies > Competency frameworks" in site administration
|
|
|
92 |
And I should see "Science Year-5"
|
|
|
93 |
And I click on "Edit" of edit menu in the "Science Year-5" row
|
|
|
94 |
And the field "Name" matches value "Science Year-5 "
|
|
|
95 |
And I set the field "Name" to "Science Year-5 Edited"
|
|
|
96 |
And the "scaleid" "select" should be readonly
|
|
|
97 |
When I press "Save changes"
|
|
|
98 |
Then I should see "Competency framework updated"
|
|
|
99 |
And I should see "Science Year-5 Edited"
|
|
|
100 |
And I should see "sc-y-5"
|
|
|
101 |
|
|
|
102 |
Scenario: Edit a framework with competencies in user competency plan
|
|
|
103 |
Given the following lp "frameworks" exist:
|
|
|
104 |
| shortname | idnumber |
|
|
|
105 |
| Science Year-6 | sc-y-6 |
|
|
|
106 |
And the following lp "competencies" exist:
|
|
|
107 |
| shortname | framework |
|
|
|
108 |
| Comp1 | sc-y-6 |
|
|
|
109 |
| Comp2 | sc-y-6 |
|
|
|
110 |
And the following lp "plans" exist:
|
|
|
111 |
| name | user | description |
|
|
|
112 |
| Plan Science-6 | admin | Plan description |
|
|
|
113 |
And the following lp "plancompetencies" exist:
|
|
|
114 |
| plan | competency |
|
|
|
115 |
| Plan Science-6 | Comp1 |
|
|
|
116 |
| Plan Science-6 | Comp2 |
|
|
|
117 |
And the following lp "usercompetencyplans" exist:
|
|
|
118 |
| user | competency | plan |
|
|
|
119 |
| admin | Comp1 | Plan Science-6 |
|
|
|
120 |
| admin | Comp2 | Plan Science-6 |
|
|
|
121 |
And I navigate to "Competencies > Competency frameworks" in site administration
|
|
|
122 |
And I should see "Science Year-6"
|
|
|
123 |
And I click on "Edit" of edit menu in the "Science Year-6" row
|
|
|
124 |
And the field "Name" matches value "Science Year-6 "
|
|
|
125 |
And I set the field "Name" to "Science Year-6 Edited"
|
|
|
126 |
And the "scaleid" "select" should be readonly
|
|
|
127 |
When I press "Save changes"
|
|
|
128 |
Then I should see "Competency framework updated"
|
|
|
129 |
And I should see "Science Year-6 Edited"
|
|
|
130 |
And I should see "sc-y-6"
|
|
|
131 |
|
|
|
132 |
Scenario: Duplicate a competency framework
|
|
|
133 |
Given the following lp "frameworks" exist:
|
|
|
134 |
| shortname | idnumber |
|
|
|
135 |
| CF1 | CF1 |
|
|
|
136 |
And the following lp "competencies" exist:
|
|
|
137 |
| shortname | framework |
|
|
|
138 |
| C1 | CF1 |
|
|
|
139 |
And I navigate to "Competencies > Competency frameworks" in site administration
|
|
|
140 |
# Duplicate the selected competency framework
|
|
|
141 |
When I click on "Duplicate" of edit menu in the "CF1" row
|
|
|
142 |
# Confirm that the selected framework was duplicated by clicking on the link
|
|
|
143 |
And I click on "CF1 (copy) (CF1_1)" "link"
|
|
|
144 |
# Confirm that the corresponding competency also exists in the duplicated framework
|
|
|
145 |
Then I should see "C1"
|