Skip to content

Playwright: ExplorePageRightPanel deleted-owner test flakes because the owner dropdown is opened with a forced click #33187

Closed

Description

@harsh-vador

Affected module

Tests / Playwright E2E

Describe the bug

ExplorePageRightPanel.spec.ts → Overview panel - Deleted entity verification → "Should verify deleted user not visible in owner selection" flakes on PR checks and in the merge queue, failing on the 60s test timeout with a misleading error:

Test timeout of 60000ms exceeded.
Error: locator.waitFor: Target page, context or browser has been closed
Call log:
  - waiting for locator('[data-testid="select-owner-tabs"] [role="tab"]').first() to be visible

  at PageObject/Explore/OverviewPageObject.ts:676
  674 |     await this.editOwnersIcon.click({ force: true });
  675 |
> 676 |     await this.selectOwnerTabsRoleTab.waitFor({ state: 'visible' });

("Target page … has been closed" is the teardown, not the cause — the owner dropdown simply never opened.)

Root cause

verifyDeletedOwnerNotVisible opens the owner dropdown with a forced click:

// eslint-disable-next-line playwright/no-force-option -- element obscured by overlay
await this.editOwnersIcon.click({ force: true });
await this.selectOwnerTabsRoleTab.waitFor({ state: 'visible' });

force: true skips every actionability check — including receives-events, which is exactly the check that waits out the overlay the suppression comment names. The test reaches this line immediately after adminPage.reload(), while the right panel's loader is still mounted, so the click is swallowed by the overlay, the popover never opens, and the unbounded waitFor then hangs for the rest of the test budget.

It is timing-dependent, which is why it is flaky rather than broken: the failing instance is consistently the first entity in the parameterized loop (table). That one runs right after a beforeAll that creates 11 entities in parallel, so the search index is still busy, the preceding waitForDeletionFromSearchIndex poll runs longer, and the loader is still up when the click lands. The same test for every later entity passed in the same shard in 9–21s.

The suppression works around a wait that Playwright would have done correctly on its own.

Same file already has the correct helper

OverviewPageObject.openOwnerSelector() does precisely the right thing and is already used by two other methods:

private async openOwnerSelector(): Promise<void> {
  await this.waitForLoadersToDisappear();
  await this.editOwnersIcon.scrollIntoViewIfNeeded();
  await expect(this.editOwnersIcon).toBeVisible({ timeout: 10_000 });
  await expect(this.editOwnersIcon).toBeEnabled();
  await this.editOwnersIcon.click();
  await expect(this.selectOwnerTabs).toBeVisible({ timeout: 10_000 });
  await expect(this.selectOwnerTabsRoleTab).toBeVisible({ timeout: 10_000 });
}

git log -S shows both the helper and the forced click arrived in the same PR — #30699 (2026-07-30, "batch seven queued flaky-spec stabilizations"). That PR built the hardened opener for some call sites and reached for force: true on this one instead of reusing it. addOwnerWithoutValidation bypasses it too, with a plain click and the same missing loader wait.

To Reproduce

Observed in merge-queue run https://github.com/open-metadata/OpenMetadata/actions/runs/34496835634 (shard chromium-17), failing on the first attempt and on retry #1; 167 other tests in the shard passed.

Expected behavior

Opening the owner dropdown waits for the panel loader to clear and for the trigger to actually receive the click, and fails within a bounded 10s assertion naming the missing element if it does not — rather than hanging to the 60s test timeout with "browser has been closed".

Additional context

This test family has been patched once before for a different cause — #31909 added waitForDeletionFromSearchIndex to gate on search-index consistency. That gate is correct and is not what fails here; the poll completes and the failure is downstream of it.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions