Commit Graph

156 Commits

Author SHA1 Message Date
eab560fe2a DEV: import I18n instead of global usage (#9768)
Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
Co-authored-by: Robin Ward <robin.ward@gmail.com>

Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2020-05-13 16:23:41 -04:00
a40649409e DEV: calling preload-store is deprecated (#9703) 2020-05-08 17:04:28 +02:00
7acb25db12 FIX: preload-store was moved 2020-05-06 15:55:52 -04:00
1eb9bc4cec DEV: encapsulates _events and clearing it at app-events module level (#9489) 2020-04-21 17:27:17 +02:00
5e24436454 DEV: attempts to fix various leaks (#9428)
* DEV: attempts to fix various leaks

* scheduleOnce doesnt work with anon function

* removes the I18n change
2020-04-16 07:58:04 +02:00
8a50ab45aa DEV: use REPORT_REQUESTS=1 to find all requests
We can use this to profile our pretender and ensure nothing is superfluous
and nothing is missing
2020-04-02 16:01:49 +11:00
6f2e3d61ee Revert "FIX: Resolver wasn't being set properly"
This reverts commit 661aebdc877a80f7debb93c4d727f2242084908f.
2020-03-26 12:33:29 -04:00
8316500a39 Revert "FIX: Resolver wasn't being set properly"
This reverts commit 661aebdc877a80f7debb93c4d727f2242084908f.
2020-03-25 16:13:18 -04:00
661aebdc87 FIX: Resolver wasn't being set properly 2020-03-25 15:40:45 -04:00
176aa0ac7d DEV: Import pretender instead of global server var (#8996)
* DEV: Remove server global test variable

* Delete yarn-error.log

* prettier and some eslint fixes

* add global server variable back for plugins

* rename imported server to pretender

* prettier

* support plugin server. usage

* Export pretender as named

* Prettier

* change default pretender export

* fix bad import

* Use pretender() and original default export

* export new Pretender as default

* fix accidental change

* WIP testing

* add pretend handlers in correct location

* move more stuff into the correct pretender

* Consolidated more pretenders

* comment out another bad test

* fix user acceptance tests

* commented out bad test

* fixed another composer server stub

* fix more tests

* fixed tag test pretender

* Fix admin email test

* removed another draft handler

* add back test

* fix and uncomment another test

* remove test that is not useful

* remove commented out lines

* reapply handlers between every test

* no need to re-stub requests now :)

* cleanup from review

* more cleanup
2020-03-02 14:24:31 -05:00
99305511bc DEV: Remove unused BreakString class (#8942) 2020-02-14 15:32:59 -03:00
0431942f3d DEV: select-kit 2 (#7998)
This new iteration of select-kit focuses on following best principales and disallowing mutations inside select-kit components. A best effort has been made to avoid breaking changes, however if you content was a flat array, eg: ["foo", "bar"] You will need to set valueProperty=null and nameProperty=null on the component.

Also almost every component should have an `onChange` handler now to decide what to do with the updated data. **select-kit will not mutate your data by itself anymore**
2020-02-03 14:22:14 +01:00
bc4c40abd4 DEV: Remove unsafe-eval from development CSP (#8569)
- Refactor source_url to avoid using eval in development
- Precompile handlebars in development
- Include template compilers when running qunit
- Remove unsafe-eval in development CSP
- Include unsafe-eval only for qunit routes in development
2019-12-30 12:17:12 +00:00
f5ed0dc2e6 FIX: Failing tests 2019-11-13 15:34:30 -05:00
3d0b310368 DEV: Fix some more deprecated Discourse.User and Discourse.Site 2019-11-13 15:34:30 -05:00
4843414de6 WIP - set Discourse.currentUser 2019-11-13 15:34:30 -05:00
291572a97a REFACTOR: Remove Discourse.Session constants 2019-11-08 13:46:50 -05:00
8d34f4bbd9 Revert "Revert Ember.run refactors"
This reverts commit fcb1ca52f96bdff1a49d558a4ffb18107d8334de.
2019-10-30 09:48:24 -04:00
fcb1ca52f9 Revert Ember.run refactors
This reverts commit 5ca60fcb6b592524086f98279d3e4fd949598343.
2019-10-29 17:10:47 -04:00
249dff85c7 FIX: Use modules for Ember.run.debounce hack in testing 2019-10-29 16:25:37 -04:00
f5d391a48a REFACTOR: Move app-events:main to service:app-events (#8152)
AppEvents was always a service object in disguise, so we should move it
to the correct place in the application. Doing this allows other service
objects to inject it easily without container access.

In the future we should also deprecate `this.appEvents` without an
explicit injection too.
2019-10-04 10:06:08 -04:00
839916aa49 DEV: Debundle plugin javascript assets and don't load if disabled (#7566)
And don't load javascript assets if plugin is disabled.

* precompile auto generated plugin js assets

* SPEC: remove spec test functions

* remove plugin js from test_helper

Co-Authored-By: Régis Hanol <regis@hanol.fr>

* DEV: using equality is slightly easier to read than inequality

Co-Authored-By: Régis Hanol <regis@hanol.fr>

* DEV: use `select` method instead of `find_all` for readability

Co-Authored-By: Régis Hanol <regis@hanol.fr>
2019-07-15 20:22:54 +05:30
a8793d0d9a REFACTOR: Test Memory Usage Fixes (#7769)
* Calling `Discourse.reset()` creates a new container
We should run our de-initializers only after acceptance tests,
since initializers are not run outside of acceptance tests anyway,
and the container at this point can be passed properly to the
`teardown()` method.

* Remove `Discourse.reset` from tests
This would cause a new container to be created which leaks many objects.

* `updateCurrentUser` is more accurate than `replaceCurrentUser`
2019-06-14 14:54:20 +02:00
9daba50d48 FIX: Unsubscribe seemed to be missing some events (#7762)
This forces an unsubscribe from all events.
2019-06-12 17:48:01 +02:00
3d7c26c15e FIX: Memory Leaks w/ Container (#7750)
Gives instance initializers the ability to add a `teardown` method that
will be called between tests to clean up after themselves.
2019-06-11 18:41:27 +02:00
fce34aa799 DEV: prevents Pretender Object to leak between tests (#7726) 2019-06-07 11:27:54 +02:00
c573fa780b DEV: prevents asyncTestDiscourse/controllerFor/fixture to leak (#7717) 2019-06-06 13:10:41 +02:00
60c073ae59 typos (#7716) 2019-06-06 13:00:23 +02:00
6d02dd6d8c DEV: attempts to remove message bus callbacks between tests (#7715) 2019-06-06 12:59:02 +02:00
c462c2f271 FIX: prevents appEvents to leak (#7714) 2019-06-06 12:33:52 +02:00
b339d67401 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
de013262a7 DEV: refactors textarea-selection helper to prevent leaking (#7709) 2019-06-05 19:20:46 +02:00
df95457468 DEV: d-editor helper should be synchronous (#7706)
Also ensures trigger has happened before assertion and prevents leaking formatTextWithSelection into global context
2019-06-05 14:52:38 +02:00
11ab3c623a DEV: removes verbose logging from test_helper (#7648) 2019-05-30 12:08:19 +02:00
bed3560d61 EXPERIMENTAL: more js tests logs (#7620) 2019-05-28 14:49:45 +02:00
6decdfce5c DEV: reduces memory footprint of tests - step 1 (#7591) 2019-05-28 12:15:12 +02:00
c80ab08e48 DEV: Fix pretenders leaking across acceptance test. 2019-05-28 10:41:22 +08:00
192562745f DEV: uses focus helper for d-editor tests (#7610) 2019-05-27 17:31:11 +02:00
669bfaba30 DEV: setTextareaSelection helper (#7609) 2019-05-27 16:33:27 +02:00
b788948985 FEATURE: English locale with international date formats
Makes en_US the new default locale
2019-05-20 13:47:20 +02:00
abbc639e0d FIX: Only unregister service workers that belongs to Discourse. 2019-05-07 13:08:06 +08:00
b5008586c5 DEV: Remove HTML parser from Tautologistics. (#7344) 2019-04-10 11:21:22 +02:00
4ae9cb28e4 remove probes.js, highlight.pack.js 2018-10-04 13:50:54 -04:00
cd82107976 use yarn to manage test vendor dependencies, upgrade sinon to v6.3.5 2018-10-04 11:06:14 -04:00
373d6e3fe6 always loadScript with a script tag (#6411)
to avoid Content Security Policy unsafe-line violations
2018-10-01 10:06:01 +08:00
a033327b93 Manage qunit via yarn. 2018-09-11 15:07:28 +08:00
d788555994 DEV: Manage pretender with yarn. 2018-09-07 16:01:49 +08:00
039afe0d2c Apply prettier. 2018-09-07 15:19:34 +08:00
04baddf731 DEV: migrate tests to async/await 2018-07-30 12:21:05 +02:00
59d4123316 PERFORMANCE: disables jquery animations during testing 2018-04-24 18:29:26 +02:00