@@ -18,6 +18,7 @@ Feature: Configure placements for a tool
1818 And I should see "Mock placement" in the "Placements" "autocomplete"
1919 And "Placement: Mock placement" "fieldset" should not be visible
2020 And the following fields in the "Placement: Mock placement" "fieldset" match these values:
21+ | Default state | |
2122 | Deep Linking Request URL | |
2223 | Resource Linking Request URL | |
2324 | Icon URL | |
@@ -37,6 +38,7 @@ Feature: Configure placements for a tool
3738 When I set the field "Placements" in the "Placement" "fieldset" to "Mock placement"
3839 And "Placement: Mock placement" "fieldset" should be visible
3940 And I set the following fields in the "Placement: Mock placement" "fieldset" to these values:
41+ | Default state | 1 |
4042 | Deep Linking Request URL | http ://deep .link |
4143 | Resource Linking Request URL | http ://resource .link |
4244 | Icon URL | https ://icon |
@@ -45,6 +47,7 @@ Feature: Configure placements for a tool
4547 And I click on "Edit" "link"
4648 Then "Mock placement" "autocomplete_selection" should exist in the "Placement" "fieldset"
4749 And the following fields in the "Placement: Mock placement" "fieldset" match these values:
50+ | Default state | 1 |
4851 | Deep Linking Request URL | http ://deep .link |
4952 | Resource Linking Request URL | http ://resource .link |
5053 | Icon URL | https ://icon |
@@ -79,9 +82,11 @@ Feature: Configure placements for a tool
7982 | Icon URL | https ://icon |
8083 | Text | Some text for the tool |
8184 And I press "Save changes"
85+ # Course tool placement should be enabled by default, so it should show in the Active placements column
86+ Then I should see "Mock placement" in the "Course Tool 1" "table_row"
8287 And I open the action menu in "Course Tool 1" "table_row"
8388 And I choose "Edit" in the open action menu
84- Then "Mock placement" "autocomplete_selection" should exist in the "Placement" "fieldset"
89+ And "Mock placement" "autocomplete_selection" should exist in the "Placement" "fieldset"
8590 And the following fields in the "Placement: Mock placement" "fieldset" match these values:
8691 | Deep Linking Request URL | http ://deep .link |
8792 | Resource Linking Request URL | http ://resource .link |
@@ -97,19 +102,21 @@ Feature: Configure placements for a tool
97102 | placementtype | component |
98103 | core_ltix :mockplacement | core_ltix |
99104 And the following "core_ltix > tool placements" exist:
100- | tool | placementtype | config_deep_linking_url | config_icon_url | config_text |
101- | Site Tool 1 | core_ltix :mockplacement | http ://deeplink | https ://icon | Some text for the tool |
105+ | tool | placementtype | config_default_usage | config_deep_linking_url | config_icon_url | config_text |
106+ | Site Tool 1 | core_ltix :mockplacement | 1 | http ://deeplink | https ://icon | Some text for the tool |
102107 And I log in as "admin"
103108 And I navigate to "LTI > Manage tools" in site administration
104109 And I click on "Edit" "link"
105110 # Edit several configuration options for the placement and verify the changes are applied.
106111 When I set the following fields in the "Placement: Mock placement" "fieldset" to these values:
112+ | Default state | |
107113 | Deep Linking Request URL | http ://deep .link .updated |
108114 | Text | Some text for the tool (edited ) |
109115 And I press "Save changes"
110116 And I click on "Edit" "link"
111117 Then "Mock placement" "autocomplete_selection" should exist in the "Placement" "fieldset"
112118 And the following fields in the "Placement: Mock placement" "fieldset" match these values:
119+ | Default state | |
113120 | Deep Linking Request URL | http ://deep .link .updated |
114121 | Resource Linking Request URL | |
115122 | Icon URL | https ://icon |
@@ -121,6 +128,7 @@ Feature: Configure placements for a tool
121128 And "Mock placement" "autocomplete_selection" should not exist in the "Placement" "fieldset"
122129 And "Placement: Mock placement" "fieldset" should not be visible
123130 And the following fields in the "Placement: Mock placement" "fieldset" match these values:
131+ | Default state | |
124132 | Deep Linking Request URL | |
125133 | Resource Linking Request URL | |
126134 | Icon URL | |
@@ -145,7 +153,7 @@ Feature: Configure placements for a tool
145153 | core_ltix :mockplacement | core_ltix |
146154 And the following "core_ltix > tool placements" exist:
147155 | tool | placementtype | config_deep_linking_url | config_icon_url | config_text |
148- | Course Tool 1 | core_ltix :mockplacement | http ://deeplink | https ://icon | Some text for the tool |
156+ | Course Tool 1 | core_ltix :mockplacement | http ://deeplink | https ://icon | Some text for the tool |
149157 And I am on the "Course 1" course page logged in as teacher1
150158 And I navigate to "LTI External tools" in current page administration
151159 And I open the action menu in "Course Tool 1" "table_row"
@@ -155,9 +163,11 @@ Feature: Configure placements for a tool
155163 | Deep Linking Request URL | http ://deep .link .updated |
156164 | Text | Some text for the tool (edited ) |
157165 And I press "Save changes"
166+ # Course tool placement should be enabled by default, so it should show in the Active placements column
167+ Then I should see "Mock placement" in the "Course Tool 1" "table_row"
158168 And I open the action menu in "Course Tool 1" "table_row"
159169 And I choose "Edit" in the open action menu
160- Then "Mock placement" "autocomplete_selection" should exist in the "Placement" "fieldset"
170+ And "Mock placement" "autocomplete_selection" should exist in the "Placement" "fieldset"
161171 And the following fields in the "Placement: Mock placement" "fieldset" match these values:
162172 | Deep Linking Request URL | http ://deep .link .updated |
163173 | Resource Linking Request URL | |
@@ -166,6 +176,7 @@ Feature: Configure placements for a tool
166176 # Deselect the placement and verify the related configurations are removed upon saving.
167177 And I click on "Mock placement" "autocomplete_selection"
168178 And I press "Save changes"
179+ And I should not see "Mock placement" in the "Course Tool 1" "table_row"
169180 And I open the action menu in "Course Tool 1" "table_row"
170181 And I choose "Edit" in the open action menu
171182 And "Mock placement" "autocomplete_selection" should not exist in the "Placement" "fieldset"
@@ -188,6 +199,7 @@ Feature: Configure placements for a tool
188199 # It should be hidden when nothing is selected in the beginning
189200 And the field "Placements" matches value ""
190201 And "Placement: Mock placement" "fieldset" should not be visible
202+ And I should not see "Default state" in the "Placement: Mock placement" "fieldset"
191203 And I should not see "Deep Linking Request URL" in the "Placement: Mock placement" "fieldset"
192204 And I should not see "Resource Linking Request URL" in the "Placement: Mock placement" "fieldset"
193205 And I should not see "Icon URL" in the "Placement: Mock placement" "fieldset"
@@ -197,13 +209,15 @@ Feature: Configure placements for a tool
197209 And I set the field "Placements" in the "Placement" "fieldset" to "Mock placement"
198210 Then "Mock placement" "autocomplete_selection" should exist in the "Placement" "fieldset"
199211 And "Placement: Mock placement" "fieldset" should be visible
212+ And I should see "Default state" in the "Placement: Mock placement" "fieldset"
200213 And I should see "Deep Linking Request URL" in the "Placement: Mock placement" "fieldset"
201214 And I should see "Resource Linking Request URL" in the "Placement: Mock placement" "fieldset"
202215 And I should see "Icon URL" in the "Placement: Mock placement" "fieldset"
203216 And I should see "Text" in the "Placement: Mock placement" "fieldset"
204217 # Removing the selected value will hide the fieldset
205218 And I click on "Mock placement" "autocomplete_selection"
206219 And "Placement: Mock placement" "fieldset" should not be visible
220+ And I should not see "Default state" in the "Placement: Mock placement" "fieldset"
207221 And I should not see "Deep Linking Request URL" in the "Placement: Mock placement" "fieldset"
208222 And I should not see "Resource Linking Request URL" in the "Placement: Mock placement" "fieldset"
209223 And I should not see "Icon URL" in the "Placement: Mock placement" "fieldset"
0 commit comments