1.0.0 • Published 2 years ago

cypress-attributes v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

cypress-attributes

Cypress command to check multiple dom attributes of an element at the same time

Usage

import Stepper from "./Stepper";

describe("<Stepper>", () => {
  it("should set default props", () => {
    cy.mount(
      <Stepper
        data-someattribute="attribute-value"
        id="mystepper"
        className="stepper"
      />
    );

    cy.get("#mystepper").attributes({
      "data-someattribute": "attribute-value",
      id: "mystepper",
      class: "stepper",
    });
  });
});