diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c77482c..27e280d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -10,8 +10,13 @@ on: workflow_dispatch: concurrency: - group: e2e-${{ github.ref }} - cancel-in-progress: true + # Repo-wide mutex: every E2E run shares one Supabase project, and concurrent + # runs race each other's beforeAll cleanupOldMessages hooks (run 25769955636 + # on 2026-05-13 was cancelled at 60 min after PR #88's run, started 3 min + # later, wiped its data). Serialize across all refs; do not cancel a running + # job to make room for a queued one. + group: e2e-supabase-${{ github.repository }} + cancel-in-progress: false env: NEXT_PUBLIC_SUPABASE_URL: ${{ vars.NEXT_PUBLIC_SUPABASE_URL }} diff --git a/tests/e2e/messaging/encrypted-messaging.spec.ts b/tests/e2e/messaging/encrypted-messaging.spec.ts index adba5ea..97777f5 100644 --- a/tests/e2e/messaging/encrypted-messaging.spec.ts +++ b/tests/e2e/messaging/encrypted-messaging.spec.ts @@ -663,6 +663,7 @@ test.describe('Encrypted Messaging Flow', () => { .first() .evaluate((el) => { el.scrollTop = 0; + el.dispatchEvent(new Event('scroll', { bubbles: true })); }); // Look for "Load More" button diff --git a/tests/e2e/messaging/messaging-scroll.spec.ts b/tests/e2e/messaging/messaging-scroll.spec.ts index d2e1791..5d77bd5 100644 --- a/tests/e2e/messaging/messaging-scroll.spec.ts +++ b/tests/e2e/messaging/messaging-scroll.spec.ts @@ -232,9 +232,14 @@ test.describe('Messaging Scroll - User Story 2: Scroll Through Messages', () => ); const initialInputBox = await messageInput.boundingBox(); - // Scroll up in the message thread + // Scroll up in the message thread. + // WebKit does not always fire the scroll event for programmatic scrollTop + // assignments. Dispatch it explicitly so React listeners (e.g., + // MessageThread's handleScroll at MessageThread.tsx:194) run reliably + // across browsers. await messageThread.evaluate((el) => { el.scrollTop = 0; + el.dispatchEvent(new Event('scroll', { bubbles: true })); }); // Wait for scroll to complete @@ -274,6 +279,7 @@ test.describe('Messaging Scroll - User Story 3: Jump to Bottom Button', () => { // Scroll up more than 500px to trigger button await messageThread.evaluate((el) => { el.scrollTop = Math.max(0, el.scrollHeight - el.clientHeight - 600); + el.dispatchEvent(new Event('scroll', { bubbles: true })); }); await waitForUIStability(page); @@ -320,6 +326,7 @@ test.describe('Messaging Scroll - User Story 3: Jump to Bottom Button', () => { // Scroll up to trigger button await messageThread.evaluate((el) => { el.scrollTop = 0; + el.dispatchEvent(new Event('scroll', { bubbles: true })); }); await waitForUIStability(page);