mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
49 lines
1.0 KiB
JavaScript
49 lines
1.0 KiB
JavaScript
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
|
|
|
|
/* global cy */
|
|
|
|
When('I save {string} as my new name', name => {
|
|
cy.get('input[id=name]')
|
|
.clear()
|
|
.type(name)
|
|
cy.contains('Save').click()
|
|
})
|
|
|
|
When('I save {string} as my location', location => {
|
|
cy.get('input[id=city]').type(location)
|
|
cy.get('.ds-select-option')
|
|
.contains(location)
|
|
.click()
|
|
cy.contains('Save').click()
|
|
})
|
|
|
|
When('I save {string} to about me', text => {
|
|
cy.get('textarea[id=bio]')
|
|
.clear()
|
|
.type(text)
|
|
cy.contains('Save').click()
|
|
})
|
|
|
|
Then(
|
|
'I can see my new name {string} when I click on my profile picture in the top right',
|
|
name => {
|
|
cy.get('input[id=name]')
|
|
.clear()
|
|
.type(name)
|
|
cy.contains('Save').click()
|
|
}
|
|
)
|
|
|
|
Then('I can see {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)
|
|
})
|
|
|