Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
- const baseURL = 'http://localhost:3000/#';
- Given('I visit {string}', page => {
- cy.visit(`${baseURL}${page}`);
- });
- When('I fill the {string} with {string}', (input, email) => {
- cy.get(`#txt-${input}`).type(email);
- });
- When('I choose the {string} {string}', (input, gender) => {
- cy.get(`#ddl-${input}`).click();
- cy.get(`#lst-${gender}`).click();
- });
- When('I click {string}', button => {
- cy.get(`#btn-${button}`).click();
- });
- Then('I should be in {string}', word => {
- cy.wait(3000);
- cy.url().should('eq', `${baseURL}${word}`);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement