Skip to content

fix: omit login redirect param #1666

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 2 commits into from
May 23, 2022
Merged

Conversation

Kira-Pilot
Copy link
Member

resolves #1282

I spent a fair amount of time attempting to write a test for this, but couldn't mock out the router in such a way that the redirect param ?redirect=%2F reared its ugly head. Tried: using the test helpers and wrappers in renderHelpers.tsx, mocking logged out state similarly to LoginPage.test.tsx, and even mocking out authState. Any ideas welcome.

@Kira-Pilot Kira-Pilot requested a review from a team as a code owner May 23, 2022 14:47
@presleyp
Copy link
Contributor

Don't worry about it, some router stuff is just too hard to test expect in an E2E test. We have an E2E ticket for testing redirects so you could just make sure this use case is listed there for testing. Is the util function you're using unit tested?

Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

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

Not having tests for this sounds ok to me.

@Kira-Pilot
Copy link
Member Author

Is the util function you're using unit tested?

@presleyp yes it is!

@Kira-Pilot Kira-Pilot merged commit fa957d6 into main May 23, 2022
@Kira-Pilot Kira-Pilot deleted the omit-login-redirect-param/kira-pilot branch May 23, 2022 15:01
kylecarbs pushed a commit that referenced this pull request Jun 10, 2022
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.

Feat: omit redirect URL parameter to / on login
3 participants