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
David Taylor b537d591b3
FIX: allow slug-less topic URLs to work within the same topic (#15508)
- Update the TOPIC_URL_REGEXP in `lib/url` so that `navigatedToPost` doesn't attempt to handle slug-less URLs. Slugs must contain at least one non-numeric character, so we can use that fact to make the regex more specific. We want slug-less URLs to be routed as a normal Ember transition, so that `topic-by-slug-or-id` can catch them and re-write the URL to include the slug.

- Update the `topic-by-slug-or-id` afterModel to ensure that the Ember router is used to handle the redirect, rather than DiscourseURL. This guarantees that it will function as a redirect (DiscourseURL.routeTo sometimes bypasses the router). This solves the history problem which was worked-around in 27211ee7bb.

- Update routes/topic to recover from aborted transitions gracefully. This means that following an aborted transition, the browser URL continues to be updated with post numbers as the user scrolls down the page.
2022-01-11 10:37:37 +00:00
..
acceptance FIX: allow slug-less topic URLs to work within the same topic (#15508) 2022-01-11 10:37:37 +00:00
fixtures FEATURE: Scheduled problem checks for admin dashboard (#15327) 2021-12-20 09:59:11 +10:00
helpers FIX: uses new format for search tag endpoint to prevent issues (#15328) 2021-12-16 11:57:47 +01:00
integration FEATURE: Allow topic pin toggle when header is docked (#15438) 2022-01-03 15:21:06 +03:00
unit DEV: Fix failing test. 2022-01-11 11:45:22 +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 DEV: Allow plugin tests to run in Ember CLI qunit 2021-06-24 10:13:35 -04: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: Improve and document __container__ workaround in tests (#15498) 2022-01-10 10:34:08 +00: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 DEV: Bump eslint-config-discourse (#14868) 2021-11-10 09:31:41 +10:00
test-helper.js DEV: Skip Ember OnError validation for plugin qunit tests (#15314) 2021-12-15 10:59:38 +00: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 DEV: Drop jQuery file uploader and old upload components (#15376) 2021-12-22 08:59:44 +10:00