Skip to content

Commit 5cc90ab

Browse files
authored
Merge pull request #1645 from nextcloud/ernolf/fix/playwright-admin-heading-locator
fix(tests): scope admin settings heading locator to the guests section
2 parents 222dba1 + 9a04b4b commit 5cc90ab

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

playwright/e2e/admin-settings.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ test('Admin Guests settings page renders without errors', async ({ adminPage })
1313

1414
await adminPage.goto('/settings/admin/guests')
1515

16-
await expect(adminPage.getByRole('heading', { name: 'Guests', exact: true })).toBeVisible()
16+
// Scope to our section: the framework also renders a hidden page <h1> with the section name.
17+
await expect(adminPage.locator('#guest-settings').getByRole('heading', { name: 'Guests', exact: true })).toBeVisible()
1718
await expect(adminPage.getByRole('checkbox', { name: /external storage/i })).toBeVisible()
1819

1920
expect(pageErrors, `uncaught page errors: ${pageErrors.join(' | ')}`).toEqual([])

0 commit comments

Comments
 (0)