Skip to content

test(auth): Wait for authenticated SSO state - #123342

Merged
evanpurkhiser merged 1 commit into
masterfrom
git/test-auth-wait-for-authenticated-sso-state
Sep 1, 2026
Merged

evanpurkhiser merged 1 commit into
masterfrom
git/test-auth-wait-for-authenticated-sso-state

Conversation

@evanpurkhiser

@evanpurkhiser evanpurkhiser commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

The password-to-SSO acceptance flow stays on the same organization login pathname while the page transitions into its authenticated state. Waiting on that pathname returned immediately and allowed the test to click the SSO button while React was replacing it, producing stale-element and missing-element failures.

Wait for the pre-authentication email form to disappear before asserting that the organization-scoped pathname was preserved and continuing into SSO.

Tested with .venv/bin/pytest -n0 -svv --reuse-db tests/acceptance/test_auth_react.py::ReactAuthTest::test_password_login_preserves_sso_organization_destination and .venv/bin/prek run -q --files tests/acceptance/test_auth_react.py.

Synchronize on the post-password UI before asserting the preserved organization path and starting SSO. This prevents the acceptance test from clicking an element while the login page is rerendering.
@evanpurkhiser
evanpurkhiser force-pushed the git/test-auth-wait-for-authenticated-sso-state branch from cd93e47 to dde8f6e Compare September 1, 2026 16:47
@evanpurkhiser
evanpurkhiser merged commit f5fdb1a into master Sep 1, 2026
63 of 64 checks passed
@evanpurkhiser
evanpurkhiser deleted the git/test-auth-wait-for-authenticated-sso-state branch September 1, 2026 16:56
sentry-junior Bot added a commit that referenced this pull request Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants