Skip to content
Snippets Groups Projects
Unverified Commit e52eaee0 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Repro #45359 - Incorrect font in e2e tests in CI (#45274)

* Add a test verifying that fonts are loaded

* Verify font is mentioned in HTML

* Bring back working assertions

* Add wait

* Disable speedy

* Disable CSP and emotion cache

* Revert "Disable CSP and emotion cache"

This reverts commit 573e99bfa4c99b8c695a624e1d5d1e230833cc62.

* Revert "Disable speedy"

This reverts commit 6f9962b869834cecdbe270e87e065ed41adf49b4.

* Don't use local fonts

* Revert "Don't use local fonts"

This reverts commit 17c58aa73d22603241de8b6bf84b7390ad1b9410.

* Force Lato

* Fix storybook file name

* ESLint

* Add more !important

* Revert !important

* Add font-family assertion

* Move test
parent 0d563b7a
No related branches found
No related tags found
No related merge requests found
......@@ -1785,3 +1785,38 @@ describe("issue 41464", () => {
});
});
});
describe.skip("issue 45359", () => {
beforeEach(() => {
restore();
cy.intercept("/app/fonts/Lato/lato-v16-latin-regular.woff2").as(
"font-regular",
);
cy.intercept("/app/fonts/Lato/lato-v16-latin-700.woff2").as("font-bold");
cy.signInAsAdmin();
});
it("loads app fonts correctly (metabase#45359)", () => {
openOrdersTable({ mode: "notebook" });
getNotebookStep("data")
.findByText("Orders")
.should("have.css", "font-family", "Lato, sans-serif");
cy.get("@font-regular.all").should("have.length", 1);
cy.get("@font-regular").should(({ response }) => {
expect(response).to.include({ statusCode: 200 });
});
cy.get("@font-bold.all").should("have.length", 1);
cy.get("@font-bold").should(({ response }) => {
expect(response).to.include({ statusCode: 200 });
});
cy.document()
.then(document => document.fonts.ready)
.then(fonts => {
cy.wrap(fonts).invoke("check", "16px Lato").should("be.true");
});
});
});
......@@ -4,7 +4,6 @@ import { Form, FormProvider } from "metabase/forms";
import FormFileInput from "./FormFileInput";
// eslint-disable-next-line import/no-default-export -- deprecated usage
export default {
title: "Core/FormFileInput",
component: FormFileInput,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment