-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
fix: Wait for restore url navigation to complete before proceeding #11620
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
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7771b54
fix: Wait for restore url navigation to complete before proceeding
Artur- 10783a6
cla
Artur- e9ea771
simplify
Artur- 5eaa15d
simplify
Artur- 1914532
prettier
Artur- 98946ee
Make tests pass
Artur- 1ff3910
wait some more
Artur- 2611e9c
Stabilize test by using await instead of sleep
Artur- 412a12e
Wait for navigation to finish in all tests
Artur- 1682389
sleep -> await
Artur- 34c2da2
Merge remote-tracking branch 'upstream/dev' into HEAD
Artur- cc8e434
changeset
Artur- 82d4344
Test for immediately proceeding blocker
Artur- 93bc074
Merge remote-tracking branch 'origin/dev' into wait-for-restore-url
Artur- ff436a5
Revert tests
Artur- 6071fb1
Rename variable
Artur- File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "react-router": patch | ||
| --- | ||
|
|
||
| Fix useBlocker when blocking function is quick to proceed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ | |
| - Armanio | ||
| - arnassavickas | ||
| - aroyan | ||
| - Artur- | ||
| - ashusnapx | ||
| - avipatel97 | ||
| - awreese | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Are we sure this test exhibits the actual bug? I see this failure when run against
dev:The reproduction for the original issue leaves you on the original blocked page (
/three) but this test, without the fix, actually ends up going back 2 history locations?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.
I am not sure why it behaves differently here. My assumption was that maybe JSDOM (or whoever emulates browser navigation here) behaves differently in the case where navigation is in progress and you navigate again. I think it still covers the issue though, which is that if you navigate during navigation, you will end up somewhere else than you would expect.
If you have ideas on how to improve the test, I am all ears
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.
Ah ok yeah this is probably a JSDOM issue. I'm going to test this through an integration test in a real browser in remix-run/remix#9914 instead of trying to hack JSDOM into behaving correctly