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

Fix failing UI tests #17970

Merged
merged 4 commits into from Sep 8, 2021
Merged

Fix failing UI tests #17970

merged 4 commits into from Sep 8, 2021

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Sep 6, 2021

Description:

Due to various code changes (like #17937, #17879) UI tests are currently failing. This PR aims to fix them again.

Review

@sgiehl sgiehl added c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Sep 6, 2021
@sgiehl sgiehl added this to the 4.5.0 milestone Sep 6, 2021
@sgiehl sgiehl added the Needs Review PRs that need a code review label Sep 7, 2021
@sgiehl
Copy link
Member Author

sgiehl commented Sep 7, 2021

Note: I've introduced a new method page.waitForLazyImages(), which removes the loading attribute from all images and then waits for all images to load. Otherwise we can't ensure in some UI tests which images would be loaded or not.

Copy link
Member

@tsteur tsteur left a comment

Choose a reason for hiding this comment

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

Does it make sense to call this automatically as part of

  • this.waitForNetworkIdle()
  • this.webpage.on('load', () => { (I know those ones are only loaded later but if it might still be good just in case we use it more in the future)
  • maybe also in this.webpage.on('requestfinished'

Then developers maybe won't need to think about this as it can be tricky to find out etc

Copy link
Contributor

@justinvelluppillai justinvelluppillai left a comment

Choose a reason for hiding this comment

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

Nice one.

@justinvelluppillai justinvelluppillai merged commit 748154c into 4.x-dev Sep 8, 2021
@justinvelluppillai justinvelluppillai deleted the fixuitests branch September 8, 2021 01:18
@justinvelluppillai
Copy link
Contributor

@sgiehl sorry maybe jumped the gun merging there didn't notice @tsteur 's suggestion. Can create a new PR if we want to implement those suggestions also.

@sgiehl
Copy link
Member Author

sgiehl commented Sep 8, 2021

@tsteur will check if that works and create a new PR if so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants