[Bugfix #698] Fix ambiguous team-tab test card locator#699
Merged
Conversation
Playwright strict mode rejected the card locators because the feature shipped in PR #695 renders review-blocking sentences that mention the other member's name (e.g. Waleed's card contains "Amr is waiting for you to review #688"), so hasText: 'Amr' / 'Waleed' matched both cards. Use filter({ has: '.team-member-github' }) with an anchored regex on the @handle instead — handles are unique per card and not duplicated in any review-blocking text.
Collaborator
Architect ReviewLow-risk test fix. The locator change from CI is all green. Please merge. Architect review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #698
Root Cause
packages/codev/src/agent-farm/__tests__/e2e/team-tab.test.tsfiltered each team member card byhasText: 'Amr'/hasText: 'Waleed'. After PR #695 shipped review-blocking sentences (e.g. "Amr is waiting for you to review #688" rendered inside Waleed's card), those substrings appeared in multiple cards and Playwright strict mode errored with "resolved to 2 elements".Fix
Identify each card by its
.team-member-githubchild (the@handleelement is unique per member and is never mirrored inside review-blocking sentences), using an anchored regex:The anchored
/^@amr$/also guards against future members with overlapping handle prefixes (e.g.@amrit).Test Plan
TOWER_TEST_PORT=4199 pnpm exec playwright test team-tab.test.ts— all 5 tests pass (6.8s)status.yamlis porch-managed)CMAP Review
codev/projects/bugfix-698-.../status.yamlbeing included. This file is porch-managed — it was created bychore(porch): bugfix-698 init bugfix(074d487) at spawn time, and strict-mode builder rules explicitly prohibit editingstatus.yamldirectly. Porch advances it at merge time; this mirrors past bugfixes (e.g.chore(porch): bugfix-693 protocol complete). Not a real blocker.