From b0d06b6ddb0c686f7bb213240cef27f690af1b82 Mon Sep 17 00:00:00 2001 From: Jeremy Thomas Date: Sun, 8 May 2022 10:25:01 +0100 Subject: [PATCH] Make font family test looser --- docs/cypress/integration/base/generic.spec.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/cypress/integration/base/generic.spec.js b/docs/cypress/integration/base/generic.spec.js index a5362959..4809a01a 100644 --- a/docs/cypress/integration/base/generic.spec.js +++ b/docs/cypress/integration/base/generic.spec.js @@ -31,7 +31,11 @@ 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(familyPrimary); + expect(cs.fontFamily).to.contains("system-ui"); + expect(cs.fontFamily).to.contains("-apple-system"); + expect(cs.fontFamily).to.contains("Helvetica"); + expect(cs.fontFamily).to.contains("Arial"); + expect(cs.fontFamily).to.contains("sans-serif"); }); }); @@ -47,7 +51,11 @@ 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(familyPrimary); + expect(cs.fontFamily).to.contains("system-ui"); + expect(cs.fontFamily).to.contains("-apple-system"); + expect(cs.fontFamily).to.contains("Helvetica"); + expect(cs.fontFamily).to.contains("Arial"); + expect(cs.fontFamily).to.contains("sans-serif"); expect(cs.fontSize).to.equal("16px"); expect(cs.fontWeight).to.equal("400"); expect(cs.lineHeight).to.equal("24px");