| 1 | import { Then, When } from "@badeball/cypress-cucumber-preprocessor"; |
| 2 | |
| 3 | When("I click on the {string} radio button", (radioButton: string) => { |
| 4 | cy.dataCy(radioButton).click(); |
| 5 | }); |
| 6 | |
| 7 | Then( |
| 8 | "I should see the {string} radio button is selected", |
| 9 | (radioButton: string) => { |
| 10 | cy.dataCy(radioButton).should("be.checked"); |
| 11 | } |
| 12 | ); |
| 13 | |
| 14 | Then( |
| 15 | "I should see the {string} radio button is not selected", |
| 16 | (radioButton: string) => { |
| 17 | cy.dataCy(radioButton).should("not.be.checked"); |
| 18 | } |
| 19 | ); |