From 1ae88085f3edcbd54bfae521b6d857d807969686 Mon Sep 17 00:00:00 2001 From: eth3lbert Date: Mon, 30 Dec 2024 02:42:01 +0800 Subject: [PATCH] e2e/acceptance/versions: Fix potential flaky test case (#10277) Wait before calling `evaluateAll()` to ensure all rows are available. --- e2e/acceptance/versions.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e/acceptance/versions.spec.ts b/e2e/acceptance/versions.spec.ts index 36cc153dfe1..f3001f47a17 100644 --- a/e2e/acceptance/versions.spec.ts +++ b/e2e/acceptance/versions.spec.ts @@ -13,6 +13,7 @@ test.describe('Acceptance | crate versions page', { tag: '@acceptance' }, () => await page.goto('/crates/nanomsg/versions'); await expect(page).toHaveURL('/crates/nanomsg/versions'); + await expect(page.locator('[data-test-version]')).toHaveCount(4); let versions = await page.locator('[data-test-version]').evaluateAll(el => el.map(it => it.dataset.testVersion)); expect(versions).toEqual(['0.2.1', '0.3.0', '0.2.0', '0.1.0']);