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

Add tests for react navigation behaviour #4819

Open
gfellerph opened this issue Feb 26, 2025 · 0 comments
Open

Add tests for react navigation behaviour #4819

gfellerph opened this issue Feb 26, 2025 · 0 comments
Labels
📦 components Related to the @swisspost/design-system-components package Header Everything related to our composible header components

Comments

@gfellerph
Copy link
Member

When react is navigating to a new route, the header gets re-attached. To simulate this behaviour, we can do:

const x = document.querySelector('post-header');
x.remove();
document.body.prepend(x);

This, in combination with clicking on navigation links (preventing default link event), can be used to reproduce one of the trickier issues we faced.

@gfellerph gfellerph added Header Everything related to our composible header components 📦 components Related to the @swisspost/design-system-components package labels Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 components Related to the @swisspost/design-system-components package Header Everything related to our composible header components
Projects
Status: 👀 Triage
Development

No branches or pull requests

1 participant