Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4676b18173 |
No files matched your search
@@ -3,6 +3,7 @@ import { describe, test } from "vitest";
|
|||||||
|
|
||||||
import { createHomarrContainer } from "./shared/create-homarr-container";
|
import { createHomarrContainer } from "./shared/create-homarr-container";
|
||||||
import { createSqliteDbFileAsync } from "./shared/e2e-db";
|
import { createSqliteDbFileAsync } from "./shared/e2e-db";
|
||||||
|
import { loginAsync } from "./shared/login";
|
||||||
import { seedAdminUserAsync } from "./shared/seed-admin-user";
|
import { seedAdminUserAsync } from "./shared/seed-admin-user";
|
||||||
import * as sqliteSchema from "../packages/db/schema/sqlite";
|
import * as sqliteSchema from "../packages/db/schema/sqlite";
|
||||||
|
|
||||||
@@ -40,13 +41,7 @@ describe("Assistant management", () => {
|
|||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await page.goto(`${baseUrl}/auth/login`);
|
await loginAsync({ page, baseUrl, credentials: adminCredentials, destination: "/manage/assistant" });
|
||||||
await page.getByLabel("Username").fill(adminCredentials.username);
|
|
||||||
await page.locator("#password").fill(adminCredentials.password);
|
|
||||||
await page.getByRole("button", { name: "Login" }).click();
|
|
||||||
await expect(page).not.toHaveURL(/\/auth\/login/, { timeout: 30_000 });
|
|
||||||
|
|
||||||
await page.goto(`${baseUrl}/manage/assistant`);
|
|
||||||
await expect(page.getByRole("heading", { name: "Assistant" })).toBeVisible();
|
await expect(page.getByRole("heading", { name: "Assistant" })).toBeVisible();
|
||||||
await expect(page.getByText("Connection ready")).toBeVisible();
|
await expect(page.getByText("Connection ready")).toBeVisible();
|
||||||
await expect(page.getByText("Encrypted API key saved")).toBeVisible();
|
await expect(page.getByText("Encrypted API key saved")).toBeVisible();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { describe, test } from "vitest";
|
|||||||
import * as sqliteSchema from "../packages/db/schema/sqlite";
|
import * as sqliteSchema from "../packages/db/schema/sqlite";
|
||||||
import { createHomarrContainer } from "./shared/create-homarr-container";
|
import { createHomarrContainer } from "./shared/create-homarr-container";
|
||||||
import { createSqliteDbFileAsync } from "./shared/e2e-db";
|
import { createSqliteDbFileAsync } from "./shared/e2e-db";
|
||||||
|
import { loginAsync } from "./shared/login";
|
||||||
import { seedAdminUserAsync } from "./shared/seed-admin-user";
|
import { seedAdminUserAsync } from "./shared/seed-admin-user";
|
||||||
|
|
||||||
const adminCredentials = {
|
const adminCredentials = {
|
||||||
@@ -116,15 +117,7 @@ describe("lazy widget application graph", () => {
|
|||||||
let releaseRefresh: (() => void) | undefined;
|
let releaseRefresh: (() => void) | undefined;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await page.goto(`${baseUrl}/auth/login`);
|
await loginAsync({ page, baseUrl, credentials: adminCredentials });
|
||||||
await page.getByLabel("Username").fill(adminCredentials.username);
|
|
||||||
await page.locator("#password").fill(adminCredentials.password);
|
|
||||||
const signedIn = page.waitForURL((url) => url.origin === baseUrl && url.pathname === "/", {
|
|
||||||
waitUntil: "commit",
|
|
||||||
timeout: 60_000,
|
|
||||||
});
|
|
||||||
await page.locator("css=button[type='submit']").click();
|
|
||||||
await signedIn;
|
|
||||||
|
|
||||||
const visibleBoard = page.locator("[data-homarr-dev-benchmark-board]").filter({ visible: true }).first();
|
const visibleBoard = page.locator("[data-homarr-dev-benchmark-board]").filter({ visible: true }).first();
|
||||||
await expect(visibleBoard).toBeVisible({ timeout: 30_000 });
|
await expect(visibleBoard).toBeVisible({ timeout: 30_000 });
|
||||||
|
|||||||
Reference in new issue
Block a user