Skip to content

Commit

Permalink
test search and chat
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuo-danswer committed Nov 21, 2024
1 parent bc235e1 commit e108125
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions web/tests/e2e/chat.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { test, expect } from "@chromatic-com/playwright";

test(
"Chat",
{
tag: "@admin",
},
async ({ page }, testInfo) => {
// Test simple loading
await page.goto("http://localhost:3000/chat");
await expect(page.locator("div.text-2xl").nth(0)).toHaveText("General");
await expect(page.getByRole("button", { name: "Search S" })).toHaveClass(
/text-text-application-untoggled/
);
await expect(page.getByRole("button", { name: "Chat D" })).toHaveClass(
/text-text-application-toggled/
);
}
);
19 changes: 19 additions & 0 deletions web/tests/e2e/search.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { test, expect } from "@chromatic-com/playwright";

test(
"Search",
{
tag: "@admin",
},
async ({ page }, testInfo) => {
// Test simple loading
await page.goto("http://localhost:3000/search");
await expect(page.locator("div.text-3xl")).toHaveText("Unlock Knowledge");
await expect(page.getByRole("button", { name: "Search S" })).toHaveClass(
/text-text-application-toggled/
);
await expect(page.getByRole("button", { name: "Chat D" })).toHaveClass(
/text-text-application-untoggled/
);
}
);

0 comments on commit e108125

Please sign in to comment.