Fixed a test

This commit is contained in:
Grzegorz Leoniec 2019-01-07 18:17:38 +01:00
parent 4f50274b0d
commit ce3a812eb2
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377

View File

@ -135,7 +135,7 @@ Then('I see a button with the label {string}', label => {
When('I navigate to the administration dashboard', () => { When('I navigate to the administration dashboard', () => {
cy.get('.avatar-menu').click() cy.get('.avatar-menu').click()
cy.get('.avatar-menu-popover') cy.get('.avatar-menu-popover a')
.contains('Admin') .contains('Admin')
.click() .click()
}) })
@ -159,3 +159,37 @@ Then('I can see a list of tags ordered by user and post count:', table => {
.should('have.length', 4) .should('have.length', 4)
lastColumnIsSortedInDescendingOrder() lastColumnIsSortedInDescendingOrder()
}) })
When('I enter {string} as my location', location => {
cy.get('input[id=city]').type(location)
cy.get('.ds-select-option')
.contains(location)
.click()
})
When('I enter {string} to about me', text => {
cy.get('textarea[id=bio]')
.clear()
.type(text)
})
When('I enter {string} as my name', text => {
cy.get('input[id=name]')
.clear()
.type(text)
})
Then('I can see {string} as my name', text => {
cy.get('input[id=name]')
.clear()
.type(text)
})
When('I press {string}', label => {
cy.contains(label).click()
})
Then('I can see a {string} as my location', location => {
cy.contains(location)
})
Then('I can see a {string} as my about me', about => {
cy.contains(about)
})
Then('I can see a {string} as my name', name => {
cy.get('.avatar-menu-popover').contains(name)
})