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 overlay test that fails on the first day of the month / Fix overlay #22780

Merged
merged 12 commits into from
Nov 22, 2024

Conversation

caddoo
Copy link
Contributor

@caddoo caddoo commented Nov 20, 2024

Description

A particular UI test always failed on the first day of the month. Due to the large shared fixture used for UI tests, probably this bit:

$date = Date::factory('yesterday');

Rather than modify that, I just changed the test to switch the view to 'yesterday' so the layout/values are consistent, as a bonus it also makes sure the period switcher works.

Additional

I also noticed that the sidebar didn't load on first load leading to an infinite spinner, it did work in the UI tests but not in when testing (see here for demo) so I've corrected that as well.

Testing

To test this change, I changed the date when running the UI tests using:
exec('sudo date --set="2024-11-01 12:00:00"');

Here is the change running with the date 2024-11-05 and it passing.
https://github.com/matomo-org/matomo/actions/runs/11926632491/job/33242601919#step:3:807

Here is the change running with the date 2024-11-01 and it passing.
https://github.com/matomo-org/matomo/actions/runs/11927626971/job/33243296429#step:3:805

Review

@caddoo caddoo marked this pull request as ready for review November 20, 2024 06:42
@caddoo caddoo added the Needs Review PRs that need a code review label Nov 20, 2024
@caddoo caddoo requested a review from a team November 20, 2024 07:28
@caddoo caddoo requested a review from mneudert November 22, 2024 03:47
@mneudert mneudert added this to the 5.2.0 milestone Nov 22, 2024
@mneudert mneudert 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 Nov 22, 2024
@mneudert mneudert merged commit 6379040 into 5.x-dev Nov 22, 2024
25 of 26 checks passed
@mneudert mneudert deleted the dev-18240-failing-test-first-day branch November 22, 2024 13:37
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.

2 participants