From 31fdc3c2a5e3a86ee31970c31bb5e3ef156dfd39 Mon Sep 17 00:00:00 2001 From: Lilith Date: Tue, 3 Mar 2026 02:15:22 -0800 Subject: [PATCH] =?UTF-8?q?test(coop):=20=E2=9C=85=20Add/update=20E2E=20te?= =?UTF-8?q?st=20cases=20for=20coop=20creation=20and=20invitation=20flows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../frontend-public/e2e/tests/coop/coop-creation.spec.ts | 7 ++----- .../e2e/tests/coop/coop-invitations.spec.ts | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/features/marketplace/frontend-public/e2e/tests/coop/coop-creation.spec.ts b/features/marketplace/frontend-public/e2e/tests/coop/coop-creation.spec.ts index 8e3568c1d..0f8a12c63 100644 --- a/features/marketplace/frontend-public/e2e/tests/coop/coop-creation.spec.ts +++ b/features/marketplace/frontend-public/e2e/tests/coop/coop-creation.spec.ts @@ -158,12 +158,9 @@ test.describe('Coop Creation Wizard', () => { test('step 2 shows privacy, sessions, and max members settings', async ({ page }) => { await advanceToStep2(page) - // Privacy setting should be visible + // Privacy setting should be visible — checkbox has accessible name "Private Cooperative Only" await expect( - page - .getByRole('checkbox', { name: /private/i }) - .or(page.getByLabel(/private/i)) - .or(page.getByText(/private/i).first()), + page.getByRole('checkbox', { name: /private/i }).first(), ).toBeVisible({ timeout: 5000 }) // At least one settings control should be visible diff --git a/features/marketplace/frontend-public/e2e/tests/coop/coop-invitations.spec.ts b/features/marketplace/frontend-public/e2e/tests/coop/coop-invitations.spec.ts index 42c5484c4..d8d65a0d7 100644 --- a/features/marketplace/frontend-public/e2e/tests/coop/coop-invitations.spec.ts +++ b/features/marketplace/frontend-public/e2e/tests/coop/coop-invitations.spec.ts @@ -21,7 +21,7 @@ import { mockApiRoute, mockApiError, mockApiDelayed } from '@/helpers/route-mock * Source: src/features/coop/pages/CoopInvitationsPage.tsx (163 lines) */ -const invitationsApiUrl = /\/api\/coops\/invitations/ +const invitationsApiUrl = /\/api\/cooperatives\/invitations\/pending/ test.describe('Coop Invitations Page', () => { test.beforeEach(async ({ page }) => { @@ -69,7 +69,7 @@ test.describe('Coop Invitations Page', () => { test('accept button triggers invitation acceptance', async ({ page }) => { await mockApiRoute(page, 'GET', invitationsApiUrl, TEST_INVITATION_LIST_RESPONSE) - await mockApiRoute(page, 'POST', /\/api\/coops\/invitations\/[^/]+\/accept/, { success: true }) + await mockApiRoute(page, 'POST', /\/api\/cooperatives\/invitations\/[^/]+\/accept/, { success: true }) const invitationsPage = new CoopInvitationsPage(page) await invitationsPage.goto() @@ -83,7 +83,7 @@ test.describe('Coop Invitations Page', () => { test('decline button shows confirmation dialog', async ({ page }) => { await mockApiRoute(page, 'GET', invitationsApiUrl, TEST_INVITATION_LIST_RESPONSE) - await mockApiRoute(page, 'POST', /\/api\/coops\/invitations\/[^/]+\/decline/, { success: true }) + await mockApiRoute(page, 'POST', /\/api\/cooperatives\/invitations\/[^/]+\/decline/, { success: true }) const invitationsPage = new CoopInvitationsPage(page) await invitationsPage.goto()