Created
September 22, 2020 14:38
-
-
Save LeonardoFassini/f34195e1fcbc58f367633d10bc8a7641 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; | |
Given('I am at the login page', () => { | |
cy.visit('/'); | |
}); | |
When('I type the correct username', () => { | |
cy.get('[data-test=loginInput]').type('admin'); | |
}); | |
When('I type the correct password', () => { | |
cy.get('[data-test=passwordInput]').type('timmy'); | |
}); | |
When('I click to log in', () => { | |
cy.get('[data-test=submitButton]').click(); | |
}); | |
Then('I should be on the todo page', () => { | |
cy.url().should('eq', Cypress.env('baseUrl') + '/todo'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment