mirror of
https://github.com/jgthms/bulma
synced 2026-03-16 10:34:29 -07:00
* 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
69 lines
1.9 KiB
JavaScript
69 lines
1.9 KiB
JavaScript
describe("Elements/Content", () => {
|
|
beforeEach(() => {
|
|
cy.visit("http://127.0.0.1:4000/cyp/elements/content/");
|
|
});
|
|
|
|
it("has a Content element", () => {
|
|
cy.get(".content").should("exist");
|
|
});
|
|
|
|
it("has correct headings", () => {
|
|
cy.get(".content h1").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.fontSize).to.equal("32px");
|
|
});
|
|
|
|
cy.get(".content h2").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.fontSize).to.equal("28px");
|
|
});
|
|
|
|
cy.get(".content h3").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.fontSize).to.equal("24px");
|
|
});
|
|
|
|
cy.get(".content h4").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.fontSize).to.equal("20px");
|
|
});
|
|
|
|
cy.get(".content h5").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.fontSize).to.equal("18px");
|
|
});
|
|
|
|
cy.get(".content h6").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.fontSize).to.equal("16px");
|
|
});
|
|
});
|
|
|
|
it("has a correct blockquote", () => {
|
|
cy.get(".content blockquote").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.backgroundColor).to.equal(Cypress.env("white-ter"));
|
|
expect(cs.padding).to.equal("20px 24px");
|
|
});
|
|
});
|
|
|
|
it("has correct lists", () => {
|
|
cy.get(".content ol li").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.listStyleType).to.equal("decimal");
|
|
});
|
|
|
|
cy.get(".content ul li").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.listStyleType).to.equal("disc");
|
|
});
|
|
});
|
|
|
|
it("has a correct pre", () => {
|
|
cy.get(".content pre").then(($) => {
|
|
const cs = window.getComputedStyle($[0]);
|
|
expect(cs.padding).to.equal("17.5px 21px");
|
|
});
|
|
});
|
|
});
|