From 73f092172dcc3f8e26ae9a77f194f9fd6275c70c Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 12:26:27 +0000 Subject: [PATCH] Fix CI failures in visual tests and unit tests - Increased timeout and improved interaction robustness for `tests/visual/overlay-layers.spec.ts` to address CI timeouts. - Fixed `ReferenceError` in `tests/nostr-login-permissions.test.mjs` caused by missing variable declaration. - Added `_redirects` file for Netlify deployment. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- _redirects | 1 + tests/nostr-login-permissions.test.mjs | 2 +- tests/visual/overlay-layers.spec.ts | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 _redirects diff --git a/_redirects b/_redirects new file mode 100644 index 00000000..7797f7c6 --- /dev/null +++ b/_redirects @@ -0,0 +1 @@ +/* /index.html 200 diff --git a/tests/nostr-login-permissions.test.mjs b/tests/nostr-login-permissions.test.mjs index 0fa80c4c..1a81e753 100644 --- a/tests/nostr-login-permissions.test.mjs +++ b/tests/nostr-login-permissions.test.mjs @@ -313,7 +313,7 @@ test("NIP-07 login falls back when structured permissions fail", async () => { const pubkey = result.pubkey; assert.equal(pubkey, HEX_PUBKEY); assert.ok(env.enableCalls.length >= 2, "should retry with alternate payloads"); - const [objectCall, stringCall] = env.enableCalls; + const [objectCall, stringCall, plainCall] = env.enableCalls; assert.ok(Array.isArray(objectCall?.permissions)); assert.equal( typeof objectCall.permissions[0], diff --git a/tests/visual/overlay-layers.spec.ts b/tests/visual/overlay-layers.spec.ts index 5382c050..b10fe501 100644 --- a/tests/visual/overlay-layers.spec.ts +++ b/tests/visual/overlay-layers.spec.ts @@ -40,6 +40,9 @@ test.describe("overlay layering tokens", () => { } test("mobile sidebar shares desktop rail behavior", async ({ page }) => { + // Increase timeout for this visual test which is prone to flakiness in CI + test.setTimeout(120_000); + await page.setViewportSize({ width: 390, height: 844 }); await page.goto("/index.html", { waitUntil: "networkidle" }); @@ -128,6 +131,7 @@ test.describe("overlay layering tokens", () => { // Ensure the toggle is initialized await expect(collapseToggle).toHaveAttribute("data-state", /.*/); + await collapseToggle.scrollIntoViewIfNeeded(); await collapseToggle.click({ force: true }); await page.waitForFunction(() => {