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/unit
David Taylor 78c6fc6e43 DEV: Use Ember router to determine currentURL
This means that our DiscourseURL logic will work consistently in tests, where `window.location` doesn't get updated.

To make it work properly, our `replaceState` implementation needed to be updated so that it writes the new URL to Ember's router, rather than bypassing the router and going straight to the `location` API.

A couple of tests needed updating following this fix:
- the composer-test was asserting that the new reply should be missing from the DOM... when really it **should** be in the DOM, and this fix to the test environment makes it so
- the topic-test was making a fake topic fixture based on the data from a topic with a different id. This was causing the topic route to get confused, and 'fix' the currentURL. This commit updates it to use a fixture with consistent data.

This commit also removes the feature detection of `window.history`. It's feature-detected within `discourse-location`. Plus, we don't support any browsers without it.
2022-01-12 12:18:37 +00:00
..
controllers DEV: Minor cleanup of create-account tests (#14989) 2021-11-24 16:43:25 +01:00
ember DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
lib DEV: Use Ember router to determine currentURL 2022-01-12 12:18:37 +00:00
mixins DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
models DEV: Fix a test leak (#15135) 2021-11-30 13:45:26 +11:00
services DEV: Automatically leave PresenceChannels when in the background (#15047) 2021-11-30 15:38:19 +11:00
utils DEV: drops jquery from scrolling-post-stream (#15313) 2021-12-17 14:52:42 +01:00
localization-test.js FIX: Translation overrides from fallback locale didn't work on client 2021-12-17 14:03:35 +01:00