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: try revert "safe test" transitions directives #6404

Closed

Conversation

peterpeterparker
Copy link
Member

@peterpeterparker peterpeterparker commented Feb 12, 2025

Motivation

We revert the "testSafeXXX" transitions to resolve the issue we were facing while migrating to Svelte v5 with the new suggestion provided on Testing Library repo: testing-library/svelte-testing-library#284 (comment)

This branch is meant to assert that the error TypeError: Cannot set properties of undefined (setting 'onfinish') is not thrown anymore for Svelte v5 with the new way of mocking "animate" prototype.

@peterpeterparker
Copy link
Member Author

PR use for testing purpose. Mocking configuration will be manually applied to the Svelte v5 branch once all revert PRs of "testSafe..." directives have been applied.

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]>
peterpeterparker added a commit to dfinity/gix-components that referenced this pull request Feb 12, 2025
# Motivation

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

# Resources

- Mock tested in dfinity/nns-dapp#6404
- 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 #574 and use Svelte transitions

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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.

1 participant