Skip to content

test(e2e): pick the header Create link button in share-links spec - #695

Closed
ValgulNecron wants to merge 1 commit into
masterfrom
claude/013-share-links-selector
Closed

ValgulNecron wants to merge 1 commit into
masterfrom
claude/013-share-links-selector

Conversation

@ValgulNecron

@ValgulNecron ValgulNecron commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Before: the live share-links.spec.ts sometimes failed in strict mode at openCreateDialog, because a server with no share links shows two "Create link" buttons inside <main>: the header button and the empty-state button (web/src/routes/tabs/settings/ShareLinks.tsx:551 and :570). The locator matched both. This failed on amd64 in the #693 live run.

After: the spec clicks the header button with .first(), so it opens the same dialog whether or not the list is empty.

How: one locator change plus a comment in web/e2e/specs/live/share-links.spec.ts. No assertion changes. valgul approved this as its own PR on the spec 013 card.

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • Tests
    • Improved share-link end-to-end test reliability when creating a link from an empty list.

The empty state renders a second Create link button, so the main-scoped locator matched two elements and failed in strict mode.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: GameplanePanel/Gameplane/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d9ae5142-b228-4c1d-8f42-75e7552df69d
📥 Commits

Reviewing files that changed from the base of the PR and between f191103 and 6a939df.

📒 Files selected for processing: 1
  • web/e2e/specs/live/share-links.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions: 1
CRITICAL: TypeScript runs under strict mode.

⚙️ CodeRabbit configuration file

Files:

  • web/e2e/specs/live/share-links.spec.ts
🔇 Additional comments: 1
web/e2e/specs/live/share-links.spec.ts: 1

170-170: 📐 Maintainability & Code Quality

Human sign-off status cannot be determined. The changed line is an E2E test edit, and CLAUDE.md rule 5 / Constitution Principle III requires sign-off, but the supplied context contains no approval record. This supports requesting confirmation, not claiming that the rule was violated.

Walkthrough

The share-link end-to-end test helper now selects the first “Create link” button in the main landmark.

Changes

Share Link Test

Layer / File(s) Summary
Select the header button
web/e2e/specs/live/share-links.spec.ts
openCreateDialog selects the first matching “Create link” button in the main landmark.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Suggested labels: type: fix, area: web

Merge Risk: ⚪ Minimal · up to 6a939

The share-link test now targets the header button when both creation buttons appear. No merge-blocking issue is established.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: selecting the header “Create link” button in the share-links end-to-end test.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ValgulNecron ValgulNecron added area: e2e kind-based end-to-end suite type: test Test additions or changes labels Oct 14, 2026 — with Claude
@ValgulNecron ValgulNecron self-assigned this Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

CI Report - 6a939df

run 38603906074 - attempt 2

0 failed - 9 passed - 22 skipped - 39m12s elapsed

Coverage

Module Measured Gate Margin
web L95.53 S94.07 B88.79 F91.78 L92 S92 B82 F76 +2.07

Changed

Area Files +/-
web/ 1 +2/-1

Slowest jobs

Job Duration
build e2e images (arm64) 8m7s
build e2e images 7m54s
e2e web live / amd64 (kind) 7m47s
e2e web live / arm64 (kind) 7m16s
web 6m22s

e2e buckets run

multicluster, upgrade

Copy link
Copy Markdown
Collaborator Author

build e2e images (amd64) on run 38603906074 was cancelled at its 15-minute timeout-minutes, so the amd64 live job that runs this spec never started. This PR changes only one locator in web/e2e/specs/live/share-links.spec.ts, which no image build uses. The same job takes 12 to 14 minutes on other runs today (master run 38603222773: 13m54s), so it is close to the limit under load. I'm re-running the failed jobs once.


Generated by Claude Code

@ValgulNecron
ValgulNecron marked this pull request as ready for review October 14, 2026 17:47

Copy link
Copy Markdown
Collaborator Author

Closing: master already carries this fix in 834c3ca ("fix: preserve share link tokens across server refreshes"). That commit changed the same line to getByRole("button", { name: "Create link", exact: true }).first(), so after resolving the conflict this PR would change nothing.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: e2e kind-based end-to-end suite type: test Test additions or changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants