diff --git a/features/marketplace/frontend-public/e2e/pages/coop/CoopAdvertisementsTab.ts b/features/marketplace/frontend-public/e2e/pages/coop/CoopAdvertisementsTab.ts index 3237c62a5..68e2a3fe7 100644 --- a/features/marketplace/frontend-public/e2e/pages/coop/CoopAdvertisementsTab.ts +++ b/features/marketplace/frontend-public/e2e/pages/coop/CoopAdvertisementsTab.ts @@ -73,7 +73,7 @@ export class CoopAdvertisementsTab { .locator('p') .filter({ hasText: /consent/i }) this.approveConsentButton = this.consentModal.getByRole('button', { - name: /approve/i, + name: /grant consent|approve/i, }) this.declineConsentButton = this.consentModal.getByRole('button', { name: /decline/i, @@ -81,7 +81,7 @@ export class CoopAdvertisementsTab { // Reason input appears after clicking Decline, before final confirmation this.declineReasonInput = this.consentModal.getByRole('textbox') this.confirmDeclineButton = this.consentModal.getByRole('button', { - name: /confirm|submit/i, + name: /confirm decline|submit/i, }) // Display config preview — rendered within each ad card diff --git a/features/marketplace/frontend-public/e2e/tests/coop/coop-advertisements.spec.ts b/features/marketplace/frontend-public/e2e/tests/coop/coop-advertisements.spec.ts index a5f058839..4928bcd27 100644 --- a/features/marketplace/frontend-public/e2e/tests/coop/coop-advertisements.spec.ts +++ b/features/marketplace/frontend-public/e2e/tests/coop/coop-advertisements.spec.ts @@ -163,24 +163,26 @@ test.describe('Coop Advertisements Tab', () => { }) test.describe('Error Handling', () => { - test('shows error state when advertisements API fails', async ({ page }) => { + test('shows empty state when advertisements API fails', async ({ page }) => { await mockApiError(page, 'GET', adsApiUrl, 500, 'Internal server error') await mockApiRoute(page, 'GET', pendingConsentApiUrl, PENDING_CONSENT_EMPTY) - const managePage = new CoopManagePage(page) await navigateToAdsTab(page) + const adsTab = new CoopAdvertisementsTab(page) - await managePage.assertError() + // AdvertisementsTab renders empty state when API fails (no error propagation to UI) + await adsTab.assertEmptyState() }) - test('shows error state when not a cooperative member', async ({ page }) => { + test('shows empty state when not a cooperative member', async ({ page }) => { await mockApiError(page, 'GET', adsApiUrl, 403, AD_ERROR_RESPONSES.notMember.message) await mockApiRoute(page, 'GET', pendingConsentApiUrl, PENDING_CONSENT_EMPTY) - const managePage = new CoopManagePage(page) await navigateToAdsTab(page) + const adsTab = new CoopAdvertisementsTab(page) - await managePage.assertError() + // AdvertisementsTab renders empty state when API returns 403 (no error propagation to UI) + await adsTab.assertEmptyState() }) }) })