Skip to content

fix(tests): toggle link providers by their switch role - #2988

Open
AndyScherzinger wants to merge 1 commit into
mainfrom
fix/text-link-plain-url-render-race
Open

fix(tests): toggle link providers by their switch role#2988
AndyScherzinger wants to merge 1 commit into
mainfrom
fix/text-link-plain-url-render-race

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Sep 8, 2026

Copy link
Copy Markdown
Member

createTextLinkColumn() looked the "Allowed types" provider toggles up with getByRole('checkbox', …), but the accessibility tree shows they expose the switch role, so the locator matched nothing and setCheckboxState() returned without toggling anything. Every pre-activated provider therefore stayed enabled (preActivatedProviders is url, files, contacts), so a URL-only column rendered the provider NcSelect instead of the plain NcTextField, the value typed by .fill() went into the select's search box and was never committed, and the row saved without it - which is why column-text-link.spec.ts:16 fails on main across all four Nextcloud versions.

The toggles are now addressed by their switch role and the requested provider is asserted to exist, so a future role change fails the test loudly instead of silently disabling the column setup.

This is a test-side fix only; no application code is touched.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stableX.X
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@AndyScherzinger
AndyScherzinger force-pushed the fix/text-link-plain-url-render-race branch from c45393c to da1c6c4 Compare September 8, 2026 06:20
@AndyScherzinger AndyScherzinger changed the title fix(columns): resolve link providers before the first render fix(tests): toggle link providers through the switch helper Sep 8, 2026
@AndyScherzinger
AndyScherzinger force-pushed the fix/text-link-plain-url-render-race branch from da1c6c4 to 25e9525 Compare September 8, 2026 06:36
@AndyScherzinger AndyScherzinger changed the title fix(tests): toggle link providers through the switch helper fix(tests): toggle link providers by their switch role Sep 8, 2026
@AndyScherzinger AndyScherzinger added bug Something isn't working 2. developing Work in progress labels Sep 8, 2026
@AndyScherzinger AndyScherzinger added this to the v2.4.0 milestone Sep 8, 2026
createTextLinkColumn() looked the "Allowed types" provider toggles up
with getByRole('checkbox'), but they expose the switch role, so the
locator matched nothing and setCheckboxState() returned without
toggling. Every pre-activated provider stayed enabled, so a URL only
column rendered the provider NcSelect instead of the plain text field
and the value typed by the test was never committed, leaving the row
without it. The toggles are now addressed by their switch role and the
requested provider is asserted to exist, so a future role change fails
the test instead of silently disabling the column setup.

Assisted-by: ClaudeCode:claude-opus-5
Claude-Session: https://claude.ai/code/session_015aqLZ5g2YsrewxS9UQcuwJ
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger
AndyScherzinger force-pushed the fix/text-link-plain-url-render-race branch from 25e9525 to d7890a6 Compare September 8, 2026 06:59
@AndyScherzinger
AndyScherzinger marked this pull request as ready for review September 8, 2026 07:52
@AndyScherzinger AndyScherzinger added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants