Skip to content

Modular logistics and supply chain operating system (LSOS)

test: align auth notifications with localized messages

Ronald A. Richardsond341949634db
diff --git a/console/tests/unit/controllers/auth/confirm-email-change-test.js b/console/tests/unit/controllers/auth/confirm-email-change-test.js
index ccf1d031..8fad10d0 100644
--- a/console/tests/unit/controllers/auth/confirm-email-change-test.js
+++ b/console/tests/unit/controllers/auth/confirm-email-change-test.js
@@ -70,7 +70,7 @@ module('Unit | Controller | auth/confirm-email-change', function (hooks) {
await controller.confirmEmailChange.perform();
assert.deepEqual(this.posted, [{ path: 'auth/confirm-email-change', payload: { link: 'link_1', code: '123456' } }]);
- assert.deepEqual(this.notifications().successes, ['auth.confirm-email-change.success-message']);
+ assert.deepEqual(this.notifications().successes, [controller.intl.t('auth.confirm-email-change.success-message')]);
assert.deepEqual(this.transitions, ['console']);
});
diff --git a/console/tests/unit/controllers/auth/login-test.js b/console/tests/unit/controllers/auth/login-test.js
index 781447c2..adbbd640 100644
--- a/console/tests/unit/controllers/auth/login-test.js
+++ b/console/tests/unit/controllers/auth/login-test.js
@@ -184,7 +184,7 @@ module('Unit | Controller | auth/login', function (hooks) {
await this.submit();
assert.deepEqual(this.transitions.at(-1), ['auth.forgot-password', { queryParams: { email: '[email protected]' } }]);
- assert.strictEqual(this.notifications.warnings.at(-1), 'auth.login.password-reset-required');
+ assert.strictEqual(this.notifications.warnings.at(-1), this.controller.intl.t('auth.login.password-reset-required'));
});
test('any other authentication error is surfaced and clears the password', async function (assert) {
@@ -227,7 +227,7 @@ module('Unit | Controller | auth/login', function (hooks) {
test('slowConnection reports the slow connection message', function (assert) {
this.controller.slowConnection();
- assert.deepEqual(this.notifications.errors, ['auth.login.slow-connection-message']);
+ assert.deepEqual(this.notifications.errors, [this.controller.intl.t('auth.login.slow-connection-message')]);
});
test('reset clears loading always, and the form according to the outcome', function (assert) {