mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-11 08:30:51 +02:00
* shared admin level test dependency * change to on - push (recommended by chromatic) * change playwright reporter to list, name test jobs * use test tags ... much cleaner * test vs prod * try copying templates * run with localhost? * revert to dev * new tests and a bit of refactoring * add additional checks so that page snapshots reflect loaded state * more admin tests * User Management tests * remaining admin pages * test search and chat * await fix and exclude UI that changes with dates.
20 lines
561 B
TypeScript
20 lines
561 B
TypeScript
import { test, expect } from "@chromatic-com/playwright";
|
|
|
|
test(
|
|
"Admin - User Management - API Keys",
|
|
{
|
|
tag: "@admin",
|
|
},
|
|
async ({ page }, testInfo) => {
|
|
// Test simple loading
|
|
await page.goto("http://localhost:3000/admin/api-key");
|
|
await expect(page.locator("h1.text-3xl")).toHaveText("API Keys");
|
|
await expect(page.locator("p.text-sm")).toHaveText(
|
|
/^API Keys allow you to access Danswer APIs programmatically/
|
|
);
|
|
await expect(
|
|
page.getByRole("button", { name: "Create API Key" })
|
|
).toHaveCount(1);
|
|
}
|
|
);
|