Skip to content

Commit

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

test(
"Admin - Performance - Custom Analytics",
{
tag: "@admin",
},
async ({ page }, testInfo) => {
// Test simple loading
await page.goto("http://localhost:3000/admin/performance/custom-analytics");
await expect(page.locator("h1.text-3xl")).toHaveText("Custom Analytics");
await expect(page.locator("div.font-medium").nth(0)).toHaveText(
"Custom Analytics is not enabled."
);
}
);
14 changes: 14 additions & 0 deletions web/tests/e2e/admin_performance_query_history.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { test, expect } from "@chromatic-com/playwright";

test(
"Admin - Performance - Query History",
{
tag: "@admin",
},
async ({ page }, testInfo) => {
// Test simple loading
await page.goto("http://localhost:3000/admin/performance/query-history");
await expect(page.locator("h1.text-3xl")).toHaveText("Query History");
await expect(page.locator("p.text-sm").nth(0)).toHaveText("Feedback Type");
}
);
15 changes: 15 additions & 0 deletions web/tests/e2e/admin_performance_usage.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { test, expect } from "@chromatic-com/playwright";

test(
"Admin - Performance - Usage Statistics",
{
tag: "@admin",
},
async ({ page }, testInfo) => {
// Test simple loading
await page.goto("http://localhost:3000/admin/performance/usage");
await expect(page.locator("h1.text-3xl")).toHaveText("Usage Statistics");
await expect(page.locator("h1.text-lg").nth(0)).toHaveText("Usage");
await expect(page.locator("h1.text-lg").nth(1)).toHaveText("Feedback");
}
);
19 changes: 19 additions & 0 deletions web/tests/e2e/admin_settings.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { test, expect } from "@chromatic-com/playwright";

test(
"Admin - Settings - Workspace Settings",
{
tag: "@admin",
},
async ({ page }, testInfo) => {
// Test simple loading
await page.goto("http://localhost:3000/admin/settings");
await expect(page.locator("h1.text-3xl")).toHaveText("Workspace Settings");
await expect(page.locator("p.text-sm").nth(0)).toHaveText(
/^Manage general Danswer settings applicable to all users in the workspace./
);
await expect(
page.getByRole("button", { name: "Set Retention Limit" })
).toHaveCount(1);
}
);
18 changes: 18 additions & 0 deletions web/tests/e2e/admin_whitelabeling.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { test, expect } from "@chromatic-com/playwright";

test(
"Admin - Performance - Whitelabeling",
{
tag: "@admin",
},
async ({ page }, testInfo) => {
// Test simple loading
await page.goto("http://localhost:3000/admin/whitelabeling");
await expect(page.locator("h1.text-3xl")).toHaveText("Whitelabeling");
await expect(page.locator("div.block").nth(0)).toHaveText(
"Application Name"
);
await expect(page.locator("div.block").nth(1)).toHaveText("Custom Logo");
await expect(page.getByRole("button", { name: "Update" })).toHaveCount(1);
}
);

0 comments on commit bc235e1

Please sign in to comment.