chore: [app-router-migration-4]: apps/categories page (#12619)

This commit is contained in:
DmytroHryshyn authored and GitHub committed 2023-12-12 11:43:15 -07:00
1 parent 7a67331d96
commit add6ffdfc4
12 files changed
+225 -27

No files matched your search

@@ -58,4 +58,58 @@ test.describe("apps/ A/B tests", () => {
await expect(locator).toBeVisible();
});
test("should point to the /future/apps/categories", 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("/apps/categories");
await page.waitForLoadState();
const dataNextJsRouter = await page.evaluate(() =>
window.document.documentElement.getAttribute("data-nextjs-router")
);
expect(dataNextJsRouter).toEqual("app");
const locator = page.getByTestId("app-store-category-messaging");
await expect(locator).toBeVisible();
});
test("should point to the /future/apps/categories/[category]", 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("/apps/categories/messaging");
await page.waitForLoadState();
const dataNextJsRouter = await page.evaluate(() =>
window.document.documentElement.getAttribute("data-nextjs-router")
);
expect(dataNextJsRouter).toEqual("app");
const locator = page.getByText(/messaging apps/i);
await expect(locator).toBeVisible();
});
});