Skip to content
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

Merged
merged 3 commits into from
Oct 4, 2024
Merged

test: more Embed Page Params filtering tests #16937

merged 3 commits into from
Oct 4, 2024

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Oct 4, 2024

@graphite-app graphite-app bot requested a review from a team October 4, 2024 07:59
@dosubot dosubot bot added automated-tests area: unit tests, e2e tests, playwright embed area: embed, widget, react embed labels Oct 4, 2024
@keithwillcode keithwillcode added core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO labels Oct 4, 2024
Copy link

graphite-app bot commented Oct 4, 2024

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.

Comment on lines +7 to +13
let popupRescheduleUid = null;
let calLink = null;
(function defineVariables() {
const searchParams = new URL(document.URL).searchParams;
popupRescheduleUid = searchParams.get("popupRescheduleUid") || "qm3kwt3aTnVD7vmP9tiT2f";
calLink = searchParams.get("calLink");
})()
Copy link
Member Author

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}`);
Copy link
Member Author

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=");
Copy link
Member Author

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)", () => {
Copy link
Member Author

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

Copy link
Contributor

github-actions bot commented Oct 4, 2024

E2E results are ready!

emrysal
emrysal previously approved these changes Oct 4, 2024
Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 10:31am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 10:31am

@emrysal emrysal merged commit 644fb38 into main Oct 4, 2024
40 checks passed
@emrysal emrysal deleted the embed-more-tests branch October 4, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-tests area: unit tests, e2e tests, playwright core area: core, team members only embed area: embed, widget, react embed enterprise area: enterprise, audit log, organisation, SAML, SSO ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants