Commit 1f87e3d
committed
[FIX] web: prevent unwanted situations with freezeTime in hoot
The freezeTime utility function had a very strange behaviour: if it is
called without an argument, it would toggle the current value. This
means that if i read a test that calls freezeTime, i actually do not
know if the time is frozen after that function call.
This could be a problem in many subtle situations. For example, if a
test is using freezeTime, and then later, someone add a
`beforeEach(freezeTime)` in that suite without removing the existing
freezeTime, then weirdly, the test would no longer be "protected".
This commit simplifies the behaviour of freezeTime to make sure we know
what we are doing in all cases.
closes odoo#220639
X-original-commit: fcde459
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>1 parent ae432ab commit 1f87e3d
3 files changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments