chore: [app-router-migration-7] Migrate `/teams` page (#12622)
Co-authored-by: Dmytro Hryshyn <dev.dmytroh@gmail.com> Co-authored-by: zomars <zomars@me.com>
This commit is contained in:
parent
71e57bafde
commit
f201266d69
|
@ -327,6 +327,7 @@ APP_ROUTER_SETTINGS_TEAMS_ENABLED=0
|
||||||
APP_ROUTER_GETTING_STARTED_STEP_ENABLED=0
|
APP_ROUTER_GETTING_STARTED_STEP_ENABLED=0
|
||||||
APP_ROUTER_APPS_ENABLED=0
|
APP_ROUTER_APPS_ENABLED=0
|
||||||
APP_ROUTER_VIDEO_ENABLED=0
|
APP_ROUTER_VIDEO_ENABLED=0
|
||||||
|
APP_ROUTER_TEAMS_ENABLED=0
|
||||||
|
|
||||||
# disable setry server source maps
|
# disable setry server source maps
|
||||||
SENTRY_DISABLE_SERVER_WEBPACK_PLUGIN=1
|
SENTRY_DISABLE_SERVER_WEBPACK_PLUGIN=1
|
||||||
|
|
|
@ -17,6 +17,7 @@ const ROUTES: [URLPattern, boolean][] = [
|
||||||
["/apps", process.env.APP_ROUTER_APPS_ENABLED === "1"] as const,
|
["/apps", process.env.APP_ROUTER_APPS_ENABLED === "1"] as const,
|
||||||
["/bookings/:status", process.env.APP_ROUTER_BOOKINGS_STATUS_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,
|
["/video/:path*", process.env.APP_ROUTER_VIDEO_ENABLED === "1"] as const,
|
||||||
|
["/teams", process.env.APP_ROUTER_TEAMS_ENABLED === "1"] as const,
|
||||||
].map(([pathname, enabled]) => [
|
].map(([pathname, enabled]) => [
|
||||||
new URLPattern({
|
new URLPattern({
|
||||||
pathname,
|
pathname,
|
||||||
|
|
|
@ -142,6 +142,8 @@ export const config = {
|
||||||
"/future/bookings/:status/",
|
"/future/bookings/:status/",
|
||||||
"/video/:path*",
|
"/video/:path*",
|
||||||
"/future/video/:path*",
|
"/future/video/:path*",
|
||||||
|
"/teams",
|
||||||
|
"/future/teams/",
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,35 @@ import {
|
||||||
|
|
||||||
test.describe.configure({ mode: "parallel" });
|
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.describe("Teams - NonOrg", () => {
|
||||||
test.afterEach(({ users }) => users.deleteAll());
|
test.afterEach(({ users }) => users.deleteAll());
|
||||||
|
|
||||||
|
|
|
@ -211,6 +211,7 @@
|
||||||
"APP_ROUTER_SETTINGS_TEAMS_ENABLED",
|
"APP_ROUTER_SETTINGS_TEAMS_ENABLED",
|
||||||
"APP_ROUTER_WORKFLOWS_ENABLED",
|
"APP_ROUTER_WORKFLOWS_ENABLED",
|
||||||
"APP_ROUTER_VIDEO_ENABLED",
|
"APP_ROUTER_VIDEO_ENABLED",
|
||||||
|
"APP_ROUTER_TEAMS_ENABLED",
|
||||||
"APP_USER_NAME",
|
"APP_USER_NAME",
|
||||||
"BASECAMP3_CLIENT_ID",
|
"BASECAMP3_CLIENT_ID",
|
||||||
"BASECAMP3_CLIENT_SECRET",
|
"BASECAMP3_CLIENT_SECRET",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user