From c2a15de75bcdd1e74c7f71549ccd35d9e874f1cb Mon Sep 17 00:00:00 2001 From: Beatrix <68532117+abeatrix@users.noreply.github.com> Date: Fri, 5 Jul 2024 13:57:02 -0700 Subject: [PATCH] E2E: ensure input boxes are visible before filling in auth (#4798) --- vscode/test/e2e/chat-history.test.ts | 3 +++ vscode/test/e2e/common.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/vscode/test/e2e/chat-history.test.ts b/vscode/test/e2e/chat-history.test.ts index 24e08e718ee..7cced41a8ff 100644 --- a/vscode/test/e2e/chat-history.test.ts +++ b/vscode/test/e2e/chat-history.test.ts @@ -26,6 +26,9 @@ test.extend({ const [chatPanelFrame, chatInput] = await createEmptyChatPanel(page) + // Ensure the chat view is ready before we start typing + await expect(chatPanelFrame.getByText('to add context to your chat')).toBeVisible() + await chatInput.fill('Hey') await chatInput.press('Enter') diff --git a/vscode/test/e2e/common.ts b/vscode/test/e2e/common.ts index 25651246ee8..059b4ad8097 100644 --- a/vscode/test/e2e/common.ts +++ b/vscode/test/e2e/common.ts @@ -15,8 +15,11 @@ export const sidebarSignin = async ( await focusSidebar(page) await sidebar.getByRole('button', { name: 'Sign In to Your Enterprise Instance' }).click() await page.getByRole('option', { name: 'Sign In with URL and Access Token' }).click() + // Ensure the correct input box has showed up before we start filling in the forms. + await expect(page.getByText('Enter the URL of the')).toBeVisible() await page.getByRole('combobox', { name: 'input' }).fill(SERVER_URL) await page.getByRole('combobox', { name: 'input' }).press('Enter') + await expect(page.getByText('Paste your access token')).toBeVisible() await page.getByRole('combobox', { name: 'input' }).fill(VALID_TOKEN) await page.getByRole('combobox', { name: 'input' }).press('Enter')