diff --git a/integration/tests/22-ent-offline.spec.ts b/integration/tests/22-ent-offline.spec.ts index e34302733..38c243b36 100644 --- a/integration/tests/22-ent-offline.spec.ts +++ b/integration/tests/22-ent-offline.spec.ts @@ -98,11 +98,11 @@ async function setPolicy(browser: Browser, patch: { organisation?: Record Backup & reset > Offline, switched on, and the first sync done. */ async function enableOffline(page: Page, phone = false): Promise { - await page.goto('/settings/backup/offline'); + await page.goto('/settings/offline'); const toggle = page.getByTestId('offline-switch'); if (phone && !(await toggle.waitFor({ state: 'visible', timeout: 8_000 }).then(() => true, () => false))) { // On a phone the settings list may come first. - await page.getByText('Backup & reset', { exact: true }).first().click(); + await page.getByTestId('settings-tab-offline').click(); } await expect(toggle).toBeVisible({ timeout: 30_000 }); if ((await toggle.getAttribute('aria-checked')) !== 'true') await toggle.click(); diff --git a/integration/tests/24-do-export.spec.ts b/integration/tests/24-do-export.spec.ts index 682ad72fe..9fb5e9b7f 100644 --- a/integration/tests/24-do-export.spec.ts +++ b/integration/tests/24-do-export.spec.ts @@ -101,7 +101,7 @@ async function startOffline(): Promise { await expect(page.getByTestId('offline-banner')).toContainText("You're offline", { timeout: 60_000 }); // The shell can open Settings on its first page: from there through the menu, as a person would. if (!(await page.getByTestId('offline-switch').waitFor({ state: 'visible', timeout: 5_000 }).then(() => true, () => false))) { - await page.getByText('Backup & reset', { exact: true }).first().click(); + await page.getByTestId('settings-tab-offline').click(); } await expect(page.getByTestId('offline-switch')).toBeVisible({ timeout: 30_000 }); }