From 830b3536425e307df885f3e40ea66fb0cc06f266 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Thu, 5 Sep 2024 13:42:13 -0500 Subject: [PATCH] try to reduce flake in the image upload tests --- app/forms/image-upload.tsx | 6 +++++- test/e2e/image-upload.e2e.ts | 16 ++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/app/forms/image-upload.tsx b/app/forms/image-upload.tsx index a60ea16cee..1f584e8fce 100644 --- a/app/forms/image-upload.tsx +++ b/app/forms/image-upload.tsx @@ -101,7 +101,11 @@ function Step({ children, state, label, className }: StepProps) { /* eslint-enable react/jsx-key */ return ( // data-status used only for e2e testing -
+
{/* padding on icon to align it with text since everything is aligned to top */}
{icon}
{ await page.click('role=button[name="Upload image"]') - const steps = page.locator('div[data-status]') - - for (const step of await steps.all()) { - await expect(step).toHaveAttribute('data-status', 'ready') - } - const step = page.locator('[data-status]').filter({ hasText: stepText }).first() await expect(step).toHaveAttribute('data-status', 'error', { timeout: 15000 }) await expectVisible(page, [