chore: fix incorrect logic in auth test

This commit is contained in:
Alessio Gravili
2024-03-25 17:07:55 -04:00
parent 74de066529
commit 72f3ced219

View File

@@ -109,11 +109,13 @@ describe('auth', () => {
.poll(async () => await apiKeyLocator.inputValue(), { timeout: POLL_TOPASS_TIMEOUT }) .poll(async () => await apiKeyLocator.inputValue(), { timeout: POLL_TOPASS_TIMEOUT })
.toBeDefined() .toBeDefined()
const apiKey = await apiKeyLocator.inputValue()
await saveDocAndAssert(page) await saveDocAndAssert(page)
await expect(async () => { await expect(async () => {
const apiKey = await apiKeyLocator.inputValue() const apiKeyAfterSave = await apiKeyLocator.inputValue()
expect(await page.locator('#apiKey').inputValue()).toStrictEqual(apiKey) expect(apiKey).toStrictEqual(apiKeyAfterSave)
}).toPass({ }).toPass({
timeout: POLL_TOPASS_TIMEOUT, timeout: POLL_TOPASS_TIMEOUT,
}) })