Skip to content

fix(tests): scope admin settings heading locator to the guests section - #1645

Merged
ernolf merged 1 commit into
mainfrom
ernolf/fix/playwright-admin-heading-locator
Jul 30, 2026
Merged

fix(tests): scope admin settings heading locator to the guests section#1645
ernolf merged 1 commit into
mainfrom
ernolf/fix/playwright-admin-heading-locator

Conversation

@ernolf

@ernolf ernolf commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The test (Playwright) job has been red on main and on every PR since around 2026-06-11. It is not caused by any guests change: between the last green run (2026-06-09) and the first red one (2026-06-11) the only commits were a Transifex l10n update and an AUTHORS entry, and admin-settings.spec.ts itself is unchanged since it was added.

The assertion trips Playwright strict mode:

getByRole('heading', { name: 'Guests', exact: true }) resolved to 2 elements:
  1) <h1 class="hidden-visually" id="page-heading-level-1">Guests</h1>
  2) <h2 class="settings-section__name">Guests</h2>  (inside #guest-settings)

The settings framework renders a visually-hidden page heading <h1> carrying the active section name ("Guests"), which collides with our own section <h2>. That <h1> is server-side and predates this app; nothing in this repo changed. The test job boots the continuous-integration-shallow-server image, a shallow clone of nextcloud/server master taken at image build time in nextcloud/docker-ci; it was last rebuilt on 2026-06-10 (build) and the first guests run afterwards is the first red one: green 2026-06-09red 2026-06-11, red on every run since.

This scopes the locator to the app's #guest-settings container, which is exactly what Playwright's own error output suggests, so it matches only our section heading. No change to app behaviour.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI
    Assisted-by: ClaudeCode:claude-opus-4-8

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
@ernolf
ernolf requested review from miaulalala and pringelmann July 30, 2026 01:30
@ernolf

ernolf commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

The test (Playwright) job is green again ✅

Scoping the assertion to the app's own #guest-settings container makes it resolve to exactly one heading (our section <h2>Guests</h2>), so the strict-mode collision with the framework's hidden page <h1> is gone. All other checks pass as well.

Ready for review. 👀

@ernolf
ernolf enabled auto-merge July 30, 2026 01:47
@ernolf
ernolf merged commit 5cc90ab into main Jul 30, 2026
45 checks passed
@ernolf
ernolf deleted the ernolf/fix/playwright-admin-heading-locator branch July 30, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants