From aaf1154f9e41b32b3b5f982583b075541fc1f996 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Thu, 12 Dec 2024 20:56:16 -0600 Subject: [PATCH] add extra assert for instance create with additional disks test flake --- test/e2e/instance-create.e2e.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/e2e/instance-create.e2e.ts b/test/e2e/instance-create.e2e.ts index c4378174d..a726a0070 100644 --- a/test/e2e/instance-create.e2e.ts +++ b/test/e2e/instance-create.e2e.ts @@ -544,10 +544,17 @@ test('create instance with additional disks', async ({ page }) => { await page.getByRole('button', { name: 'Create new disk' }).click() const createForm = page.getByRole('dialog', { name: 'Create disk' }) + await expect(createForm).toBeVisible() // kill time to help size field flake? // verify that an existing name can't be used await createForm.getByRole('textbox', { name: 'Name', exact: true }).fill('disk-6') - await createForm.getByRole('textbox', { name: 'Size (GiB)' }).fill('5') + + // this fill fails to happen sometimes, causing test flakes. the assert here + // should catch it slightly sooner + const sizeField = createForm.getByRole('textbox', { name: 'Size (GiB)' }) + await sizeField.fill('5') + await expect(sizeField).toHaveValue('5') + await createForm.getByRole('button', { name: 'Create disk' }).click() await expect(createForm.getByText('Name is already in use')).toBeVisible()