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 6b464d1b8d
FIX: Restore dismissing the first notification (#10433)
* FIX: Restore dismissing the first notification

Reverts the temporary fix (8e4fea897e) and restores the feature introduced in e638d43f0a.

The issue that was the reason for the revert (https://meta.discourse.org/t/logins-redirects-to-missing-notifications-page/149718) was a combination of two bugs:

1. Fixed in this commit - the click listener was accidentally registered also for logged-out users. This meant that the first click on a page always trigger an AJAX call to the notifications endpoint (`/notifications?recent=true&limit=5`), which returned a 403 error. Now, this code is run only when the user is logged in.

2. A still unknown bug that I could not reproduce, which was somehow setting the login redirect cookie to the URL of that previously failed AJAX request.
2020-12-08 11:11:35 +11:00
..
acceptance FIX: Stop category 404s from breaking the router (#11424) 2020-12-07 14:22:39 -08:00
fixtures FIX: Stop category 404s from breaking the router (#11424) 2020-12-07 14:22:39 -08:00
helpers DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
integration FIX: Restore dismissing the first notification (#10433) 2020-12-08 11:11:35 +11:00
unit DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03: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: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
test_helper.js REFACTOR: Continue to converge on what Ember CLI wants us to do 2020-10-16 10:53:13 -04:00