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
Jarek Radosz b78ab82284 DEV: Fix a flaky/leaky test
* pretender wasn't catching the request because it ran after this test finished
* restore wasn't needed, we do `sinon.restore()` after each test

The error was:
```
↪ Unit | Model | user::resolvedTimezone [✔]
↪ Unit | Utility | url::routeTo with prefixUnhandled request in test environment: /forum/u/chuck.json (PUT)
Error: Unhandled request in test environment: /forum/u/chuck.json (PUT)
    at Pretender.server.unhandledRequest (discourse/tests/setup-tests:173:15)
    at Pretender.handleRequest (pretender:400:14)
    at FakeRequest.send (pretender:169:21)
    at Object.send (jquery:10100:10)
    at Function.ajax (jquery:9683:15)
    at performAjax (discourse/app/lib/ajax:174:19)
    at eval (discourse/app/lib/ajax:183:11)
    at invokeCallback (ember:63104:17)
    at publish (ember:63087:9)
    at eval (ember:57463:16)
 [✘]
```

A minimal reproduction:
`http://localhost:3001/qunit?seed=3&testId=da76996b&testId=e52a53e7`
2021-06-22 09:49:09 +08:00
..
acceptance DEV: Try fix flaky dismiss keyboard specs (#13452) 2021-06-22 09:21:50 +10:00
fixtures FIX: Add word boundaries to replace and tag watched words (#13405) 2021-06-18 18:54:06 +03:00
helpers DEV: Revert 3 commits for plugin API to add directory columns (#13423) 2021-06-17 12:37:37 -05:00
integration FIX: Show link count only once for oneboxes (#13444) 2021-06-21 19:14:57 +03:00
unit DEV: Fix a flaky/leaky test 2021-06-22 09:49:09 +08:00
core_plugins_tests.js FEATURE: Allow theme tests to be run in production (take 2) (#12845) 2021-04-28 23:12:08 +03:00
index.html FIX: Clicking on a URL with a different url prefix did not work (#13349) 2021-06-11 11:44:30 +10:00
plugin_tests.js.erb FIX: Load .js files from plugins in qunit testing env (#11304) 2020-12-03 10:25:42 -06:00
setup-tests.js DEV: Revert 3 commits for plugin API to add directory columns (#13423) 2021-06-17 12:37:37 -05:00
test_helper.js DEV: Move pretty-text into vendor and use that (#13273) 2021-06-04 11:01:59 -04:00
test_starter.js Update menu swipe (#13277) 2021-06-07 12:31:16 -07:00
test-helper.js DEV: Make dockcontainer and hidepassed the defaults (#12416) 2021-03-16 14:34:59 -04:00
theme_qunit_ember_jquery.js FIX: Theme tests should work in production (#13333) 2021-06-08 22:03:59 +03:00
theme_qunit_helper.js DEV: Arrange theme QUnit dependencies in the right order (#12907) 2021-04-30 13:28:33 +03:00
theme_qunit_tests_vendor.js FIX: Theme tests should work in production (#13333) 2021-06-08 22:03:59 +03:00
theme_qunit_vendor.js FIX: Theme tests should work in production (#13333) 2021-06-08 22:03:59 +03:00