Repository navigation
Fix ODCS SLA edit and GlobalSearch Explore sort Playwright failures - #39194
ShaileshParmar11 wants to merge 2 commits into
Conversation
ODCSImportExport: clearing the refresh interval before filling it lets the SLA form reset the unit (since #38469), which disables Save. fill() replaces the value in one edit. GlobalSearch: Explore's search is fuzzy and matched other 'pw table <uuid>' tables that sort ahead of 'pwgstable…' by name ascending, pushing the test table off page one. A leading digit keeps it first.
❌ 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 |
Main's map predates ContractSLAFormTab.tsx (#38469) and the destination.ts DataContracts.spec.ts mapping, so the impact-map drift check fails.
Code Review ✅ Approved 🟢 Low riskThe Playwright-only edits change test input and editing steps without changing production code or weakening assertions, limiting impact to test behavior. Fixes two flaky Playwright specs: drops the VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes the
ODCSImportExport.spec.tsSLA-edit failure and theGlobalSearch.spec.ts"Explore opens with the query and sort picked in search" failure seen in the Playwright mysql run.ODCSImportExport: "Edit SLA after import, export and verify" (broken by #38469)
synchronizeRefreshFieldstoContractSLAFormTab. When the refresh interval becomes'', it setsrefresh_frequency_unittonull. The spec called.clear()before.fill('48'), so the unit was wiped. The interval then failed validation and Save stayed disabled. The test then timed out inpage.waitForResponse: Target page, context or browser has been closed..clear().fill()replaces the value in one edit, so the interval is never empty and the unit stays set.GlobalSearch: Explore sort (spec flake, added in #38564 and made worse by #38919)
pwgstable<uuid>also matched the manypw table <uuid>tables other specs create. Sorted bydisplayName.keywordascending,pw table …(space, 0x20) comes beforepwgstable…. On a busy shared DB this pushed the test table off page one, so thetable-data-card_<fqn>assertion failed.0pwgstable<uuid>). It now sorts before everyp…name, so it stays on page one whatever else matches.Follow-up (not in this PR): the product UX issue is still there. Retyping the SLA interval (select-all + type, or backspace to empty) still clears the unit. A better fix would clear the unit only on blur or submit.
Type of change:
High-level design:
N/A: a small, test-only change (2 Playwright specs).
Tests:
Use cases covered
Unit tests
Not applicable: no product code changed.
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Files updated:
playwright/e2e/Pages/ODCSImportExport.spec.tsplaywright/e2e/Features/AIMode/GlobalSearch.spec.tsRan locally, and both specs pass:
yarn start, :3000) built from this branch. Backend is a freshdocker/developmentcompose stack (MySQL + Elasticsearch + server on :8585) with an empty DB.PLAYWRIGHT_IS_OSS=true,--retries=0.npx playwright test playwright/e2e/Features/AIMode/GlobalSearch.spec.ts playwright/e2e/Pages/ODCSImportExport.spec.ts --repeat-each=3 --retries=0ODCSImportExport.spec.ts(frommain) on the same stack gave 1 failed, 3 passed. The failure is the samepage.waitForResponse: Target page, context or browser has been closederror as CI, which confirms the root cause and the fix.eslintandprettier --checkpass on both files.Caveat: the local DB had few
pw tablerows, so a local GlobalSearch pass does not prove the crowded-index case. The fix for that case rests on the sort-order reasoning above. The full mysql Playwright run in the merge queue is the real check.Manual testing performed
ContractSLAFormTab.synchronizeRefreshFieldsto confirm that an empty interval sets the unit tonull, which the red run above reproduces.UI screen recording:
Not applicable: a test-only change, with no UI behavior changed.
Checklist:
Fixes <issue-number>: <short explanation>(test fix, so no issue. Labelledskip-pr-checks.)Fixes #<issue-number>above (test fix, so not applicable).REVIEW.mdand found no 🔴 findings. Reviewed SHA:fa0258d42195667585e7dbd04a98f9314cacb795.🤖 Generated with Claude Code