PLAYWRIGHT: fix subdomain playwright failure (#23057)

* fix subdomain playwright failure

* slow the beforALL

* slow the afterALL

* remove subdomain delete operation since we will deleteing the main one

(cherry picked from commit 9db2730f42b1ab3e9985206751a869628975a5bf)
This commit is contained in:
Ashish Gupta 2025-08-25 14:47:58 +05:30 committed by OpenMetadata Release Bot
parent 4868decc3b
commit 7d2fe2ddf7

View File

@ -32,12 +32,12 @@ test.describe('SubDomain Pagination', () => {
test.slow(true);
test.beforeAll('Setup domain and subdomains', async ({ browser }) => {
const { page, apiContext, afterAction } = await createNewPage(browser);
test.slow(true);
const { apiContext, afterAction } = await createNewPage(browser);
await domain.create(apiContext);
await redirectToHomePage(page);
const createPromises = [];
for (let i = 1; i <= SUBDOMAIN_COUNT; i++) {
const subDomain = new SubDomain(
@ -55,15 +55,7 @@ test.describe('SubDomain Pagination', () => {
test.afterAll('Cleanup', async ({ browser }) => {
const { apiContext, afterAction } = await createNewPage(browser);
// Delete all subdomains in parallel
const deletePromises = subDomains.map((subDomain) =>
subDomain.delete(apiContext)
);
await Promise.all(deletePromises);
await domain.delete(apiContext);
await afterAction();
});