Commit graph

4 commits

Author SHA1 Message Date
Daniel Uber
6e08c7ca14
Disable flakey admin charts spec (#17165)
* Disable flaky test cases

These two tests (counting the number of items returned by the service
in the past week) depend on synchronizing the database time with the
process time, and fail when zonebie is active and the current timezone
is more than 12 hours ahead of UTC ("Samoa" for example fails).

* Use UTC times when calculating the periods for overview charts

The database will use UTC to calculate DATE() for grouping, and
ensuring the same time used when filtering avoids issues where the
ruby/server time and the database time are in distinct timezones, and
posts are published on different days in the two instances.

* Remove unused test-side date helper

* Revert "Use UTC times when calculating the periods overview charts"

This just moved the problem to the request specs. Since the spec is
still failing it's better to get the test suppressed while a fix is
determined

This reverts commit cbad78efcee9df51fd4f0a5214d00358c5253167.
2022-04-11 13:23:47 -04:00
Daniel Uber
85749d83d9
Fix "current period" admin charts data examples (#17118)
* Disable current period specs

These are failing about half of the time (when the test runs east of
UTC, like Perth or Astana, the counts are incorrect, when the test
runs west of UTC like America/Chicago or Alaska, it passes).

* Cheat by setting clock to noon UTC

This aligns article published dates in ruby with those calculated by
postgresql. Copy the decision made in
https://github.com/forem/forem/pull/3518 for the analytics service.

* Remove testing comments

I had added titles to some of the articles I wanted excluded from the
result to confirm they were being included.
2022-04-05 08:51:36 -05:00
Monica Mateiu
99401449d4
Display analytics up to yesterday instead of today (#17064)
Stop displaying admin analytics for current day, as the data is incomplete. Instead, show analytics for any given period up to yesterday
2022-04-04 15:17:32 -04:00
ludwiczakpawel
0bf6839a81
Admin analytics (#16528) 2022-03-28 21:51:51 +02:00