Fix cypress test with more specific matcher

This commit is contained in:
Robert Schäfer 2019-03-04 19:31:01 +01:00
parent ba369d82fe
commit 47eaf7dea0
2 changed files with 6 additions and 2 deletions

View File

@ -20,7 +20,7 @@ Feature: Tags and Categories
Scenario: See an overview of categories
When I navigate to the administration dashboard
And I click on "Categories"
And I click on the menu item "Categories"
Then I can see a list of categories ordered by post count:
| Icon | Name | Posts |
| | Just For Fun | 2 |
@ -29,7 +29,7 @@ Feature: Tags and Categories
Scenario: See an overview of tags
When I navigate to the administration dashboard
And I click on "Tags"
And I click on the menu item "Tags"
Then I can see a list of tags ordered by user count:
| # | Name | Users | Posts |
| 1 | Democracy | 2 | 3 |

View File

@ -146,6 +146,10 @@ When(`I click on {string}`, linkOrButton => {
cy.contains(linkOrButton).click()
})
When(`I click on the menu item {string}`, linkOrButton => {
cy.contains('.ds-menu-item', linkOrButton).click()
})
When('I press {string}', label => {
cy.contains(label).click()
})