mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 19:18:05 +00:00
playwright: fixed incident manager flaky test (#23367)
* playwright: fixed incident manager flaky test * revert change
This commit is contained in:
parent
11a719e611
commit
2e134b2cfe
@ -135,8 +135,22 @@ test.describe('Incident Manager', PLAYWRIGHT_INGESTION_TAG_OBJ, () => {
|
||||
);
|
||||
await page.click('[data-testid="incident"]');
|
||||
await incidentDetails;
|
||||
await page.waitForSelector('[data-testid="loader"]', {
|
||||
state: 'detached',
|
||||
});
|
||||
|
||||
await page.waitForSelector('.ant-skeleton-content', {
|
||||
state: 'detached',
|
||||
});
|
||||
|
||||
await page.locator('role=button[name="down"]').scrollIntoViewIfNeeded();
|
||||
await page.waitForSelector('role=button[name="down"]', {
|
||||
state: 'visible',
|
||||
});
|
||||
|
||||
await page.getByRole('button', { name: 'down' }).click();
|
||||
// there is no API call to wait for here, so adding a small timeout
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForSelector('role=menuitem[name="Reassign"]', {
|
||||
state: 'visible',
|
||||
});
|
||||
|
||||
@ -67,11 +67,22 @@ export const assignIncident = async (data: {
|
||||
await page.click('[data-testid="test-case-resolution-status-type"]');
|
||||
await page.click('[title="Assigned"]');
|
||||
await page.waitForSelector('#testCaseResolutionStatusDetails_assignee');
|
||||
await page.click('#testCaseResolutionStatusDetails_assignee');
|
||||
await page
|
||||
.locator(
|
||||
'.ant-select-dropdown #testCaseResolutionStatusDetails_assignee_list + .rc-virtual-list'
|
||||
)
|
||||
.waitFor({ state: 'visible' });
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
const searchUserResponse = page.waitForResponse(
|
||||
'api/v1/search/query?q=*&index=user_search_index*'
|
||||
);
|
||||
await page.fill(
|
||||
'#testCaseResolutionStatusDetails_assignee',
|
||||
user.displayName
|
||||
);
|
||||
await page.waitForResponse('/api/v1/search/query?q=*');
|
||||
await searchUserResponse;
|
||||
await page.click(`[data-testid="${user.name.toLocaleLowerCase()}"]`);
|
||||
const updateIncident = page.waitForResponse(
|
||||
'/api/v1/dataQuality/testCases/testCaseIncidentStatus'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user