From 72f3ced219ef869bcb4abfd03b690f71c7c6eff2 Mon Sep 17 00:00:00 2001 From: Alessio Gravili Date: Mon, 25 Mar 2024 17:07:55 -0400 Subject: [PATCH] chore: fix incorrect logic in auth test --- test/auth/e2e.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/auth/e2e.spec.ts b/test/auth/e2e.spec.ts index f87d00e9b..430c3ebc9 100644 --- a/test/auth/e2e.spec.ts +++ b/test/auth/e2e.spec.ts @@ -109,11 +109,13 @@ describe('auth', () => { .poll(async () => await apiKeyLocator.inputValue(), { timeout: POLL_TOPASS_TIMEOUT }) .toBeDefined() + const apiKey = await apiKeyLocator.inputValue() + await saveDocAndAssert(page) await expect(async () => { - const apiKey = await apiKeyLocator.inputValue() - expect(await page.locator('#apiKey').inputValue()).toStrictEqual(apiKey) + const apiKeyAfterSave = await apiKeyLocator.inputValue() + expect(apiKey).toStrictEqual(apiKeyAfterSave) }).toPass({ timeout: POLL_TOPASS_TIMEOUT, })