-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: more Embed Page Params filtering tests #16937
Conversation
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (10/04/24)1 reviewer was added to this PR based on Keith Williams's automation. |
let popupRescheduleUid = null; | ||
let calLink = null; | ||
(function defineVariables() { | ||
const searchParams = new URL(document.URL).searchParams; | ||
popupRescheduleUid = searchParams.get("popupRescheduleUid") || "qm3kwt3aTnVD7vmP9tiT2f"; | ||
calLink = searchParams.get("calLink"); | ||
})() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved variables to a single place
@@ -91,7 +91,7 @@ test.describe("Popup Tests", () => { | |||
|
|||
await test.step("Reschedule the booking", async () => { | |||
await addEmbedListeners("popupReschedule"); | |||
await page.goto(`/?popupRescheduleId=${booking.uid}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed it to popupRescheduleUId
to better convey what it holds.
@@ -96,6 +96,7 @@ describe("Cal", () => { | |||
|
|||
expect(iframe.src).not.toContain("date="); | |||
expect(iframe.src).not.toContain("duration="); | |||
expect(iframe.src).toContain("hello="); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An assertion to confirm that other non-reserved params are forwarded.
@@ -115,6 +116,17 @@ describe("Cal", () => { | |||
expect(iframe.src).toContain("email=test%40example.com"); | |||
}); | |||
|
|||
it("should allow configuring reserved params through direct URL params to embed calLink(as it is explicitly passed by user)", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one more scenario that people might be using embed in. By directly passing query params in calLink
E2E results are ready! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
rescheduleUid
throughconfig