You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/behat/features/drupal_taxonomy.feature
+48-12Lines changed: 48 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
@taxonomy
1
2
Feature: Check that TaxonomyTrait works
2
3
As Behat Steps library developer
3
4
I want to provide tools to manage taxonomy terms programmatically
@@ -154,19 +155,19 @@ Feature: Check that TaxonomyTrait works
154
155
"""
155
156
156
157
@api
157
-
Scenario: Assert "When I visit the :vocabulary_machine_name vocabulary :term_name term page" works
158
+
Scenario: Assert "When I visit the :vocabulary_machine_name term page with the name :term_name" works
158
159
Given I am logged in as a user with the "administrator" role
159
-
When I visit the "tags"vocabulary "Tag1" term page
160
+
When I visit the "tags"term page with the name "Tag1"
160
161
Then the response should contain "200"
161
162
And I should see "Tag1"
162
163
163
164
@api@trait:Drupal\TaxonomyTrait
164
-
Scenario: Assert negative assertion for "When I visit the :vocabulary_machine_name vocabulary :term_name term page" fails with non-existing vocabulary
165
+
Scenario: Assert negative assertion for "When I visit the :vocabulary_machine_name term page with the name :term_name" fails with non-existing vocabulary
165
166
Given some behat configuration
166
167
And scenario steps:
167
168
"""
168
169
Given I am logged in as a user with the "administrator" role
169
-
When I visit the "nonexisting" vocabulary "Tag1" term page
170
+
When I visit the "nonexisting" term page with the name "Tag1"
170
171
"""
171
172
When I run "behat --no-colors"
172
173
Then it should fail with an exception:
@@ -175,12 +176,12 @@ Feature: Check that TaxonomyTrait works
175
176
"""
176
177
177
178
@api@trait:Drupal\TaxonomyTrait
178
-
Scenario: Assert negative assertion for "When I visit the :vocabulary_machine_name vocabulary :term_name term page" fails with non-existing term
179
+
Scenario: Assert negative assertion for "When I visit the :vocabulary_machine_name term page with the name :term_name" fails with non-existing term
179
180
Given some behat configuration
180
181
And scenario steps:
181
182
"""
182
183
Given I am logged in as a user with the "administrator" role
183
-
When I visit the "tags" vocabulary "Nonexisting" term page
184
+
When I visit the "tags" term page with the name "Nonexisting"
184
185
"""
185
186
When I run "behat --no-colors"
186
187
Then it should fail with an exception:
@@ -189,19 +190,19 @@ Feature: Check that TaxonomyTrait works
189
190
"""
190
191
191
192
@api
192
-
Scenario: Assert "When I edit the :vocabulary_machine_name vocabulary :term_name term page" works
193
+
Scenario: Assert "When I visit the :vocabulary_machine_name term edit page with the name :term_name" works
193
194
Given I am logged in as a user with the "administrator" role
194
-
When I edit the "tags"vocabulary "Tag1" term page
195
+
When I visit the "tags"term edit page with the name "Tag1"
195
196
Then the response should contain "200"
196
197
And I should see "Tag1"
197
198
198
199
@api@trait:Drupal\TaxonomyTrait
199
-
Scenario: Assert negative assertion for "When I edit the :vocabulary_machine_name vocabulary :term_name term page" fails with non-existing vocabulary
200
+
Scenario: Assert negative assertion for "When I visit the :vocabulary_machine_name term edit page with the name :term_name" fails with non-existing vocabulary
200
201
Given some behat configuration
201
202
And scenario steps:
202
203
"""
203
204
Given I am logged in as a user with the "administrator" role
204
-
When I edit the "nonexisting" vocabulary "Tag1" term page
205
+
When I visit the "nonexisting" term edit page with the name "Tag1"
205
206
"""
206
207
When I run "behat --no-colors"
207
208
Then it should fail with an exception:
@@ -210,12 +211,47 @@ Feature: Check that TaxonomyTrait works
210
211
"""
211
212
212
213
@api@trait:Drupal\TaxonomyTrait
213
-
Scenario: Assert negative assertion for "When I edit the :vocabulary_machine_name vocabulary :term_name term page" fails with non-existing term
214
+
Scenario: Assert negative assertion for "When I visit the :vocabulary_machine_name term edit page with the name :term_name" fails with non-existing term
214
215
Given some behat configuration
215
216
And scenario steps:
216
217
"""
217
218
Given I am logged in as a user with the "administrator" role
218
-
When I edit the "tags" vocabulary "Nonexisting" term page
219
+
When I visit the "tags" term edit page with the name "Nonexisting"
220
+
"""
221
+
When I run "behat --no-colors"
222
+
Then it should fail with an exception:
223
+
"""
224
+
Unable to find the term "Nonexisting" in the vocabulary "tags".
225
+
"""
226
+
227
+
@api
228
+
Scenario: Assert "When I visit the :vocabulary_machine_name term delete page with the name :term_name" works
229
+
Given I am logged in as a user with the "administrator" role
230
+
When I visit the "tags" term delete page with the name "Tag1"
231
+
Then the response should contain "200"
232
+
And I should see "Tag1"
233
+
234
+
@api@trait:Drupal\TaxonomyTrait
235
+
Scenario: Assert negative assertion for "When I visit the :vocabulary_machine_name term delete page with the name :term_name" fails with non-existing vocabulary
236
+
Given some behat configuration
237
+
And scenario steps:
238
+
"""
239
+
Given I am logged in as a user with the "administrator" role
240
+
When I visit the "nonexisting" term delete page with the name "Tag1"
241
+
"""
242
+
When I run "behat --no-colors"
243
+
Then it should fail with an exception:
244
+
"""
245
+
The vocabulary "nonexisting" does not exist.
246
+
"""
247
+
248
+
@api@trait:Drupal\TaxonomyTrait
249
+
Scenario: Assert negative assertion for "When I visit the :vocabulary_machine_name term delete page with the name :term_name" fails with non-existing term
250
+
Given some behat configuration
251
+
And scenario steps:
252
+
"""
253
+
Given I am logged in as a user with the "administrator" role
254
+
When I visit the "tags" term delete page with the name "Nonexisting"
0 commit comments