bulma/docs/cypress/integration/components/level.spec.js
Jeremy Thomas 0ce084170a
Setup cypress (#3436)
* Setup Cypress tests for box and button

* Add container tests

* Add Cypress workflow

* Use npm install

* Update Cypress workflow

* Add Jekyll build

* Test other action

* Test custom setup

* Use other ruby action

* Test without flag

* Move cypress to docs folder

* Record runs

* Add Content, Icon, Image specs

* Add Notification specs

* Add Progress and Table specs

* Add Tags specs

* Add Title specs

* Add breadcrumb specs

* Add more specs

* Add media specs

* Add menu specs

* Add modal specs

* Add navbar specs

* Add pagination specs

* Add panel specs

* Add tabs specs, Add form checkbox radio specs

* Add utils

* Add file specs

* Add input textarea specs

* Add select specs

* Add form tools specs

* Add other elements specs

* Add footer and hero specs

* Add Hero specs

* Add section specs

* Add grid specs

* Add column sizes specs

* Add tiles specs

* Add generic specs

* Fix generic tests

* Make font family test looser

* Remove system-ui test

* Remove important flag

* Fix disabled select color
2022-05-08 13:55:16 +01:00

51 lines
1.5 KiB
JavaScript

describe("Layout/Level", () => {
beforeEach(() => {
cy.visit("http://127.0.0.1:4000/cyp/layout/level/");
});
it("has a Level", () => {
cy.get(".level").should("exist");
});
it("has a correct Level", () => {
cy.get("#level").then(($) => {
const cs = window.getComputedStyle($[0]);
expect(cs.alignItems).to.equal("center");
expect(cs.display).to.equal("flex");
});
});
it("has a correct Level Item", () => {
cy.get("#level .level-item").then(($) => {
const cs = window.getComputedStyle($[0]);
expect(cs.alignItems).to.equal("center");
expect(cs.display).to.equal("flex");
expect(cs.flexGrow).to.equal("0");
expect(cs.flexShrink).to.equal("0");
});
cy.get("#level-centered .level-item .title").then(($) => {
const cs = window.getComputedStyle($[0]);
expect(cs.marginBottom).to.equal("0px");
});
});
it("has correct Level Left and Right", () => {
cy.get("#level .level-left").then(($) => {
const cs = window.getComputedStyle($[0]);
expect(cs.alignItems).to.equal("center");
expect(cs.flexGrow).to.equal("0");
expect(cs.flexShrink).to.equal("0");
expect(cs.justifyContent).to.equal("flex-start");
});
cy.get("#level .level-right").then(($) => {
const cs = window.getComputedStyle($[0]);
expect(cs.alignItems).to.equal("center");
expect(cs.flexGrow).to.equal("0");
expect(cs.flexShrink).to.equal("0");
expect(cs.justifyContent).to.equal("flex-end");
});
});
});