fix: pass query params to dynamic meetings (#14920)
This commit is contained in:
1 parent
f812d92045
commit
f0e59c2331
3 files changed
+35
-1
No files matched your search
@@ -62,6 +62,36 @@ test("dynamic booking", async ({ page, users }) => {
|
||||
});
|
||||
});
|
||||
|
||||
test("dynamic booking info prefilled by query params", async ({ page, users }) => {
|
||||
const pro = await users.create();
|
||||
await pro.apiLogin();
|
||||
|
||||
let duration = 15;
|
||||
const free = await users.create({ username: "free.example" });
|
||||
await page.goto(`/${pro.username}+${free.username}?duration=${duration}`);
|
||||
|
||||
await page.waitForLoadState("networkidle");
|
||||
|
||||
const badgeByDurationTestId = (duration: number) => `multiple-choice-${duration}mins`;
|
||||
|
||||
let badgeLocator = await page.getByTestId(badgeByDurationTestId(duration));
|
||||
let activeState = await badgeLocator.getAttribute("data-active");
|
||||
|
||||
expect(activeState).toEqual("true");
|
||||
|
||||
duration = 30;
|
||||
await page.goto(`/${pro.username}+${free.username}?duration=${duration}`);
|
||||
badgeLocator = await page.getByTestId(badgeByDurationTestId(duration));
|
||||
activeState = await badgeLocator.getAttribute("data-active");
|
||||
|
||||
expect(activeState).toEqual("true");
|
||||
|
||||
// Check another badge just to ensure its not selected
|
||||
badgeLocator = await page.getByTestId(badgeByDurationTestId(15));
|
||||
activeState = await badgeLocator.getAttribute("data-active");
|
||||
expect(activeState).toEqual("false");
|
||||
});
|
||||
|
||||
test.describe("Organization:", () => {
|
||||
test.afterEach(({ orgs, users }) => {
|
||||
orgs.deleteAll();
|
||||
|
||||
Reference in new issue
Block a user