Skip to content
Open
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
1 change: 1 addition & 0 deletions e2e/helpers/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ 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 page.waitForLoadState("networkidle");
await fillOtp(page);

await page.waitForURL(/^(?!.*\/login).*/u);
Expand Down
14 changes: 8 additions & 6 deletions e2e/tests/settings/administrator/workspace.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ test.describe("Workspace settings", () => {
await page.getByRole("button", { name: "Save changes" }).click();
await expect(page.getByText("Changes saved")).toBeVisible();

const updatedCompany = await db.query.companies
.findFirst({ where: eq(companies.id, company.id) })
.then(takeOrThrow);
await expect(async () => {
const updatedCompany = await db.query.companies
.findFirst({ where: eq(companies.id, company.id) })
.then(takeOrThrow);

expect(updatedCompany.publicName).toBe("Updated Company Name");
expect(updatedCompany.website).toBe("https://example.com");
expect(updatedCompany.brandColor).toBe("#4b5563");
expect(updatedCompany.publicName).toBe("Updated Company Name");
expect(updatedCompany.website).toBe("https://example.com");
expect(updatedCompany.brandColor).toBe("#4b5563");
}).toPass();
});
});
1 change: 1 addition & 0 deletions e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"types": ["node", "@playwright/test"],
"baseUrl": ".",
"lib": ["ES2017", "DOM"],
"paths": {
"@test/*": ["./*"],
"@/*": ["../frontend/*"]
Expand Down