danswer/web/tests/e2e/admin_api_key.spec.ts
2024-12-13 09:56:10 -08:00

20 lines
558 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 Onyx APIs programmatically/
);
await expect(
page.getByRole("button", { name: "Create API Key" })
).toHaveCount(1);
}
);