| 1 | import { Then, When } from "@badeball/cypress-cucumber-preprocessor"; |
| 2 | |
| 3 | When("I click on the {string} tab", (tab: string) => { |
| 4 | cy.dataCy(tab).click(); |
| 5 | }); |
| 6 | |
| 7 | Then("I should not see {string} tab", (tab: string) => { |
| 8 | cy.dataCy(tab).should("not.exist"); |
| 9 | }); |
| 10 | |
| 11 | Then("I should see {string} tab", (tab: string) => { |
| 12 | cy.dataCy(tab).should("exist"); |
| 13 | }); |
| 14 | |
| 15 | Then("I should see {string} tab selected", (tab: string) => { |
| 16 | cy.dataCy(tab).should("have.attr", "aria-selected", "true"); |
| 17 | }); |