diff options
author | Anike Arni <anikarni@gmail.com> | 2017-02-23 17:52:14 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-23 17:52:14 -0300 |
commit | d77d9c41e5a5b791cf54082f0f1ae83699f0bc95 (patch) | |
tree | 01c1431956f26dee28287281feeb926cab9c4835 /web-ui/test/integration | |
parent | b06face47a2e19cc1afcda3f0e298d19f7dcb6bb (diff) | |
parent | 5fbfde0e465539c5e8a03764a695cc45a85b1ca2 (diff) |
Merge pull request #990 from pixelated/login-errors
Create full translation integration test
Diffstat (limited to 'web-ui/test/integration')
-rw-r--r-- | web-ui/test/integration/translations.spec.js | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/web-ui/test/integration/translations.spec.js b/web-ui/test/integration/translations.spec.js index 1173695d..fe17838b 100644 --- a/web-ui/test/integration/translations.spec.js +++ b/web-ui/test/integration/translations.spec.js @@ -1,21 +1,23 @@ import { mount } from 'enzyme'; import expect from 'expect'; import React from 'react'; -import App from 'src/backup_account/app'; -import testI18n from './i18n' +import App from 'src/common/app'; +import BackupAccountPage from 'src/backup_account/page'; +import LoginPage from 'src/login/page'; +import testI18n from './i18n'; -describe('App', () => { - let app; - - beforeEach(() => { - app = mount(<App i18n={testI18n} />); - }); - - it('renders translated header logout text', () => { - expect(app.find('header').text()).toContain('Logout'); +describe('Translations', () => { + context('Backup Account Page', () => { + it('translates all key', () => { + const app = mount(<App i18n={testI18n} child={<BackupAccountPage />} />); + expect(app.text()).toNotContain('untranslated', 'Unstranslated message found in the text: ' + app.text()); + }); }); - it('renders translated footer text', () => { - expect(app.find('footer').text()).toContain('Product in development. Feedback and issues to team@pixelated-project.org'); + context('Login Page', () => { + it('translates all key', () => { + const app = mount(<App i18n={testI18n} child={<LoginPage />} />); + expect(app.text()).toNotContain('untranslated', 'Unstranslated message found in the text: ' + app.text()); + }); }); }); |