From fff0f31a664acfdbff0ddd1a18e441dce0ee3514 Mon Sep 17 00:00:00 2001 From: Tulio Casagrande Date: Tue, 28 Jun 2016 19:11:17 -0300 Subject: Normalize i18n keys --- web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js | 6 +++--- web-ui/test/spec/mail_view/ui/send_button.spec.js | 8 ++++---- web-ui/test/spec/services/mail_service.spec.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'web-ui/test/spec') diff --git a/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js b/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js index 1bf79b96..87e0656e 100644 --- a/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js +++ b/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js @@ -4,17 +4,17 @@ describeComponent('mail_view/ui/no_mails_available_pane', function () { describe('after initialization', function () { it('renders template', function () { this.setupComponent({tag: 'inbox'}); - expect(this.$node.html()).toMatch('
\n NO EMAILS IN \'INBOX\'.\n
'); + expect(this.$node.html()).toMatch('
\n No emails in \'Inbox\'.\n
'); }); it('show different message for search with no results', function () { this.setupComponent({tag: 'all', forSearch: 'search'}); - expect(this.$node.html()).toMatch('
\n NO RESULTS FOR: \'SEARCH\'.\n
'); + expect(this.$node.html()).toMatch('
\n No results for: \'search\'.\n
'); }); it('show only tag information when listing all mails', function () { this.setupComponent({tag: 'all', forSearch: 'in:all'}); - expect(this.$node.html()).toMatch('
\n NO EMAILS IN \'ALL\'.\n
'); + expect(this.$node.html()).toMatch('
\n No emails in \'All\'.\n
'); }); }); }); diff --git a/web-ui/test/spec/mail_view/ui/send_button.spec.js b/web-ui/test/spec/mail_view/ui/send_button.spec.js index 05fce52c..f869362e 100644 --- a/web-ui/test/spec/mail_view/ui/send_button.spec.js +++ b/web-ui/test/spec/mail_view/ui/send_button.spec.js @@ -34,7 +34,7 @@ describeComponent('mail_view/ui/send_button', function () { $(document).trigger(Pixelated.events.ui.recipients.updated, { newRecipients: ['InvalidEmail']}); expect(this.$node).not.toBeDisabled(); - expect(this.$node.text()).toBe(i18n.t('send-button')); + expect(this.$node.text()).toBe(i18n.t('send')); }); }); @@ -87,7 +87,7 @@ describeComponent('mail_view/ui/send_button', function () { }); it('disables the button after clicking', function () { - expect(this.$node.text()).toBe(i18n.t('send-button')); + expect(this.$node.text()).toBe(i18n.t('send')); this.$node.click(); @@ -96,13 +96,13 @@ describeComponent('mail_view/ui/send_button', function () { }); it('enables again if sending errors out', function() { - expect(this.$node.text()).toBe(i18n.t('send-button')); + expect(this.$node.text()).toBe(i18n.t('send')); this.$node.click(); $(document).trigger(Pixelated.events.mail.send_failed); - expect(this.$node.text()).toBe(i18n.t('send-button')); + expect(this.$node.text()).toBe(i18n.t('send')); expect(this.$node.prop('disabled')).not.toBeTruthy(); }); diff --git a/web-ui/test/spec/services/mail_service.spec.js b/web-ui/test/spec/services/mail_service.spec.js index e8c27d05..bb710b6e 100644 --- a/web-ui/test/spec/services/mail_service.spec.js +++ b/web-ui/test/spec/services/mail_service.spec.js @@ -204,7 +204,7 @@ describeComponent('services/mail_service', function () { this.component.trigger(Pixelated.events.mail.archiveMany, mails); deferred.reject({}); - expect(this.component.errorMessage).toHaveBeenCalledWith(i18n.t('could-not-archive')); + expect(this.component.errorMessage).toHaveBeenCalledWith(i18n.t('failed-archive')); }); it('make an ajax request to /mails/archive', function() { -- cgit v1.2.3