discourse/plugins/chat/test/javascripts/acceptance
Alan Guo Xiang Tan 038de393ed
DEV: Raise an error in test env when I18n interpolate argument is missing (#23527)
Why this change?

We have been bitten by bugs where tests are not catching missing
interpolate argument in our client side code because the JavaScript
tests are also using `I18n.translate` to assert that the right message
is shown. Before this change, `I18n.interpolate` will just replace the
missing interpolation argument in the final translation with some
placeholder. As a result, we ended up comparing a broken translation
with another broken translation in the test environment.

Why does this change do?

This change introduces the `I18n.testing` property which when set to
`true` will cause `I18n.translate` to throw an error when an interpolate
argument is missing. With this commit, we also set `I18n.testing = true`
when running qunit acceptance test.
2023-09-13 10:53:48 +08:00
..
chat-composer-test.js UX: chat composer buttons refactor + emoji (#21852) 2023-05-31 15:12:35 +02:00
chat-live-pane-collapse-test.js DEV: Remove lazy-yt and replace with lazy-videos (#20722) 2023-03-29 11:54:25 -04:00
chat-live-pane-test.js DEV: /channel -> /c chat route rename (#19782) 2023-01-27 09:58:12 -03:00
hashtag-css-generator-test.js UX: category hashtag colors order fix (#22758) 2023-07-24 14:36:56 +02:00
mentions-test.js DEV: Raise an error in test env when I18n interpolate argument is missing (#23527) 2023-09-13 10:53:48 +08:00
user-status-on-mentions-test.js FIX: hide tooltips when scrolling on mobile (#23098) 2023-08-23 15:39:58 +04:00