mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
test: comprehensive GUI settings E2E including API Keys tab and full RBAC coverage
This commit is contained in:
@@ -39,6 +39,35 @@ test.describe("GUI Settings - Tools Tab", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test.describe("GUI Settings - Tools Tab (additional)", () => {
|
||||
test("each category has a heading", async ({ loggedInPage: page }) => {
|
||||
await page.locator("aside").getByText("Settings").click();
|
||||
await page.getByRole("button", { name: /tools/i }).click();
|
||||
|
||||
await expect(page.locator("h3").filter({ hasText: "Tools" }).first()).toBeVisible();
|
||||
// Wait for tools to finish loading
|
||||
await expect(page.getByText(/\d+ tools? disabled/)).toBeVisible({ timeout: 5_000 });
|
||||
|
||||
// Category headings are h4 elements inside the dialog content
|
||||
const dialogContent = page.locator(".flex-1.overflow-y-auto");
|
||||
const headings = dialogContent.locator("h4");
|
||||
const count = await headings.count();
|
||||
expect(count).toBeGreaterThanOrEqual(3);
|
||||
});
|
||||
|
||||
test("tools show both name and description", async ({ loggedInPage: page }) => {
|
||||
await page.locator("aside").getByText("Settings").click();
|
||||
await page.getByRole("button", { name: /tools/i }).click();
|
||||
|
||||
// Wait for tools to load
|
||||
await expect(page.getByText(/\d+ tools? disabled/)).toBeVisible({ timeout: 5_000 });
|
||||
|
||||
// Verify the Resize tool is listed with its description
|
||||
const dialogContent = page.locator(".flex-1.overflow-y-auto");
|
||||
await expect(dialogContent.getByText("Resize").first()).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
test.describe("GUI Settings - Product Analytics Tab", () => {
|
||||
test("displays analytics consent section", async ({ loggedInPage: page }) => {
|
||||
await page.locator("aside").getByText("Settings").click();
|
||||
|
||||
Reference in New Issue
Block a user