Create ollama e2e test (#296)
This commit is contained in:
@@ -73,6 +73,13 @@ class PageObject {
|
||||
await this.page.getByText("test-model").click();
|
||||
}
|
||||
|
||||
async selectTestOllamaModel() {
|
||||
await this.page.getByRole("button", { name: "Model: Auto" }).click();
|
||||
await this.page.getByText("Local models").click();
|
||||
await this.page.getByText("Ollama", { exact: true }).click();
|
||||
await this.page.getByText("Testollama", { exact: true }).click();
|
||||
}
|
||||
|
||||
async setUpTestProvider() {
|
||||
await this.page.getByText("Add custom providerConnect to").click();
|
||||
// Fill out provider dialog
|
||||
@@ -201,6 +208,7 @@ export const test = base.extend<{
|
||||
const latestBuild = findLatestBuild();
|
||||
// parse the directory and find paths and other info
|
||||
const appInfo = parseElectronApp(latestBuild);
|
||||
process.env.OLLAMA_HOST = "http://localhost:3500/ollama";
|
||||
process.env.E2E_TEST_BUILD = "true";
|
||||
// This is just a hack to avoid the AI setup screen.
|
||||
process.env.OPENAI_API_KEY = "sk-test";
|
||||
|
||||
7
e2e-tests/ollama.spec.ts
Normal file
7
e2e-tests/ollama.spec.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { test } from "./helpers/test_helper";
|
||||
|
||||
test("send message to ollama", async ({ po }) => {
|
||||
await po.selectTestOllamaModel();
|
||||
await po.sendPrompt("hi");
|
||||
await po.snapshotMessages();
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
- paragraph: hi
|
||||
- paragraph: ollamachunkollamachunk
|
||||
- button "Retry":
|
||||
- img
|
||||
Reference in New Issue
Block a user