chore: [app-router-migration-7] Migrate /teams page (#12622)

Co-authored-by: Dmytro Hryshyn <[email protected]>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-01-03 21:29:11 +00:00
1 parent 71e57bafde
commit f201266d69
5 files changed
+35 -1

No files matched your search

+1
View File
@@ -17,6 +17,7 @@ const ROUTES: [URLPattern, boolean][] = [
["/apps", process.env.APP_ROUTER_APPS_ENABLED === "1"] as const,
["/bookings/:status", process.env.APP_ROUTER_BOOKINGS_STATUS_ENABLED === "1"] as const,
["/video/:path*", process.env.APP_ROUTER_VIDEO_ENABLED === "1"] as const,
["/teams", process.env.APP_ROUTER_TEAMS_ENABLED === "1"] as const,
].map(([pathname, enabled]) => [
new URLPattern({
pathname,
+2
View File
@@ -142,6 +142,8 @@ export const config = {
"/future/bookings/:status/",
"/video/:path*",
"/future/video/:path*",
"/teams",
"/future/teams/",
],
};
+29
View File
@@ -17,6 +17,35 @@ import {
test.describe.configure({ mode: "parallel" });
test.describe("Teams A/B tests", () => {
test("should point to the /future/teams page", async ({ page, users, context }) => {
await context.addCookies([
{
name: "x-calcom-future-routes-override",
value: "1",
url: "http://localhost:3000",
},
]);
const user = await users.create();
await user.apiLogin();
await page.goto("/teams");
await page.waitForLoadState();
const dataNextJsRouter = await page.evaluate(() =>
window.document.documentElement.getAttribute("data-nextjs-router")
);
expect(dataNextJsRouter).toEqual("app");
const locator = page.getByRole("heading", { name: "teams" });
await expect(locator).toBeVisible();
});
});
test.describe("Teams - NonOrg", () => {
test.afterEach(({ users }) => users.deleteAll());