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

[V3] Reenable failing test as it covers a navigate bug #5859

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

joshhanley
Copy link
Member

@joshhanley joshhanley commented Jul 21, 2023

This test is failing due to navigate being enabled on page load.

Navigate is taking control and redirecting it internally. The alpine:navigated event is firing, so isNavigating is being set to true in the below snippet, hence navigate is handling the redirect.

window.addEventListener('alpine:navigated', () => {
isNavigating = true

alpine:navigated is firing on page load as a replacement for DOMContentLoaded which won't fire if a page has been loaded using navigate.

https://github.com/alpinejs/alpine/blob/394edf0057495fe005f3977d1eae7cc697c0ab3b/packages/navigate/src/index.js#L108-L111

@joshhanley joshhanley changed the title Reenable failing test as it covers a navigate bug [V3] Reenable failing test as it covers a navigate bug Jul 24, 2023
@calebporzio calebporzio merged commit 58a83e7 into livewire:main Jul 24, 2023
0 of 4 checks passed
@calebporzio
Copy link
Collaborator

Thanks Josh - will have a look!

@joshhanley joshhanley deleted the redirect-failing-test branch July 24, 2023 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants