Repository navigation
test(sso): route login/SSO admin specs through the sso-auth project only - #34056
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
|
✅ SSO Login Nightly — PASSED View workflow run · Commit
Totals: 79 passed · 0 failed · 0 flaky · 0 skipped · duration 19m 48s |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
Three specs were still running on the main Playwright lane while
touching auth surface (login flow, login config, SSO admin config):
- Features/SSOTestLogin.spec.ts (untagged, ran via `chromium`)
- Pages/Login.spec.ts (`@basic`, ran via `Basic`)
- Pages/LoginConfiguration.spec.ts (`@basic`, ran via `Basic`)
Route them through the `sso-auth` project so their backend
authenticationConfiguration mutations can't race feature specs:
- Add each path to `sso-auth.testMatch`
- Mirror the same paths on `chromium.testIgnore` and
`Basic.testIgnore` so the main lane skips them
- Tag each with `@sso` (Login / LoginConfiguration keep `@basic`
so the SSO nightly's Basic leg picks them up via `--grep @basic`;
SSOTestLogin gets both `@basic` and `@sso`)
- Extend the SSO workflow's `paths:` filter to trigger on the
Features/ and Pages/ spec files themselves
Rest of `/Auth/**` (SsoScenarios, OktaSelfSignupClaims, SSOSelfSignup,
SSOSessionLimit) was already SSO-workflow-only via existing
testIgnore on chromium and Basic.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cleans up the pattern from the previous commit. All three specs now
live under playwright/e2e/Auth/ so the existing `'**/Auth/**'`
testIgnore covers them — no per-file exceptions on chromium.testIgnore
or Basic.testIgnore. sso-auth's testMatch becomes `'**/Auth/**/*.spec.ts'`.
Also fixes the CI failure surfaced on the previous push: the moved
specs use `test.use({ storageState: 'playwright/.auth/admin.json' })`
which requires auth.setup.ts to have run. Added
`dependencies: authDependencies` on the sso-auth project so setup
runs before it. Per-provider SsoScenarios legs still work — auth.setup
runs BEFORE the scenario's beforeAll swaps the backend provider, and
the Basic-only moved specs run only on the Basic leg where the
setup's admin session stays valid.
Workflow paths filter shrinks back to just the /Auth/** entry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…uppression Moving SSOTestLogin.spec.ts under /Auth/ changed its path key in eslint-suppressions.json, orphaning the old `Features/SSOTestLogin.spec.ts` entry that whitelisted one `no-positional-locator` violation at the `.first()` call. Rather than migrate the suppression to the new path (the guardrail baseline exists to force us NOT to add), fix the underlying locator: exact-match `/^public$/i` uniquely picks the Public radio in the client-type toggle without needing `.first()`. Prune removes the orphan; the new file adds zero suppressions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merge queue at 36405090119 failed the corpus baseline test: another burn-down PR landed on main while this PR was queued (1149 → 1148), and my prune removes one more (SSOTestLogin's orphaned entry), so the actual count is 1147. Match it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code Review ✅ Approved 2 closed / 2 findings🟡 Medium risk · Playwright project routing changes which authentication specs run in each lane. Routes three auth-surface specs ( ✅ 2 closed✅ Bug: sso-auth has no setup dependency, so admin.json is never created
✅ Edge Case: --grep-invert legs (okta, SAML) now also run the moved Basic specs
OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Summary
Three specs were still running on the main Playwright lane while touching auth surface (login flow, login-config admin, SSO admin config). Their beforeAll/beforeEach flows can mutate
authenticationConfigurationserver-wide viaapplyProviderConfig, which — when co-scheduled with feature specs — has already caused false failures (a/api/v1/users/signuphitting a mid-run self-signup toggle → 501).Route them through the
sso-authproject so their auth-config mutations can't race feature specs:Features/SSOTestLogin.spec.tschromium(untagged)sso-authPages/Login.spec.tsBasic(@basic)sso-authPages/LoginConfiguration.spec.tsBasic(@basic)sso-authChanges
playwright.config.tssso-auth.testMatchgains the three paths.chromium.testIgnoreandBasic.testIgnoremirror the same three paths so the main lane skips them.@ssoat the top-leveldescribe(existing@basickept — the SSO nightly's Basic leg picks them up via--grep @basic;SSOTestLogingets both)..github/workflows/playwright-sso-login-nightly.yml'spaths:filter gains the three spec files so touching them re-triggers the SSO matrix.Every other
/Auth/**spec (SsoScenarios, OktaSelfSignupClaims, SSOSelfSignup, SSOSessionLimit) was already SSO-workflow-only via the existingchromium/BasictestIgnore '**/Auth/**'.Test plan
yarn lint+yarn pretty:checkclean on all four touched files.@ssoor lives under the moved paths.--grep @basic) enrols the moved specs +SsoScenarios.spec.ts's Basic-fixture row.🤖 Generated with Claude Code