mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-28 12:24:23 +00:00
0ce084170a
* 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
53 lines
1.6 KiB
JavaScript
53 lines
1.6 KiB
JavaScript
describe("Components/Media", () => {
|
|
beforeEach(() => {
|
|
cy.visit("http://127.0.0.1:4000/cyp/layout/media/");
|
|
});
|
|
|
|
it("has a Media", () => {
|
|
cy.get(".media").should("exist");
|
|
});
|
|
|
|
it("has a correct Media", () => {
|
|
cy.get("#media").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.alignItems).to.equal("flex-start");
|
|
expect(cs.display).to.equal("flex");
|
|
});
|
|
});
|
|
|
|
it("has a correct nested Media", () => {
|
|
cy.get("#media-nested .media-content .media + .media").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.borderTopColor).to.equal("rgba(219, 219, 219, 0.5)");
|
|
expect(cs.borderTopStyle).to.equal("solid");
|
|
expect(cs.borderTopWidth).to.equal("1px");
|
|
expect(cs.marginTop).to.equal("8px");
|
|
expect(cs.paddingTop).to.equal("8px");
|
|
});
|
|
});
|
|
|
|
it("has a correct Media Content", () => {
|
|
cy.get("#media .media-content").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.flexGrow).to.equal("1");
|
|
expect(cs.flexShrink).to.equal("1");
|
|
});
|
|
});
|
|
|
|
it("has correct Media Left and Right", () => {
|
|
cy.get("#media .media-left").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.flexGrow).to.equal("0");
|
|
expect(cs.flexShrink).to.equal("0");
|
|
expect(cs.marginRight).to.equal("16px");
|
|
});
|
|
|
|
cy.get("#media .media-right").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.flexGrow).to.equal("0");
|
|
expect(cs.flexShrink).to.equal("0");
|
|
expect(cs.marginLeft).to.equal("16px");
|
|
});
|
|
});
|
|
});
|