diff --git a/tests/playwright/pages/Dashboard/index.ts b/tests/playwright/pages/Dashboard/index.ts index 635ca8f546..31ff8a9fa7 100644 --- a/tests/playwright/pages/Dashboard/index.ts +++ b/tests/playwright/pages/Dashboard/index.ts @@ -214,12 +214,13 @@ export class DashboardPage extends BasePage { } async closeAllTabs() { + await this.tabBar.locator(`.ant-tabs-tab`).waitFor({ state: 'visible' }); const tab = await this.tabBar.locator(`.ant-tabs-tab`); const tabCount = await tab.count(); for (let i = 0; i < tabCount; i++) { await tab.nth(i).locator('button.ant-tabs-tab-remove').click(); - await this.rootPage.waitForTimeout(200); + await tab.nth(i).waitFor({ state: 'detached' }); } } }