fix e2e tests

This commit is contained in:
Nate 2025-02-26 02:20:44 -08:00
parent 12ae0ee911
commit d9e5e7dfe1
2 changed files with 38 additions and 34 deletions

View file

@ -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", () => {

View file

@ -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",