Skip to content

test(playwright): port remaining clean specs/utils from #33088; fix TeamsPage stale-team merge - #34094

Merged
chirag-madlani merged 17 commits into
mainfrom
chirag-madlani/harsha-remaining-pw-batch
Sep 28, 2026
Merged

chirag-madlani merged 17 commits into
mainfrom
chirag-madlani/harsha-remaining-pw-batch

Conversation

@chirag-madlani

Copy link
Copy Markdown
Collaborator

Fixes #33087

Describe your changes

Final sweep of #33088 (harshach/debug-merge-queue). I trial-merged the branch onto current main and took every file that merges cleanly, using the merged-with-main version of each file rather than harsha's raw copy.

UI fix

  • TeamsPage.tsx: only merge a fetched team into selectedTeam when the ids match. Before this, switching teams could carry fields over from the previously selected team.

Playwright (103 files)

  • Tasks batch: TaskCreation, TaskPermissions fixture, taskWorkflow.ts, and more.
  • Remaining clean specs: ObservabilityAlerts, ContextCenterDocument, KnowledgeGraph, BulkImport, GlossaryP2, AutoPilot, CustomizeWidgets, PersonaFlow, DataInsight, and others.
  • support/utils: importUtils, incidentManager, ServiceBaseClass, glossary, and others.
  • 7 browser-tests.
  • Helpers these specs need from files that conflicted, ported individually: chooseSelectOption, dismissToasts, dismissHoverPopovers, searchDataProductOptions, waitForAriaModalToSettle, waitForAntdModalToSettle, expectLineageNodeVisible, openLineageNodeDrawer.
  • Duplicate imports created by the merge (trailing plus hoisted copies) removed.
  • Suppression baseline pruned: no-positional-locator 1149 → 1096, no-wait-for-selector 24 → 22.

Deliberately kept on main

  • DataContractsSemanticRules, Pagination, Tasks/DomainFiltering: they only compile against harsha's versions of conflicted utils (dataContracts signatures, TableClass).
  • browser-tests/indexedDbStorage.spec.ts: needs scripts/patch-playwright-indexeddb.cjs from chore(#33088 split): UI runtime + docs bulk (safe-modified, 61 files) #33933; it can follow once that lands.
  • playwright.config.ts and globalSetup.ts / visual-regression.setup|teardown.ts: the config sets retries: 0 and changes merge-queue reporter and trace settings.
  • MetricDetails and setupTests.js: main already has the behaviour, and the tests target a manage menu main has since replaced.
  • CI workflows/scripts and spec-mapping changes: not in scope (workflow edits need explicit authorization). The audit-log entity_fqn → TEXT migration is already on main.

Verification

  • tsc -p playwright/tsconfig.json and tsc -p tsconfig.json: no new errors compared with main.
  • playwright test --list: all files resolve.
  • yarn lint:playwright: 0 errors; yarn test:eslint-rules passes; rule table is current.
  • jest src/pages/TeamsPage: 25/25.

Any spec that fails CI against main's UI will be reset to main in a follow-up commit rather than patched.

🤖 Generated with Claude Code

…eamsPage stale-team merge

Takes every Playwright file from harshach/debug-merge-queue that merges cleanly
onto main (Tasks batch, remaining specs, support/utils, browser-tests), using
the merged-with-main version of each file. Specs that only compile against
source-branch utils (DataContractsSemanticRules, Pagination,
Tasks/DomainFiltering) and indexedDbStorage (needs #33933's patch script) stay
on main. playwright.config.ts stays on main (retries/merge-queue changes).

TeamsPage: only merge a fetched team into the selected one when it is the same
team, so switching teams no longer carries fields over from the previous one.

Fixes #33087

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 805 → 808
- 4 added, 1 removed, 39 changed spec-list

New source→spec entries:
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/taskActivity.ts
  openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/kpi/kpi.ts
  openmetadata-ui/src/main/resources/ui/src/generated/entity/tasks/task.ts
  openmetadata-ui/src/main/resources/ui/src/generated/governance/workflows/workflowInstance.ts

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Reactions/Reaction.tsx

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/e2e/fixtures/pages.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/TableClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/TaskClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/base.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/serverLoad.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/user/UserClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/ContextCenterUtil.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/activityAPI.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/admin.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/apiResponse.ts
  … and 29 more

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 getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

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

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ SSO Login Nightly — PASSED

View workflow run · Commit a36c0bb

Provider Status Pass Fail Flaky Skip Duration
basic ✅ pass 23 0 0 0 6m 50s
ldap ✅ pass 7 0 0 0 1m 15s
keycloak-oidc-confidential ✅ pass 10 0 0 0 1m 47s
keycloak-oidc-public ✅ pass 9 0 0 0 1m 23s
msal-mock ✅ pass 6 0 0 0 0m 57s
auth0-mock ✅ pass 6 0 0 0 0m 52s
okta ⏩ skipped - - - - -
keycloak-azure-saml ✅ pass 18 0 0 0 6m 31s
keycloak-azure-saml-crosssite ⏩ skipped - - - - -

Totals: 79 passed · 0 failed · 0 flaky · 0 skipped · duration 19m 38s

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 74%
73.96% (107671/145577) 59.25% (65991/111372) 60.52% (21790/36003)

chirag-madlani and others added 2 commits September 28, 2026 12:39
TaskCreation, TaskDashboardEntity, PersonaFlow, GlossaryP2Tests,
DataQualityDashboard and AuditLogs failed deterministically against main's UI;
back to main with their suppression entries.

Fixes #33087

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 808 → 806
- 0 added, 2 removed, 29 changed spec-list

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/taskActivity.ts
  openmetadata-ui/src/main/resources/ui/src/generated/entity/tasks/task.ts

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/TableClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/TaskClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/base.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/user/UserClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/activityAPI.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/admin.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/apiResponse.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/task.ts
  … and 19 more

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 getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

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

chirag-madlani and others added 2 commits September 28, 2026 14:26
The merge from harshach/debug-merge-queue kept imports that the source branch
appended after code in 10 files. organize-imports then sorted them in place.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…-remaining-pw-batch

# Conflicts:
#	openmetadata-ui/src/main/resources/ui/playwright/eslint-rules/tests/corpus.test.mjs
chirag-madlani and others added 3 commits September 28, 2026 16:46
The source-branch version screenshots a seeded glossary created by
visual-regression.setup.ts, which is not part of this port, so the page 404s
and the header never renders. main's version visits /glossary directly.

Fixes #33087

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…-remaining-pw-batch

# Conflicts:
#	openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/PersonaAIContext.spec.ts
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 805 → 805
- 0 added, 0 removed, 1 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/utils/waitHelpers.ts

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 getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

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

…-remaining-pw-batch

# Conflicts:
#	openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/UserDetails.spec.ts
#	openmetadata-ui/src/main/resources/ui/playwright/eslint-rules/tests/corpus.test.mjs
}).toPass({ timeout: 15000 });
};

export const chooseSelectOption = async (trigger: Locator, option: Locator) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chooseSelectOption is the more reliable of the two select helpers, but now that both exist, a few suggestions:

Why it beats selectOptionWithRetry: callers pass the component's data-testid, which core Select spreads onto the react-aria root div (select.tsx → <AriaSelect {...rest}>). aria-expanded lives on the inner trigger Button, so selectOptionWithRetry's trigger.getAttribute('aria-expanded') is always null. On every retry it re-clicks the trigger, which closes a popover that is still open. The retries alternate open/close and burn the budget. Resolving the nested input[role=combobox] / button[aria-haspopup=listbox] here fixes that, and ArrowDown opens a focused ComboBox reliably where a click does not.

Suggestions:

  1. Call scrollIntoViewAndSettle(control) before opening (the helper directly above). As written, the first attempt can still be closed by react-aria's useCloseOnScroll when Playwright scrolls during actionability; the comment relies on the retry converging. Centering first prevents the close instead of recovering from it.
  2. Lower the option click timeout (line 1968) from 5_000 to ~2_000. When the popover is dismissed mid-click, the option is detached and each attempt waits the full 5s before reopening; 2s (what selectOptionWithRetry uses) recovers faster within the 30s budget.
  3. Two helpers now do the same job. Please migrate the remaining selectOptionWithRetry callers and delete it, here or in a tracked follow-up. e2e/Utils/aiAlertModal.ts:124 passes a custom open, which this helper already covers via the combobox ArrowDown branch.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, agreed on the diagnosis.

  1. Done in 16ecbbf: scrollIntoViewAndSettle(control) runs before each open, so the actionability scroll no longer closes the popover. The retry stays for dismissals from anything else.
  2. Done: option click timeout lowered to 2s.
  3. Proposing a follow-up rather than doing it here: selectOptionWithRetry still has callers in 10 files (pagination, customProperty, lineage and domain utils, plus 5 specs and e2e/Utils/aiAlertModal.ts), all already on main. Moving them in this PR would widen it into specs it doesn't otherwise touch. I'll open a separate PR that migrates them and deletes selectOptionWithRetry. Does that work for you?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update on (3): we've decided not to migrate or delete selectOptionWithRetry, so there won't be a follow-up PR for it. Both helpers stay; (1) and (2) are in 16ecbbf.

* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { APIRequestContext, Page } from '@playwright/test';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixture isn't imported anywhere at the PR head (git grep fixtures/taskPermissions returns nothing). The description lists it under the Tasks batch alongside TaskCreation, but neither TaskCreation.spec.ts nor TaskPermissions.spec.ts is in the diff; it looks like those specs were reset to main in 44cf772 and this file was left behind. Could we drop it, or include the spec that uses it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped in 16ecbbf. You're right: TaskCreation/TaskPermissions were reset to main in 44cf772 and this fixture was left behind. I also re-swept every export this PR adds under playwright/utils|support|constant for callers. This fixture, selectTaskStatusFilter and waitForAriaModalToSettle were the only orphans.

* renders; the option is then permanently unclickable. Clearing the hover first
* and letting the menu finish growing is what makes the choice land.
*/
export const selectTaskStatusFilter = async (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selectTaskStatusFilter has no callers at the PR head. Probably the same cause as the orphaned support/fixtures/taskPermissions.ts (its spec was reset to main). Suggest removing it until a spec needs it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in 16ecbbf (same cause as the taskPermissions fixture).

.getByTestId('tag-' + dataProduct.fullyQualifiedName);
};

export const waitForAriaModalToSettle = async (page: Page) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waitForAriaModalToSettle has no callers at the PR head (the Antd variant below is used; this one isn't). Suggest removing it until a spec needs it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in 16ecbbf. waitForAntdModalToSettle stays, since it has callers.

…SelectOption

- Remove support/fixtures/taskPermissions.ts, selectTaskStatusFilter and
  waitForAriaModalToSettle: their specs were reset to main, so nothing uses them.
- chooseSelectOption centres the control before opening (prevents the
  useCloseOnScroll dismissal instead of recovering from it) and uses a 2s option
  click so a detached option reopens quickly.
- NestedChildrenUpdates.spec.ts: take main's #34157 fix.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
const {
page,
const { apiContext, pipeline, successTimeout = 300_000 } = data;
const startedAfter = await triggerIngestionPipeline(apiContext, pipeline.id);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This drops main's handling of the Airflow 3 deploy/trigger race. Main's version of triggerTestSuitePipelineAndWaitForSuccess (~200 lines) handled three things this 15-line version no longer does:

  1. Rejected trigger: main retried with backoff (1s/2s/3s), then re-deployed and triggered again. triggerIngestionPipeline does a single POST and throws on any non-OK response.
  2. Empty-run race: Airflow 3.x returns 200 for a trigger on a freshly deployed DAG that the dag-processor hasn't serialized yet. The resulting DagRun finishes instantly and writes either no pipelineStatus, or a transient queued one that then vanishes. Main's waitForNewRunToAppear waited up to 60s for a run that had left queued, and re-triggered up to 3 times if none appeared.
  3. Baseline read: main read the previous run before triggering, so the poll could not pick up a stale success.

waitForIngestionResult never re-triggers, so in the race case it either polls the full 300s with "no execution after trigger", or throws Execution … disappeared from pipeline status once the queued run vanishes.

The caller hits exactly this window: IncidentManager.spec.ts:474-483 deploys, then calls this with no delay. When the race hits, the beforeAll fails and takes the whole IncidentManager suite with it. For comparison, main's other deploy-then-trigger path (BundleTestSuiteClass.runIngestionPipeline) at least waits a readiness delay and retries the trigger, so after this change IncidentManager has less protection than either path on main.

It is intermittent, so a green run here doesn't rule it out. Could we keep main's version of this helper (the PR description's own rule: reset to main rather than patch)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. incidentManager.ts is back to main in 54c22fe, so triggerTestSuitePipelineAndWaitForSuccess has the trigger backoff and redeploy, the empty-run re-trigger and the baseline read again.

I also scanned every util this PR changes for functions shrunk to under half of main's size, and reverted two more of the same kind in the same commit:

  • visitObservabilityAlertPage: restored main's retry for a sidebar click that's dispatched but never navigates. The rest of observabilityAlert.ts stays because ObservabilityAlerts.spec uses its new destinationEndpoint option.
  • taskWorkflow.ts: back to main. openTaskEditModal had been cut down to the source branch's task UI, and the Task specs in this PR are main's.

checkAutoPilotStatus stays as the port: it's a deliberate redesign (filters to runs started after this trigger, fails fast on Failure/Exception/Superseded) that the ported AutoPilot.spec depends on.

chirag-madlani and others added 2 commits September 28, 2026 20:40
…ask-modal helpers

Review follow-up. The source-branch versions dropped robustness main relies on:
- incidentManager.ts: triggerTestSuitePipelineAndWaitForSuccess lost the
  Airflow 3 deploy/trigger race handling (trigger backoff + redeploy, empty-run
  re-trigger, baseline read). Back to main.
- visitObservabilityAlertPage: restore main's retry for a sidebar click that is
  dispatched but never navigates.
- taskWorkflow.ts: openTaskEditModal was reduced to the source branch's task UI;
  the Task specs here are main's, so keep main's helper.

Fixes #33087

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
main's taskWorkflow.ts carries existing no-positional-locator violations that
main's baseline suppresses; record them here and update the corpus counts.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 5 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 5 warning(s) across 1 changed file(s).

Count Rule
5 react-hooks/exhaustive-deps
All findings
Location Rule Message
🟡 src/pages/TeamsPage/TeamsPage.tsx:138:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/pages/TeamsPage/TeamsPage.tsx:296:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/pages/TeamsPage/TeamsPage.tsx:537:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchTeamBasicDetails' and 'loadAdvancedDetails'. Either include them or remove the dependency array.
🟡 src/pages/TeamsPage/TeamsPage.tsx:549:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchAllTeamsBasicDetails', 'fqn', and 'hasViewPermission'. Either include them or remove the dependency array.
🟡 src/pages/TeamsPage/TeamsPage.tsx:555:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchAllTeamsAdvancedDetails'. Either include it or remove the dependency array.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-09-28T17:43:30Z)

The entry left the queue before it was built, so no checks ran against it.

…-remaining-pw-batch

# Conflicts:
#	openmetadata-ui/src/main/resources/ui/playwright/eslint-rules/tests/corpus.test.mjs
@gitar-bot

gitar-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 1 closed / 2 findings

🟡 Medium risk · Broad Playwright helper and test updates plus a localized Teams selection behavior fix.

Ports 103 Playwright test files and UI utilities from the clean-merge batch, fixing TeamsPage to only merge fetched teams when IDs match, preventing field carryover between team switches. Consider restoring the GET method check and response status assertion in observabilityAlert.ts to catch API failures early rather than as vague locator timeouts.

💡 Quality: Alerts-list response status no longer asserted; GET filter dropped

📄 openmetadata-ui/src/main/resources/ui/playwright/utils/observabilityAlert.ts:64-74 📄 openmetadata-ui/src/main/resources/ui/playwright/utils/observabilityAlert.ts:90

The old helper checked that the GET /api/v1/events/subscriptions?alertType=Observability response returned 200. The new code only runs await getAlerts, so a 4xx or 5xx from the alerts list now counts as success. The problem then shows up in later steps as a vague locator timeout instead of a clear API failure. The predicate also stopped checking request().method() === 'GET' and the exact pathname, so any request whose URL contains that substring will match, including a POST or a sub-path. Fix: bring back the method check and the status assertion after the retry loop.

Restore the GET filter and the status check
const getAlerts = page.waitForResponse(
  (response) => {
    const url = new URL(response.url());

    return (
      response.request().method() === 'GET' &&
      url.pathname === '/api/v1/events/subscriptions' &&
      url.searchParams.get('alertType') === 'Observability'
    );
  },
  { timeout: 45_000 }
);
// ... retry loop ...
expect((await getAlerts).status()).toBe(200);
✅ 1 closed
✅ Bug: Commit-race test runs against unpatched installed Playwright

📄 openmetadata-ui/src/main/resources/ui/playwright/browser-tests/indexedDbStorage.spec.ts:47-58 📄 openmetadata-ui/src/main/resources/ui/playwright/browser-tests/indexedDbStorage.spec.ts:79-93 📄 openmetadata-ui/src/main/resources/ui/playwright/browser-tests/indexedDbStorage.spec.ts:150-159
The comment at lines 47-50 says the correction is applied in-process, but only the second test uses the patched storageSource. The first test (20 × browser.newContext({ storageState })) and the third test both go through the installed playwright-core restore path. Nothing in the repo calls patchPlaywright: postinstall only runs build-check, and the globalSetup changes were deliberately left out. So the installed copy is stock 1.57.0, which the script says resolves the restore before the transaction commits. The first test therefore exercises the exact race the patch exists to fix, and it will be flaky or fail in the browser-helper lane. The PR description also says this spec was kept back until the patch wiring lands. Either wire patchPlaywright into postinstall or globalSetup before adding this spec, or change the first test to run through the in-process storageSource the way the abort test does.

🤖 Prompt for agents
Code Review: Ports 103 Playwright test files and UI utilities from the clean-merge batch, fixing `TeamsPage` to only merge fetched teams when IDs match, preventing field carryover between team switches. Consider restoring the GET method check and response status assertion in `observabilityAlert.ts` to catch API failures early rather than as vague locator timeouts.

1. 💡 Quality: Alerts-list response status no longer asserted; GET filter dropped
   Files: openmetadata-ui/src/main/resources/ui/playwright/utils/observabilityAlert.ts:64-74, openmetadata-ui/src/main/resources/ui/playwright/utils/observabilityAlert.ts:90

   The old helper checked that the `GET /api/v1/events/subscriptions?alertType=Observability` response returned 200. The new code only runs `await getAlerts`, so a 4xx or 5xx from the alerts list now counts as success. The problem then shows up in later steps as a vague locator timeout instead of a clear API failure. The predicate also stopped checking `request().method() === 'GET'` and the exact pathname, so any request whose URL contains that substring will match, including a POST or a sub-path. Fix: bring back the method check and the status assertion after the retry loop.

   Fix (Restore the GET filter and the status check):
   const getAlerts = page.waitForResponse(
     (response) => {
       const url = new URL(response.url());
   
       return (
         response.request().method() === 'GET' &&
         url.pathname === '/api/v1/events/subscriptions' &&
         url.searchParams.get('alertType') === 'Observability'
       );
     },
     { timeout: 45_000 }
   );
   // ... retry loop ...
   expect((await getAlerts).status()).toBe(200);

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge queue: recover transient artifacts and stabilize recurring E2E failures

4 participants