Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions e2e/helpers/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const login = async (page: Page, user: typeof users.$inferSelect, redirec

await page.getByLabel("Work email").fill(user.email);
await page.getByRole("button", { name: "Log in", exact: true }).click();

await expect(page.getByText(/sent.*code/iu)).toBeVisible({ timeout: 60000 });
await fillOtp(page);

await page.waitForURL(/^(?!.*\/login).*/u);
Expand Down
6 changes: 5 additions & 1 deletion e2e/tests/settings/administrator/workspace.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ import { expect, test } from "@test/index";
import { eq } from "drizzle-orm";
import { companies } from "@/db/schema";

test.describe("Workspace settings", () => {
test.describe.serial("Workspace settings", () => {
test.describe.configure({ retries: 2 });
test("allows updating workspace settings", async ({ page }) => {
test.setTimeout(240000);
const { company, adminUser } = await companiesFactory.createCompletedOnboarding();
await login(page, adminUser);
await page.getByRole("link", { name: "Settings" }).click();
await page.getByRole("link", { name: "Workspace settings" }).click();

await expect(page.getByRole("heading", { name: "Workspace settings" })).toBeVisible();

await expect(page.getByLabel("Company name")).toHaveValue(company.name ?? "");
await expect(page.getByLabel("Company website")).toHaveValue(company.website ?? "");
await expect(page.getByLabel("Brand color")).toHaveValue(company.brandColor ?? "");
Expand Down