From 1997c401a5e67b76663d3996ec085eb6782c34e9 Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Thu, 23 Feb 2017 11:34:14 -0300 Subject: [#907] Adds integration test for translations For this test, we refactored the way translations were done for backup account and login, concentrating them in the common/app.js component. with @thaissiqueira --- web-ui/test/integration/translations.spec.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'web-ui/test/integration') 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(); - }); - - 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(} />); + 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(} />); + expect(app.text()).toNotContain('untranslated', 'Unstranslated message found in the text: ' + app.text()); + }); }); }); -- cgit v1.2.3