mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-13 08:37:03 +00:00
Fix : Delete user playwright test (#20399)
* fix delete user playwright test * alert fix for failing test
This commit is contained in:
parent
801788072e
commit
6773e015fa
@ -196,13 +196,18 @@ export const hardDeleteUserProfilePage = async (
|
|||||||
await page.check('[data-testid="hard-delete"]');
|
await page.check('[data-testid="hard-delete"]');
|
||||||
await page.fill('[data-testid="confirmation-text-input"]', 'DELETE');
|
await page.fill('[data-testid="confirmation-text-input"]', 'DELETE');
|
||||||
|
|
||||||
|
const toastPromises = [
|
||||||
|
page.waitForSelector('[data-testid="alert-bar"]'),
|
||||||
|
page.waitForSelector('[data-testid="alert-icon"]'),
|
||||||
|
page.waitForSelector('[data-testid="alert-icon-close"]'),
|
||||||
|
];
|
||||||
const deleteResponse = page.waitForResponse(
|
const deleteResponse = page.waitForResponse(
|
||||||
'/api/v1/users/*?hardDelete=true&recursive=true'
|
'/api/v1/users/*?hardDelete=true&recursive=true'
|
||||||
);
|
);
|
||||||
await page.click('[data-testid="confirm-button"]');
|
await page.click('[data-testid="confirm-button"]');
|
||||||
|
|
||||||
await deleteResponse;
|
// Wait for both the delete response and all toast elements to appear
|
||||||
|
await Promise.all([deleteResponse, ...toastPromises]);
|
||||||
await toastNotification(page, /deleted successfully!/);
|
await toastNotification(page, /deleted successfully!/);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user