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
Isaac Janzen 28078d78e2
DEV: Make 'username' optional for bookmark notifications (#19851)
Data Explorer queries have a `user_id` assigned to each query created. DE Reports can be bookmarked for later reference. 

When creating the bookmark notification there was the possibility of a notification error being thrown (that made the notification menu inaccessible) due to a DE Query not having a owner (associated user_id). This can happen in a couple ways: 
- having a query created by a user that was then later deleted leaving the query without ownership
- having a TA create a query for a customer using a temporary account, that would then later be deleted leaving the query without ownership

Since there is a case that `bookmark.user` is not valid the PR makes the `bookmark.user.username` optional for a bookmark notification. As [tested](https://github.com/discourse/discourse/pull/19851/files#diff-5b5154de37f96988d551feff6f1dfe5ba804fbcbc1c33b5478dde02a447a634f) in the case a username is not present, we will still render the `content` of the notification minus the username. This creates a safe fallback when looking up non-valid users.
2023-01-12 12:22:11 -06:00
..
acceptance DEV: Add search suggestions for tag-intersections (#19777) 2023-01-11 13:02:22 -06:00
addons/truth-helpers/integration/helpers DEV: adds includes helper to templates (#18259) 2022-09-15 14:20:37 +02:00
fixtures DEV: Remove user options from current user serializer (#19089) 2022-12-05 18:25:30 +02:00
helpers DEV: Deprecate controllerFor test helper (#19606) 2022-12-23 11:33:42 +01:00
integration DEV: Make 'username' optional for bookmark notifications (#19851) 2023-01-12 12:22:11 -06:00
unit FIX: Avoid race conditions when toggling presence state (#19648) 2022-12-29 00:44:31 +00:00
index.html DEV: Update Twitter meta tags while navigating in app (#19468) 2022-12-14 14:33:09 -05:00
setup-tests.js DEV: Drop helper context setup in tests (#19423) 2022-12-12 15:20:48 +01:00
test-boot-ember-cli.js DEV: Make the setupTests a regular import (#19046) 2022-11-16 16:11:18 +08:00