mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
docs: display button variants
This commit is contained in:
parent
4016dd0847
commit
9aa01ce5fb
9 changed files with 184 additions and 24 deletions
|
@ -8,4 +8,22 @@ describe("Button", () => {
|
|||
expect($.length).to.eql(4);
|
||||
});
|
||||
});
|
||||
|
||||
it.only("clicks", () => {
|
||||
cy.get('[data-test="button-primary"]')
|
||||
.as("btn")
|
||||
.contains("Primary button");
|
||||
|
||||
cy.get("@btn").trigger("click");
|
||||
cy.get("@log").should("be.calledWith", "click");
|
||||
|
||||
cy.get("@btn").trigger("mouseover");
|
||||
cy.get("@log").should("be.calledWith", "mouseover");
|
||||
|
||||
cy.get("@btn").trigger("mouseenter");
|
||||
cy.get("@log").should("be.calledWith", "mouseenter");
|
||||
|
||||
cy.get("@btn").trigger("mouseleave");
|
||||
cy.get("@log").should("be.calledWith", "mouseleave");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
Cypress.Commands.add("examples", (component) => {
|
||||
cy.visit(`/examples/${component}`);
|
||||
cy.visit(`/examples/${component}`, {
|
||||
onBeforeLoad(win) {
|
||||
cy.stub(win.console, "log").as("log");
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue