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

feat(frontend): imperative transaction network guard #3988

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

peterpeterparker
Copy link
Member

Motivation

With Svelte v5 #3949 we are not able to access the /transactions page because the $page store is not initalized when the route is mounted. This happens because we guard the page for case where the network query param would not be set. To resolve the issue we can imperatively access the query parameter.

Changes

  • Use URLSearchParams instead of $page to read the network param on mount.

@peterpeterparker peterpeterparker requested a review from a team as a code owner December 16, 2024 10:18

await homepageLoggedIn.waitForContentReady();

await expect(page).toHaveScreenshot({ fullPage: true });
Copy link
Contributor

Choose a reason for hiding this comment

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

I think when we have more test cases like this one, we can create an additional method that validates which page is active without capturing a screenshot.

Copy link
Contributor

@DenysKarmazynDFINITY DenysKarmazynDFINITY left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@peterpeterparker
Copy link
Member Author

Require #3989 to pass - i.e. CI will fail until related PR is merged.

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.

2 participants