Skip to content

Commit

Permalink
E2E: ensure input boxes are visible before filling in auth (#4798)
Browse files Browse the repository at this point in the history
  • Loading branch information
abeatrix authored Jul 5, 2024
1 parent 6b5032a commit c2a15de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vscode/test/e2e/chat-history.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ test.extend<ExpectedV2Events>({

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')

Expand Down
3 changes: 3 additions & 0 deletions vscode/test/e2e/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit c2a15de

Please sign in to comment.