mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-28 12:24:23 +00:00
Add section specs
This commit is contained in:
parent
e093e7b45d
commit
d4b67f488e
8
docs/cyp/layout/section.html
Normal file
8
docs/cyp/layout/section.html
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
layout: cypress
|
||||
title: Layout/Section
|
||||
---
|
||||
|
||||
<section id="section" class="section"></section>
|
||||
<section id="section-medium" class="section is-medium"></section>
|
||||
<section id="section-large" class="section is-large"></section>
|
40
docs/cypress/integration/layout/section.spec.js
Normal file
40
docs/cypress/integration/layout/section.spec.js
Normal file
@ -0,0 +1,40 @@
|
||||
import { setMobile, setDesktop } from "../utils";
|
||||
|
||||
describe("Layout/Section", () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("http://127.0.0.1:4000/cyp/layout/section/");
|
||||
setDesktop();
|
||||
});
|
||||
|
||||
it("has a Section", () => {
|
||||
cy.get(".section").should("exist");
|
||||
});
|
||||
|
||||
it("has a correct Section", () => {
|
||||
cy.get("#section").then(($) => {
|
||||
const cs = window.getComputedStyle($[0]);
|
||||
expect(cs.padding).to.equal("48px");
|
||||
});
|
||||
|
||||
setMobile();
|
||||
|
||||
cy.get("#section").then(($) => {
|
||||
const cs = window.getComputedStyle($[0]);
|
||||
expect(cs.padding).to.equal("48px 24px");
|
||||
});
|
||||
});
|
||||
|
||||
it("has a correct medium Section", () => {
|
||||
cy.get("#section-medium").then(($) => {
|
||||
const cs = window.getComputedStyle($[0]);
|
||||
expect(cs.padding).to.equal("144px 72px");
|
||||
});
|
||||
});
|
||||
|
||||
it("has a correct large Section", () => {
|
||||
cy.get("#section-large").then(($) => {
|
||||
const cs = window.getComputedStyle($[0]);
|
||||
expect(cs.padding).to.equal("288px 96px");
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user