Skip to content

Instantly share code, notes, and snippets.

@manoj9788
Created April 15, 2019 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj9788/cd5e45c2f4aa355b7d4dce086f90df65 to your computer and use it in GitHub Desktop.
Save manoj9788/cd5e45c2f4aa355b7d4dce086f90df65 to your computer and use it in GitHub Desktop.
describe("Checkbox", () => {
describe("a11y", () => {
beforeEach(() => {
cy.visit("/component/th-checkbox/example/5");
});
describe("aria-label", () => {
describe("without an aria-label attribute specified", () => {
it("has an aria-label attribute identical to the checkbox's with-label attribute", () => {
cy.get("#axe-test #basic.th-checkbox").should("have.attr", "aria-label", "Basic Checkbox");
});
});
describe("with an aria-label attribute specified", () => {
it("has an aria-label attribute with the value provided", () => {
cy.get("#axe-test #aria-label.th-checkbox").should("have.attr", "aria-label", "Aria-Label");
});
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment