mirror of
https://github.com/discourse/discourse.git
synced 2025-02-11 05:44:59 +00:00
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.