From d9e5e7dfe1ef67f873f29f0f89171064fe35602a Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 26 Feb 2025 02:20:44 -0800 Subject: [PATCH] fix e2e tests --- extensions/vscode/e2e/tests/GUI.test.ts | 70 +++++++++++++------------ extensions/vscode/package-lock.json | 2 +- 2 files changed, 38 insertions(+), 34 deletions(-) diff --git a/extensions/vscode/e2e/tests/GUI.test.ts b/extensions/vscode/e2e/tests/GUI.test.ts index 4369a917f..14bb95d32 100644 --- a/extensions/vscode/e2e/tests/GUI.test.ts +++ b/extensions/vscode/e2e/tests/GUI.test.ts @@ -51,48 +51,52 @@ describe("GUI Test", () => { const description = await GUISelectors.getDescription(view); expect(await description.getText()).has.string( - "Quickly get up and running using our API keys.", + "Log in to quickly build your first custom AI code assistant", ); }).timeout(DEFAULT_TIMEOUT.XL); - it("should display tutorial card after accepting onboarding quick start", async () => { - // Get paragraph with text Best - const bestTab = await GUISelectors.getOnboardingTabButton(view, "Best"); - await bestTab.click(); + // We no longer have a quick start button + it.skip( + "should display tutorial card after accepting onboarding quick start", + async () => { + // Get paragraph with text Best + const bestTab = await GUISelectors.getOnboardingTabButton(view, "Best"); + await bestTab.click(); - const anthropicInput = await TestUtils.waitForSuccess( - async () => await GUISelectors.getBestChatApiKeyInput(view), - ); - anthropicInput.sendKeys("invalid_api_key"); + const anthropicInput = await TestUtils.waitForSuccess( + async () => await GUISelectors.getBestChatApiKeyInput(view), + ); + anthropicInput.sendKeys("invalid_api_key"); - const mistralInput = - await GUISelectors.getBestAutocompleteApiKeyInput(view); - mistralInput.sendKeys("invalid_api_key"); + const mistralInput = + await GUISelectors.getBestAutocompleteApiKeyInput(view); + mistralInput.sendKeys("invalid_api_key"); - // Get button with text "Connect" and click it - const connectButton = await view.findWebElement( - By.xpath("//button[text()='Connect']"), - ); - await connectButton.click(); + // Get button with text "Connect" and click it + const connectButton = await view.findWebElement( + By.xpath("//button[text()='Connect']"), + ); + await connectButton.click(); - await TestUtils.waitForSuccess( - async () => await GUISelectors.getTutorialCard(view), - ); + await TestUtils.waitForSuccess( + async () => await GUISelectors.getTutorialCard(view), + ); - // TODO validate that claude has been added to list + // TODO validate that claude has been added to list - // Skip testing Quick Start because github auth opens external app and breaks test - // const quickStartButton = await view.findWebElement( - // By.xpath("//*[contains(text(), 'Get started using our API keys')]") - // ); - // await quickStartButton.click(); - // await view.switchBack(); - // const allowButton = await TestUtils.waitForSuccess( - // async () => await driver.findElement(By.xpath(`//a[contains(text(), "Allow")]`)) - // ); - // await allowButton.click(); - // ({ view, driver } = await GUIActions.switchToReactIframe()); - }).timeout(DEFAULT_TIMEOUT.XL); + // Skip testing Quick Start because github auth opens external app and breaks test + // const quickStartButton = await view.findWebElement( + // By.xpath("//*[contains(text(), 'Get started using our API keys')]") + // ); + // await quickStartButton.click(); + // await view.switchBack(); + // const allowButton = await TestUtils.waitForSuccess( + // async () => await driver.findElement(By.xpath(`//a[contains(text(), "Allow")]`)) + // ); + // await allowButton.click(); + // ({ view, driver } = await GUIActions.switchToReactIframe()); + }, + ).timeout(DEFAULT_TIMEOUT.XL); }); describe("Chat", () => { diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index fb99d78fc..6cf41cadf 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -106,7 +106,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.51", + "@continuedev/config-yaml": "^1.0.52", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10",