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/test/javascripts
Martin Brennan 7e303f9320
DEV: Upgrade sinon and fix time based bookmark tests (#9647)
Update sinon.js to 9.0.2 to access async fake timers https://sinonjs.org/releases/v9.0.2/fake-timers/ which can then be used with acceptance tests (previously useFakeTimers didn't work with await, e.g. for visit).

Fix the bookmark acceptance test that was time based to use these new fake timers.

Add a fakeTime function that uses moment and the provided date string + timezone to freeze time using useFakeTimers and return a clock.

Add a timeStep function that accepts a clock from fakeTime and a function to run. Once the function is run we call clock.tickAsync(1000) to progress the fake clock forward 1s to progress promises/callbacks.
2020-05-07 09:10:32 +10:00
..
acceptance DEV: Upgrade sinon and fix time based bookmark tests (#9647) 2020-05-07 09:10:32 +10:00
admin Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
components DEV: improves sk api (#9653) 2020-05-06 17:16:20 +02:00
controllers DEV: Upgrade sinon and fix time based bookmark tests (#9647) 2020-05-07 09:10:32 +10:00
ember Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
fixtures FEATURE: add category banner for why a user cannot post (#9576) 2020-04-30 10:39:11 -07:00
helpers DEV: Upgrade sinon and fix time based bookmark tests (#9647) 2020-05-07 09:10:32 +10:00
initializers Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
lib DEV: Upgrade sinon and fix time based bookmark tests (#9647) 2020-05-07 09:10:32 +10:00
mixins Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
models FEATURE: don't display new/unread notification for muted topics (#9482) 2020-04-23 14:57:35 +10:00
utils Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
widgets DEV: Add remove button function to PluginAPI (#9627) 2020-05-05 09:18:02 -04:00
plugin_tests.js.erb Support for Acceptance tests in plugins 2015-08-27 17:07:11 -04:00
test_helper.js FIX: preload-store was moved 2020-05-06 15:55:52 -04:00