Răsfoiți Sursa

retry to keypress until PageCreateModal is shown

Yuki Takei 3 luni în urmă
părinte
comite
d1194f49fa
1 a modificat fișierele cu 6 adăugiri și 2 ștergeri
  1. 6 2
      apps/app/playwright/23-editor/saving.spec.ts

+ 6 - 2
apps/app/playwright/23-editor/saving.spec.ts

@@ -14,8 +14,12 @@ test('Successfully create page under specific path', async ({ page }) => {
 
   await page.goto('/Sandbox');
 
-  await page.keyboard.press(openPageCreateModalShortcutKey);
-  await expect(page.getByTestId('page-create-modal')).toBeVisible();
+  await expect(async () => {
+    await page.keyboard.press(openPageCreateModalShortcutKey);
+    await expect(page.getByTestId('page-create-modal')).toBeVisible({
+      timeout: 1000,
+    });
+  }).toPass();
   page
     .getByTestId('page-create-modal')
     .locator('.rbt-input-main')