Skip to content

Appswitch web fallback return flow #2477

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

Merged
merged 3 commits into from
Mar 7, 2025
Merged

Appswitch web fallback return flow #2477

merged 3 commits into from
Mar 7, 2025

Conversation

ravishekhar
Copy link
Contributor

Description

  • Support return flow from Web fallback
  • Fix page visibility change handler
  • Fix button session id in query param

Why are we making these changes? Include references to any related Jira tasks or GitHub Issues

Reproduction Steps (if applicable)

Screenshots (if applicable)

Dependent Changes (if applicable)

Groups who should review (if applicable)

❤️ Thank you!

@ravishekhar ravishekhar marked this pull request as ready for review March 7, 2025 15:42
@ravishekhar ravishekhar requested a review from a team as a code owner March 7, 2025 15:42
});

test("should test onCancel resume params when parameters are passed from web fallback", () => {
vi.spyOn(window, "location", "get").mockReturnValue({
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Ravi, for learning, can you explain more about how spyOn() being used? instead of just mocking the values, why do you need to spyOn and then mock it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to avoid overriding the global objects with mock functions, as that requires ensuring we reset in afterEach hooks.

The Spies provided by vitest does this for free by only overriding the return values instead of overriding the method itself.

@ravishekhar ravishekhar merged commit a685a19 into main Mar 7, 2025
4 checks passed
@ravishekhar ravishekhar deleted the appswitch-return branch March 7, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants