From 1adc85f8268d5d17da513ce7b90995afec64fea1 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Wed, 10 Jan 2024 19:03:41 +0530 Subject: [PATCH] fix: wait for dropdown to appear before clicking --- tests/user.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/user.ts b/tests/user.ts index 1b79453..21bf2cf 100644 --- a/tests/user.ts +++ b/tests/user.ts @@ -41,6 +41,7 @@ export default class User { let dropdown = page.locator("div.dropdown:nth-child(4)"); await dropdown.click(); // await dropdown.getByRole("link", { name: "Sign Out" }).click(); + await dropdown.getByText("Sign Out").waitFor(); await dropdown.getByText("Sign Out").click(); await page.waitForURL(config.INSTANCE_URL.toString());