diff options
author | Anike Arni <aarni@thoughtworks.com> | 2017-02-22 10:52:52 -0300 |
---|---|---|
committer | Anike Arni <aarni@thoughtworks.com> | 2017-02-22 15:22:55 -0300 |
commit | 38c73f2e67173d5358dd4bb7e17b1e5b9c283f22 (patch) | |
tree | b7fc2c890eb7242877e47cf926a4aa45a171bcce /web-ui/test/unit | |
parent | f7bd078bcce2d6cad419fceb55ab71415cda4d33 (diff) |
[#907] Add pixelated welcome message to login
with @tuliocasagrande and @thaissiqueira
Diffstat (limited to 'web-ui/test/unit')
-rw-r--r-- | web-ui/test/unit/login/app.spec.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/web-ui/test/unit/login/app.spec.js b/web-ui/test/unit/login/app.spec.js index c1d63235..e329af0f 100644 --- a/web-ui/test/unit/login/app.spec.js +++ b/web-ui/test/unit/login/app.spec.js @@ -4,6 +4,7 @@ import React from 'react'; import { App } from 'src/login/app'; import AuthError from 'src/login/error/auth_error'; import GenericError from 'src/login/error/generic_error'; +import PixelatedWelcome from 'src/login/about/pixelated_welcome'; describe('App', () => { let app; @@ -14,16 +15,26 @@ describe('App', () => { expect(app.find('form').props().action).toEqual('/login'); }); + it('renders welcome message when no error', () => { + app = shallow(<App t={mockTranslations} />); + expect(app.find(PixelatedWelcome).length).toEqual(1); + }); + it('renders auth error message', () => { app = shallow(<App t={mockTranslations} authError />); expect(app.find(AuthError).length).toEqual(1); }); - it('renders generic error message', () => { + it('renders generic error message when error', () => { app = shallow(<App t={mockTranslations} error />); expect(app.find(GenericError).length).toEqual(1); }); + it('does not render welcome message when error', () => { + app = shallow(<App t={mockTranslations} error />); + expect(app.find(PixelatedWelcome).length).toEqual(0); + }); + it('does not render error message', () => { app = shallow(<App t={mockTranslations} />); expect(app.find(AuthError).length).toEqual(0); |