Skip to content

feat: use test safe transitions #6396

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
Feb 11, 2025
Merged

Conversation

peterpeterparker
Copy link
Member

@peterpeterparker peterpeterparker commented Feb 11, 2025

Motivation

Svelte v5 requires the web animation API which is not supported in emulated testing environment. That is why we added some "test safe transition directive" to Gix components (see PR dfinity/gix-components#573) and why we are using those transitions in this PR.

Notes

Changes

  • Use testSafe... directives instead of directly using transition of Svelte

@peterpeterparker peterpeterparker marked this pull request as ready for review February 11, 2025 12:25
@peterpeterparker peterpeterparker requested a review from a team as a code owner February 11, 2025 12:25
@peterpeterparker peterpeterparker added this pull request to the merge queue Feb 11, 2025
Merged via the queue into main with commit 164f786 Feb 11, 2025
32 checks passed
@peterpeterparker peterpeterparker deleted the feat/test-safe-transition branch February 11, 2025 12:53
github-merge-queue bot pushed a commit that referenced this pull request Feb 12, 2025
# Motivation

Revert #6396 because thanks to a different way of mocking the
transitions for test purposes (without vite), those workaround are not
needed anymore when migrating to Svelte v5.

# Resources

New solution to mock the animation for test purposes with Svelte v5
providing by Testing Library in
testing-library/svelte-testing-library#284 (comment)

# Changes

Revert #6396

# Tests

I tested the revert and new way of mocking with Svelte v5 in #6404. The
tests did not throw the keyword `TypeError: Cannot set properties of
undefined (setting 'onfinish')`.

Signed-off-by: David Dal Busco <[email protected]>
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