feat(enterprise): adds new team members permission tests (3569..2579) - #873
Conversation
74330cc to
dfe2127
Compare
dfe2127 to
57723b2
Compare
6c1809c to
c5e1aec
Compare
4626314 to
f0e62a4
Compare
f0e62a4 to
edc71ad
Compare
14d621c to
5d4c998
Compare
5d4c998 to
6db30f7
Compare
e4c925d to
f90ecf9
Compare
f90ecf9 to
d981cbd
Compare
d981cbd to
6a36330
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
A critical navigation-context issue and multiple moderate synchronization/assertion issues remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
Adds Enterprise Advanced Permissions coverage for seven “New team members” cases, replacing skipped tests with grouped multi-account scenarios.
Changes:
- Adds permission, invitation, and organization-move test coverage.
- Improves team navigation, invitation assertions, Gmail polling, and organization setup helpers.
- Updates Enterprise documentation and related tests.
| File | Summary / review notes |
|---|---|
tests/enterprise/README.md |
Updates Enterprise coverage documentation. |
tests/enterprise/admin-console/people-members-remove.spec.ts |
Clarifies invitation-count synchronization. |
tests/enterprise/admin-console/navigation.spec.ts |
Uses the shared second-organization helper. |
tests/enterprise/admin-console/advanced-permissions-new-team-members.spec.ts |
Adds permission scenarios. Critical: manually created context lacks baseURL (line 201). Moderate: invitation visibility and empty-state waits are insufficient (lines 103, 443, 483). |
pages/dashboard/team-page.js |
Adds team and invitation handling. Moderate: duplicates the team-menu retry loop instead of reusing the shared helper (line 862). |
pages/admin-console/advanced-permissions-page.ts |
Adds restriction-warning interactions. |
helpers/organizations/create-second-org-from-admin-console.ts |
Centralizes second-organization creation. Nit: incomplete comment wording (line 7). |
helpers/gmail.js |
Refactors message-count polling helpers. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
6a36330 to
07ad171
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve the critical manual-context navigation failure and complete the shared team-menu helper coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
07ad171 to
cd482d6
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Update switchTeam() to use explicit base-URL navigation in its retry path; the helper comment also needs clarification.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
Resolved since last review (2)
cd482d6 to
6a87fc8
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
A critical navigation issue can prevent the 3573/3574 scenarios from running; documentation and comment nits also remain.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
Resolved since last review (1)
6a87fc8 to
e9207f8
Compare
e9207f8 to
a34b633
Compare


Description
Implements PENPOT-3569/3571/3573/3574/3576/3577/3579 — the "New team members (Permission)" Advanced Permissions suite — in
admin-console/advanced-permissions-new-team-members.spec.ts. All 7 cases were previouslytest.skipstubs.Solution
clickOrganizationMembersOnlyExpectingWarning()could silently report success without ever confirming the warning panel appeared, if the radio was checked before the panel rendered.TeamPagemethod that opens the team options menu — deduplicated into one self-healingopenTeamOptionsMenuItem()used by all of them.switchTeam()had no recovery when a click landed back on Personal Projects instead of the target team; hardened to retry the click itself, not just the switcher list.createSecondOrgFromAdminConsole()(also applied tonavigation.spec.ts, which had the same unguarded pattern).TeamPage.addTeamToOrganization()/changeTeamOrganization()to share new granular steps — both used by other, already-passing specs, re-verified green.How to test
Screenshots 📸 (optional)
0 hard failures across all 20 executions (4 tests x5 runs), and the flaky rates (1-2 out of 5 per test) match exactly an occasional backend propagation delay.
Local test run
Anything Else? (optional)
One known, accepted residual:
3573,3574still shows occasional flakiness under real concurrent load (an invite-enforcement check between two accounts) that areload()reduces but doesn't fully eliminate — traced to genuine backend propagation timing, not a test defect, and not worth further test-side complexity for a rare case.Addressed Copilot's automated review (2 real fixes, 1 investigated and disproven with an empirical test). Merging now and watching Monday's regular regression run for real-world confirmation on the one known residual (3573,3574's load-sensitive flakiness, described above).
A separate PR (#878) fixes an unrelated
playwright.config.tstimeout bug found along the way.