Commit Graph

23 Commits

Author SHA1 Message Date
Maikel Linke
94b75540e4 Replace Timecop with Rails' time helpers
Rails 4.1 added time helpers but we never bothered using them. But now
I'm getting rid of the Timecop dependency and use standard helpers.

Beware though that the new helpers always freeze time. When you travel
to a certain date then the clock stops ticking while Timecop maintained
the passing of time.

The freezing of time could cause problems if you are trying to enforce a
timeout. But all current specs don't seem affected.

In most cases, the freezing will make it easier to avoid flaky specs.
2025-08-22 16:57:04 +10:00
David Cook
1213455350 Merge pull request #13202 from mkllnk/flaky-cache
Ensure we test for the right text after AJAX loads filters
2025-03-12 10:12:11 +11:00
Maikel Linke
fc73d8cd4a Ensure we test for the right text after AJAX loads filters 2025-03-11 17:02:48 +11:00
Maikel Linke
fc2515eac1 Make sure the first page load is complete before updating database 2025-03-07 13:08:50 +11:00
Gaetan Craig-Riou
a2de846f2c Fix darkswarm caching system spec 2024-07-03 11:21:28 +10:00
Maikel Linke
d5b77a4f80 Ensure all assets are compiled on test page visit 2024-06-19 11:45:28 +10:00
Maikel Linke
6317fe1b71 Disable RSpec monkey patching 2024-05-09 12:24:41 +10:00
Matt-Yorkley
d9899e8af6 Update more specs 2024-04-02 09:27:36 +11:00
Maikel Linke
bd6b0ddbf3 Enforce RSpec expect(..).not_to over to_not 2024-03-07 16:57:54 +11:00
Matt-Yorkley
321047d663 Update specs 2023-08-08 11:36:31 +01:00
Maikel Linke
f7d5217ef6 Compile JS before testing caching
That avoids flakiness.
2023-07-27 09:40:08 +10:00
filipefurtad0
83f1266b8a Comments out flaky example
Sets example to xit

pending is not suitable for flaky specs, as we'll get a red build anyway, each time the spec passes; commenting out should be the right approach till we fix this one
2023-07-26 12:05:06 +01:00
filipefurtad0
d4d8941117 Reverts #11019
As discussed here (https://github.com/openfoodfoundation/openfoodnetwork/issues/11010#issuecomment-1594153860), reset_spree_preferences already does Rails.cache.clear
2023-07-26 11:49:41 +01:00
Neal Chambers
728926cc9a Fix Layout/LineLength 2023-07-19 08:39:26 +09:00
Matt-Yorkley
618900767f Fix flaky spec: use milliseconds in cache service and remove sleep 2023-06-16 21:23:44 +01:00
filipefurtad0
598f69f42f Clears cache around examples
for specs testing cache
2023-06-15 11:28:01 +01:00
Neal Chambers
940f806e5f Fix Rubocop Layout/LineLength 2023-04-04 09:44:15 +09:00
Maikel Linke
cb64361096 Remove old feature spec tag
Nowadays all system specs are run in a real browser.
2023-02-24 15:10:19 +11:00
Jean-Baptiste Bellet
2296a51dd2 Remove useless CSS class .filte-row 2022-12-19 10:50:00 +01:00
filipefurtad0
538844a1fb Removes _visible: true_ from system specs 2022-09-27 17:32:25 +01:00
Maikel
2dd80a8c6b Merge pull request #8583 from filipefurtad0/shopping_caching_into_system
Updates/moves shops_caching into system
2021-12-08 18:09:23 +11:00
filipefurtad0
fb87ef29a6 Updates/moves shops_caching into system 2021-12-07 11:09:17 +00:00
filipefurtad0
37d4a21521 Updates/moves darkswarm_caching into system 2021-12-07 10:45:38 +00:00