Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0829f9ffa2 |
+16
-16
@@ -179,6 +179,22 @@ export async function initAuth(): Promise<void> {
|
|||||||
}),
|
}),
|
||||||
secret: BETTER_AUTH_SECRET,
|
secret: BETTER_AUTH_SECRET,
|
||||||
baseURL: BETTER_AUTH_URL,
|
baseURL: BETTER_AUTH_URL,
|
||||||
|
socialProviders: {
|
||||||
|
...(hasGoogle ? {
|
||||||
|
google: {
|
||||||
|
clientId: process.env.GOOGLE_CLIENT_ID!,
|
||||||
|
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
|
||||||
|
redirectURI: `${callbackBase}/google`,
|
||||||
|
},
|
||||||
|
} : {}),
|
||||||
|
...(hasGitHub ? {
|
||||||
|
github: {
|
||||||
|
clientId: process.env.GITHUB_CLIENT_ID!,
|
||||||
|
clientSecret: process.env.GITHUB_CLIENT_SECRET!,
|
||||||
|
redirectURI: `${callbackBase}/github`,
|
||||||
|
},
|
||||||
|
} : {}),
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
genericOAuth({
|
genericOAuth({
|
||||||
config: [
|
config: [
|
||||||
@@ -200,22 +216,6 @@ export async function initAuth(): Promise<void> {
|
|||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
socialProviders: {
|
|
||||||
...(hasGoogle ? {
|
|
||||||
google: {
|
|
||||||
clientId: process.env.GOOGLE_CLIENT_ID!,
|
|
||||||
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
|
|
||||||
redirectURI: `${callbackBase}/google`,
|
|
||||||
},
|
|
||||||
} : {}),
|
|
||||||
...(hasGitHub ? {
|
|
||||||
github: {
|
|
||||||
clientId: process.env.GITHUB_CLIENT_ID!,
|
|
||||||
clientSecret: process.env.GITHUB_CLIENT_SECRET!,
|
|
||||||
redirectURI: `${callbackBase}/github`,
|
|
||||||
},
|
|
||||||
} : {}),
|
|
||||||
},
|
|
||||||
session: {
|
session: {
|
||||||
expiresIn: 60 * 60 * 24 * 7, // 7 days
|
expiresIn: 60 * 60 * 24 * 7, // 7 days
|
||||||
updateAge: 60 * 60 * 24, // 1 day
|
updateAge: 60 * 60 * 24, // 1 day
|
||||||
|
|||||||
@@ -44,10 +44,7 @@ test.beforeEach(async ({ page }) => {
|
|||||||
json: { newClients: [], activeInPeriodCount: 0, churnRisk: [], churnRiskTotal: 0 },
|
json: { newClients: [], activeInPeriodCount: 0, churnRisk: [], churnRiskTotal: 0 },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (url.includes("/api/invoices")) {
|
// Appointments, clients, services, staff, invoices, book, etc.
|
||||||
return route.fulfill({ json: { data: [], total: 0 } });
|
|
||||||
}
|
|
||||||
// Appointments, clients, services, staff, book, etc.
|
|
||||||
return route.fulfill({ json: [] });
|
return route.fulfill({ json: [] });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -85,7 +82,6 @@ test("admin staff page loads", async ({ page }) => {
|
|||||||
|
|
||||||
test("admin invoices page loads", async ({ page }) => {
|
test("admin invoices page loads", async ({ page }) => {
|
||||||
await page.goto("/admin/invoices");
|
await page.goto("/admin/invoices");
|
||||||
await page.waitForLoadState("domcontentloaded");
|
|
||||||
await expect(page.getByText("GroomBook")).toBeVisible();
|
await expect(page.getByText("GroomBook")).toBeVisible();
|
||||||
await expect(page.getByRole("link", { name: "Invoices" })).toBeVisible();
|
await expect(page.getByRole("link", { name: "Invoices" })).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user