cypress-craft
Version:
CypressCraft is an innovative extension built on top of Cypress (Cypress + Cucumber + POM)
15 lines (12 loc) • 738 B
Plain Text
/** ------------------------------------------- **/
/** Steps definitions for the E2E .feature file **/
/** ------------------------------------------- **/
Given('the user enters the {word} page', (endPoint) => {
pageObject._open(endPoint);
});
When(/^the user should (clic|type|select|actions|...) in the (button|field|link|fields|elements|...) "([^"]*)"?(?: with value "([^"]*)")?$/, (action, elementType, elementId, content) => {
pageObject.sendAction(action, elementType, elementId, content);
});
Then(/^the (element|section|field|button|list|image|...) "([^"]*)" should "([^"]*)"?(?: "([^"]*)")?$/, (elementType, elementId, condition, content) => {
pageObject._validate(elementType, elementId, condition, content);
});