summaryrefslogtreecommitdiff
path: root/web-ui/test/integration/translations.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/test/integration/translations.spec.js')
-rw-r--r--web-ui/test/integration/translations.spec.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/web-ui/test/integration/translations.spec.js b/web-ui/test/integration/translations.spec.js
index fe17838b..9b5256ee 100644
--- a/web-ui/test/integration/translations.spec.js
+++ b/web-ui/test/integration/translations.spec.js
@@ -2,11 +2,45 @@ import { mount } from 'enzyme';
import expect from 'expect';
import React from 'react';
import App from 'src/common/app';
+import AccountRecoveryPage from 'src/account_recovery/page';
import BackupAccountPage from 'src/backup_account/page';
import LoginPage from 'src/login/page';
import testI18n from './i18n';
describe('Translations', () => {
+ context('Account Recovery Page', () => {
+ it('translates all keys on admin recovery code step', () => {
+ const app = mount(<App i18n={testI18n} child={<AccountRecoveryPage />} />);
+ expect(app.text()).toNotContain('untranslated', 'Unstranslated message found in the text: ' + app.text());
+ });
+
+ it('translates all keys on user recovery code step', () => {
+ const app = mount(<App i18n={testI18n} child={<AccountRecoveryPage />} />);
+ app.find('form.admin-code').simulate('submit');
+
+ expect(app.text()).toNotContain('untranslated', 'Unstranslated message found in the text: ' + app.text());
+ });
+
+ it('translates all keys on new password step', () => {
+ const app = mount(<App i18n={testI18n} child={<AccountRecoveryPage />} />);
+ app.find('form.admin-code').simulate('submit');
+ app.find('form.user-code').simulate('submit');
+
+ expect(app.text()).toNotContain('untranslated', 'Unstranslated message found in the text: ' + app.text());
+ });
+
+ it('translates all keys on backup account step', () => {
+ const app = mount(<App i18n={testI18n} child={<AccountRecoveryPage />} />);
+ app.find('form.admin-code').simulate('submit');
+ app.find('form.user-code').simulate('submit');
+ app.find('input[name="new-password"]').simulate('change', {target: {value: '11'}});
+ app.find('input[name="confirm-password"]').simulate('change', {target: {value: '11'}});
+ app.find('form.new-password').simulate('submit');
+
+ expect(app.text()).toNotContain('untranslated', 'Unstranslated message found in the text: ' + app.text());
+ });
+ });
+
context('Backup Account Page', () => {
it('translates all key', () => {
const app = mount(<App i18n={testI18n} child={<BackupAccountPage />} />);