mirror of
https://github.com/jgthms/bulma
synced 2026-03-15 10:14:29 -07:00
Fix generic tests
This commit is contained in:
@@ -91,7 +91,6 @@
|
||||
"weight-semibold": "600",
|
||||
"weight-bold": "700",
|
||||
|
||||
"family-primary": "\"system-ui\", -apple-system, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif",
|
||||
"family-code": "monospace",
|
||||
|
||||
"viewports": {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { familyPrimary } from "../utils";
|
||||
|
||||
describe("Base/Generic", () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("http://127.0.0.1:4000/cyp/base/generic/");
|
||||
@@ -29,7 +31,7 @@ describe("Base/Generic", () => {
|
||||
it("has correct form elements", () => {
|
||||
cy.get("body, button, input, optgroup, select, textarea").then(($) => {
|
||||
const cs = window.getComputedStyle($[0]);
|
||||
expect(cs.fontFamily).to.equal(Cypress.env("family-primary"));
|
||||
expect(cs.fontFamily).to.equal(familyPrimary);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -45,7 +47,7 @@ describe("Base/Generic", () => {
|
||||
cy.get("body").then(($) => {
|
||||
const cs = window.getComputedStyle($[0]);
|
||||
expect(cs.color).to.equal(Cypress.env("text"));
|
||||
expect(cs.fontFamily).to.equal(Cypress.env("family-primary"));
|
||||
expect(cs.fontFamily).to.equal(familyPrimary);
|
||||
expect(cs.fontSize).to.equal("16px");
|
||||
expect(cs.fontWeight).to.equal("400");
|
||||
expect(cs.lineHeight).to.equal("24px");
|
||||
|
||||
@@ -32,3 +32,5 @@ export const setFullHD = () => {
|
||||
Cypress.env("viewports").fullhd[1]
|
||||
);
|
||||
};
|
||||
|
||||
export const familyPrimary = 'system-ui, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif';
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user