From fe402e28bb9d1643121b96ed85c44444171b2def Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 30 Sep 2024 17:34:39 +0100 Subject: [PATCH] Fix flaky mobile registration tests (#102) * Fix flaky mobile registration tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Discard changes to src/theme.ts * Add comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- test/components/structures/MatrixChat-test.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/components/structures/MatrixChat-test.tsx b/test/components/structures/MatrixChat-test.tsx index e786370b7c..dd4ae5de64 100644 --- a/test/components/structures/MatrixChat-test.tsx +++ b/test/components/structures/MatrixChat-test.tsx @@ -61,6 +61,10 @@ jest.mock("matrix-js-sdk/src/oidc/authorize", () => ({ completeAuthorizationCodeGrant: jest.fn(), })); +// Stub out ThemeWatcher as the necessary bits for themes are done in element-web's index.html and thus are lacking here, +// plus JSDOM's implementation of CSSStyleDeclaration has a bunch of differences to real browsers which cause issues. +jest.mock("../../../src/settings/watchers/ThemeWatcher"); + /** The matrix versions our mock server claims to support */ const SERVER_SUPPORTED_MATRIX_VERSIONS = ["v1.1", "v1.5", "v1.6", "v1.8", "v1.9"];