]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Fix generic tests
authorJeremy Thomas <bbxdesign@gmail.com>
Sun, 8 May 2022 08:57:18 +0000 (09:57 +0100)
committerJeremy Thomas <bbxdesign@gmail.com>
Sun, 8 May 2022 08:57:18 +0000 (09:57 +0100)
docs/cypress.json
docs/cypress/integration/base/generic.spec.js
docs/cypress/integration/utils.js
docs/cypress/videos/elements/box.spec.js.mp4 [deleted file]
docs/cypress/videos/elements/button.spec.js.mp4 [deleted file]
docs/cypress/videos/elements/container.spec.js.mp4 [deleted file]

index bc3fa955261dd11a043f0a020f14742def35a146..9344447926168f01fb1b62de2fdaa3a519314ed3 100644 (file)
@@ -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": {
index f7c848590a6673dd8571230e5687fb269123c3d7..a536295939be7accdfbd5117babb5d400d27d752 100644 (file)
@@ -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");
index 86a26a7062055b418ca68b2117b7a439e0a9b147..d00e749db7859080a71055d9e22f20e99584edf2 100644 (file)
@@ -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';
diff --git a/docs/cypress/videos/elements/box.spec.js.mp4 b/docs/cypress/videos/elements/box.spec.js.mp4
deleted file mode 100644 (file)
index 311d65a..0000000
Binary files a/docs/cypress/videos/elements/box.spec.js.mp4 and /dev/null differ
diff --git a/docs/cypress/videos/elements/button.spec.js.mp4 b/docs/cypress/videos/elements/button.spec.js.mp4
deleted file mode 100644 (file)
index 987d1dd..0000000
Binary files a/docs/cypress/videos/elements/button.spec.js.mp4 and /dev/null differ
diff --git a/docs/cypress/videos/elements/container.spec.js.mp4 b/docs/cypress/videos/elements/container.spec.js.mp4
deleted file mode 100644 (file)
index 9bee255..0000000
Binary files a/docs/cypress/videos/elements/container.spec.js.mp4 and /dev/null differ