fix(playwright): use createAdminApiContext in IngestionListNameSorting hooks on 1.13 - #31964
Conversation
…ndle pre-authenticated AUT sessions In the upgrade test (1.11.13 → 1.13), playwright/.auth/admin.json carries a valid JWT in localStorage from the pre-upgrade instance. The old performAdminLogin called admin.login() directly, which navigated to /signin and timed out when the frontend redirected to /my-data instead (active session detected). authenticateAdminPage already exists on this branch and handles both paths: it waits for either /my-data or /signin, logs in only when /signin is reached, so it degrades gracefully in both fresh and pre-authenticated browser contexts. Fixes the IngestionListNameSorting spec that was backported via #31915. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ 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 |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
…in to handle pre-authenticated AUT sessions" This reverts commit 4b74175.
…g hooks on 1.13 The beforeAll/afterAll hooks only need an API context to seed and teardown test data — they never use a browser page. On 1.13, performAdminLogin always creates a browser page and calls admin.login() directly. In the AUT (1.11.13 → 1.13), playwright/.auth/admin.json carries a valid JWT in localStorage from the pre-upgrade instance, so the page redirects to /my-data instead of /signin and the login attempt times out. createAdminApiContext() (pure REST, no browser) is the correct primitive for hooks that only need an apiContext. This matches how the test behaves on main, where performAdminLogin takes an API-only fast path for the same reason. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ UI Checkstyle Failed❌ Core Components - I18n SyncCore-components ❌ Antd + Less Deprecation GuardA new Affected filesat Function._resolveFilename (node:internal/modules/cjs/loader:1401:15) Fix locally (fast - only checks files changed in this branch): make ui-checkstyle-changed |
Code Review ✅ ApprovedReplaces performAdminLogin with createAdminApiContext in IngestionListNameSorting spec hooks to avoid browser navigation and JWT session redirect timeouts during 1.13 upgrades. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
The
beforeAllandafterAllhooks in this spec only need an API token to create/delete test data. They never actually need a browser window at all.So instead of calling
performAdminLogin(browser)(which opens a browser), we now callcreateAdminApiContext()(which just makes a direct API call to get a token). No browser = no redirect problem.Only this one spec file is changed. No shared utilities are touched.