-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6eb6e49
commit bc235e1
Showing
5 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
); |