diff --git a/tests/integration/tests/03-multi-tenant.spec.ts b/tests/integration/tests/03-multi-tenant.spec.ts index 30500a2850..395ada342f 100644 --- a/tests/integration/tests/03-multi-tenant.spec.ts +++ b/tests/integration/tests/03-multi-tenant.spec.ts @@ -290,7 +290,7 @@ test.describe('Multi-tenant E2E flows', () => { expect(payload.code).toBe('self_modification_denied'); }); - test('Scenario 6: cross-org share preserves intended access role and requires target acceptance', async ({ page }) => { + test('Scenario 6: cross-org share preserves intended access role and requires target acceptance', async ({ page, isMobile }) => { await ensureAuthenticated(page); const mtEnabled = await isMultiTenantEnabled(page); @@ -363,7 +363,12 @@ test.describe('Multi-tenant E2E flows', () => { await page.goto('/settings/organization/sharing', { waitUntil: 'domcontentloaded' }); await page.waitForURL(/\/settings\/organization\/sharing/, { timeout: 15_000 }); - await expect(page.getByRole('heading', { level: 1, name: 'Organization Sharing' })).toBeVisible(); + if (isMobile) { + await expect(page.getByRole('heading', { level: 1, name: 'Sharing', exact: true })).toBeVisible(); + await expect(page.getByRole('heading', { level: 2, name: 'Organization Sharing' })).toBeVisible(); + } else { + await expect(page.getByRole('heading', { level: 1, name: 'Organization Sharing' })).toBeVisible(); + } await expect(page.getByText(outboundResourceName, { exact: true })).toBeVisible(); await expect(page.getByText(inboundResourceName, { exact: true })).toBeVisible(); await expect(page.getByText('Pending approval')).toHaveCount(2); diff --git a/tests/integration/tests/66-organization-sharing-approval-ui.spec.ts b/tests/integration/tests/66-organization-sharing-approval-ui.spec.ts index b2a8174073..787a956718 100644 --- a/tests/integration/tests/66-organization-sharing-approval-ui.spec.ts +++ b/tests/integration/tests/66-organization-sharing-approval-ui.spec.ts @@ -40,7 +40,7 @@ const jsonResponse = (body: unknown) => ({ }); test.describe('Organization sharing approval UI', () => { - test('renders pending shares and promotes accepted incoming shares in-browser', async ({ page }) => { + test('renders pending shares and promotes accepted incoming shares in-browser', async ({ page, isMobile }) => { const currentUser = 'admin'; const currentOrg = { id: 'default', @@ -147,7 +147,12 @@ test.describe('Organization sharing approval UI', () => { return root !== null && root.childElementCount > 0; }); - await expect(page.getByRole('heading', { level: 1, name: 'Organization Sharing' })).toBeVisible(); + if (isMobile) { + await expect(page.getByRole('heading', { level: 1, name: 'Sharing', exact: true })).toBeVisible(); + await expect(page.getByRole('heading', { level: 2, name: 'Organization Sharing' })).toBeVisible(); + } else { + await expect(page.getByRole('heading', { level: 1, name: 'Organization Sharing' })).toBeVisible(); + } await expect(page.getByText('Outbound Shared View', { exact: true })).toBeVisible(); await expect(page.getByText('Inbound Shared View', { exact: true })).toBeVisible(); await expect(page.getByText('Pending approval')).toHaveCount(2);