forked from calcom/cal.com
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add a/b test and env variables
- Loading branch information
1 parent
79d727e
commit 9000e9b
Showing
5 changed files
with
76 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { expect } from "@playwright/test"; | ||
|
||
import { test } from "./lib/fixtures"; | ||
|
||
test.describe.configure({ mode: "parallel" }); | ||
|
||
test.describe("apps/ A/B tests", () => { | ||
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(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters