Skip to content

Commit ed7f327

Browse files
fix(playwright): stabilise Entity.spec.ts deny-access tests against CI timeout flakiness (#29560)
The deny-access tests that use the `dataConsumerPage` fixture were missing `test.slow(true)`, causing them to flake under CI load. The fixture's fresh login plus `visitEntityPage`'s search-response wait together routinely exceeded the 60 s test timeout when multiple entity suites ran in parallel, producing an opaque "Target page, context or browser has been closed" error at entity.ts:77. - Added `test.slow(true)` (180 s budget) to the two affected tests: `User should be denied access to edit description` (all 16 entities) and `Data Consumer should be denied access to queries/sample data` (Table entity). - Added `{ timeout: 30000 }` to `page.waitForResponse` in `visitEntityPage` so future failures produce a clear timeout error instead of the opaque page-closed message. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 496a7e6 commit ed7f327

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Entity.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,6 +2174,8 @@ Object.entries(entities).forEach(([key, EntityClass]) => {
21742174
test('User should be denied access to edit description when deny policy rule is applied on an entity', async ({
21752175
dataConsumerPage,
21762176
}) => {
2177+
test.slow(true);
2178+
21772179
await entity.visitEntityPage(dataConsumerPage);
21782180

21792181
await expect(
@@ -2307,6 +2309,8 @@ Object.entries(entities).forEach(([key, EntityClass]) => {
23072309
test('Data Consumer should be denied access to queries and sample data tabs when deny policy rule is applied on table level', async ({
23082310
dataConsumerPage,
23092311
}) => {
2312+
test.slow(true);
2313+
23102314
await tableEntity.visitEntityPage(dataConsumerPage);
23112315

23122316
await dataConsumerPage

openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ export const visitEntityPage = async (data: {
7878
(response) =>
7979
response.url().includes('/api/v1/search/query') &&
8080
response.url().includes('index=dataAsset') &&
81-
response.url().includes('exclude_source_fields')
81+
response.url().includes('exclude_source_fields'),
82+
{ timeout: 30000 }
8283
);
8384
await page.getByTestId('searchBox').fill(searchTerm);
8485
await searchResponse;

0 commit comments

Comments
 (0)