Deactivate Materialize animations #22291
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
A lot of UI tests are using timeouts to wait for animations to complete, with varying degrees of success and unnecessary runtime increase.
There are already some places that try to deactivate animations for UI tests:
Both CSS and jQuery should work as expected, but the Materialize does not. Probably because
M.anime
is not accessed from the global namespace, but passed directly to the components.This is an attempt to change the override to work until we can for example upgrade to Materialize 2.
@matomo-org/core-reviewers I tried two CI runs to check the benefit/problems with this solution:
page.waitForTimeout
removedTo remove the statements I used
sed -i '/waitForTimeout.*animation/d' **/*_spec.js
, so I would not expect it to catch all the right places or even the most impactful ones.Refs DEV-18077
Review