| 1 | import { Then } from "@badeball/cypress-cucumber-preprocessor"; |
| 2 | |
| 3 | Then("I should see the {string} toggle button is pressed", (button: string) => { |
| 4 | cy.get("[data-cy=" + button + "] button").should( |
| 5 | "have.attr", |
| 6 | "aria-pressed", |
| 7 | "true" |
| 8 | ); |
| 9 | }); |
| 10 | |
| 11 | Then( |
| 12 | "I should see the {string} toggle button is not pressed", |
| 13 | (button: string) => { |
| 14 | cy.get("[data-cy=" + button + "] button").should( |
| 15 | "have.attr", |
| 16 | "aria-pressed", |
| 17 | "false" |
| 18 | ); |
| 19 | } |
| 20 | ); |