cal/apps/web/playwright/settings-admin.e2e.ts
Hariom Balhara 4fa7bb64eb
test: e2e for not allowing reschedule of a cancelled booking (#12928)
* test: e2e for not allowing reschedule of a cancelled booking

* Fix failing test
2023-12-22 08:07:47 -05:00

36 lines
921 B
TypeScript

import { expect } from "@playwright/test";
import { test } from "./lib/fixtures";
test.describe.configure({ mode: "parallel" });
test.describe("Settings/admin A/B tests", () => {
test("should point to the /future/settings/admin 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({
role: "ADMIN",
});
await user.apiLogin();
await page.goto("/settings/admin");
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: "Feature Flags" });
await expect(locator).toBeVisible();
});
});