From 1c39dbad3df0d9db6c543d3df0dd45ab8a4e065f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Thu, 7 Mar 2024 12:14:06 -0700 Subject: [PATCH] fix: avatar upload flakyness (#14021) --- apps/web/playwright/settings/upload-avatar.e2e.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/web/playwright/settings/upload-avatar.e2e.ts b/apps/web/playwright/settings/upload-avatar.e2e.ts index 191dfd476a..607432e999 100644 --- a/apps/web/playwright/settings/upload-avatar.e2e.ts +++ b/apps/web/playwright/settings/upload-avatar.e2e.ts @@ -40,10 +40,8 @@ test.describe("UploadAvatar", async () => { }, }); - // todo: remove this; ideally the organization-avatar is updated the moment - // 'Settings updated succesfully' is saved. - await page.waitForLoadState("networkidle"); - const avatar = page.getByTestId("profile-upload-avatar").locator("img"); + // Wait for the avatar image with the http src to appear instead of the data uri + const avatar = page.getByTestId("profile-upload-avatar").locator("img[src^=http]"); const src = await avatar.getAttribute("src");