2021-10-30 20:13:53 +00:00
|
|
|
describe("Elements/Box", () => {
|
|
|
|
beforeEach(() => {
|
2021-10-31 00:08:56 +00:00
|
|
|
cy.visit("http://127.0.0.1:4000/cyp/elements/box/");
|
2021-10-30 20:13:53 +00:00
|
|
|
});
|
|
|
|
|
2021-10-31 19:58:15 +00:00
|
|
|
it("has a Box element", () => {
|
2021-10-30 20:13:53 +00:00
|
|
|
cy.get(".box").should("exist");
|
|
|
|
});
|
|
|
|
|
2021-10-31 19:58:15 +00:00
|
|
|
it("has a correct Box", () => {
|
2021-10-30 20:13:53 +00:00
|
|
|
cy.get(".box").then(($) => {
|
2021-10-31 19:36:31 +00:00
|
|
|
const cs = window.getComputedStyle($[0]);
|
2021-10-30 20:13:53 +00:00
|
|
|
expect(cs.backgroundColor).to.equal(Cypress.env("scheme-main"));
|
|
|
|
expect(cs.borderRadius).to.equal("6px");
|
|
|
|
expect(cs.boxShadow).to.equal(
|
|
|
|
"rgba(10, 10, 10, 0.1) 0px 8px 16px -2px, rgba(10, 10, 10, 0.02) 0px 0px 0px 1px"
|
|
|
|
);
|
|
|
|
expect(cs.color).to.equal(Cypress.env("text"));
|
|
|
|
expect(cs.padding).to.equal("20px");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|