This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests/integration/components
Andrei Prigorshnev 178b294a62
FIX: flaky javascript tests with fake timers (#13235)
The problem was happening in component integration tests on the rendering stage, sometimes the rendering would never finish.

Using time moments in the future when faking time solves the problem. Unfortunately, I don't know why exactly it helps. It was just a lucky guess after some hours I spent trying to figure out what's going on. But I've done a lot of testings, so looks like it really works. I'll be monitoring builds for some time after merging this anyway.

Unit tests seem to work alright with moments in the past. And we don't fake time in acceptance tests at the moment but I guess they would very likely be flaky with time moments from the past since they also do rendering.

I'm actually thinking of moving all fake time moments to the future (including moments in unit tests) to decrease the chances of flakiness. But I don't want to do everything in one PR, because I can accidentally introduce new flakiness.

A pretty easy way of picking time moments in the future for tests is to use the 2100 year. It has the same calendar as 2021. If a day is Monday in 2021 it's Monday in 2100 too.
2021-06-11 13:51:27 +04:00
..
select-kit FIX: flaky javascript tests with fake timers (#13235) 2021-06-11 13:51:27 +04:00
ace-editor-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
activation-controls-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
admin-report-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
badge-title-test.js DEV: Migrate more tests to our Ember CLI format. (#11899) 2021-02-01 09:01:47 -05:00
bookmark-test.js FIX: flaky javascript tests with fake timers (#13235) 2021-06-11 13:51:27 +04:00
cook-text-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
d-button-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
d-editor-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
d-icon-test.js DEV: Migrate more tests to our Ember CLI format. (#11899) 2021-02-01 09:01:47 -05:00
date-input-test.js UX: uses native date picker when possible (eg: not safari) (#12668) 2021-04-22 10:34:23 +02:00
date-time-input-range-test.js UX: uses native date picker when possible (eg: not safari) (#12668) 2021-04-22 10:34:23 +02:00
date-time-input-test.js UX: uses native date picker when possible (eg: not safari) (#12668) 2021-04-22 10:34:23 +02:00
group-list-setting-test.js FIX: Tests in admin/tests were not running (#12391) 2021-03-17 13:02:12 -04:00
group-membership-button-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
hidden-details-test.js DEV: Fix some deprecation warnings in tests 2021-05-11 14:04:33 +04:00
highlighted-code-test.js Support for Testem in Ember CLI (#12442) 2021-03-19 09:32:46 -04:00
html-safe-helper-test.js DEV: Migrate more tests to our Ember CLI format. (#11899) 2021-02-01 09:01:47 -05:00
iframed-html-test.js DEV: Migrate more tests to our Ember CLI format. (#11899) 2021-02-01 09:01:47 -05:00
image-uploader-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
invite-panel-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
load-more-test.js DEV: Migrate more tests to our Ember CLI format. (#11899) 2021-02-01 09:01:47 -05:00
relative-time-picker-test.js FEATURE: Add year to relative time picker (#12268) 2021-03-03 11:41:07 +10:00
secret-value-list-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
simple-list-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
site-header-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
slow-mode-info-test.js FIX: Lots of plugin tests were using old, non-Ember compat CLI APIs (#13320) 2021-06-09 10:58:55 -04:00
text-field-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
themes-list-item-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
themes-list-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
time-input-test.js DEV: Migrate more tests to our Ember CLI format. (#11899) 2021-02-01 09:01:47 -05:00
topic-list-item-test.js FEATURE: Add newly loaded topics to bulk-select automatically if Select All is on (#12026) 2021-03-05 17:16:03 +03:00
topic-list-test.js FIX: Flaky JS tests (#12331) 2021-03-10 08:27:42 -05:00
user-avatar-flair-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
user-selector-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
value-list-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00