diff options
author | Sriram Viswanathan <sriramv@thoughtworks.com> | 2017-03-24 14:39:43 -0300 |
---|---|---|
committer | Sriram Viswanathan <sriramv@thoughtworks.com> | 2017-03-24 14:39:43 -0300 |
commit | ccc31c1e1867c37335ee3fbdd4bc729ad6917883 (patch) | |
tree | 3b85bd81921e65ca86892139a7564a4df535b314 /web-ui/src/common/header/header.spec.js | |
parent | 4688646080ea8c7783f94371d2fe2f1dafb7b335 (diff) |
|#973| Thais + Sriram | Adds title and aria label for the logout button on the header
Diffstat (limited to 'web-ui/src/common/header/header.spec.js')
-rw-r--r-- | web-ui/src/common/header/header.spec.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/web-ui/src/common/header/header.spec.js b/web-ui/src/common/header/header.spec.js index e5004bcc..81a952c7 100644 --- a/web-ui/src/common/header/header.spec.js +++ b/web-ui/src/common/header/header.spec.js @@ -2,16 +2,20 @@ import { shallow } from 'enzyme'; import expect from 'expect'; import React from 'react'; import { Header } from 'src/common/header/header'; +import Logout from 'src/common/logout/logout'; describe('Header', () => { let header; beforeEach(() => { - const mockTranslations = key => key; - header = shallow(<Header t={mockTranslations} />); + header = shallow(<Header />); }); - it('renders the header content', () => { - expect(header.find('header').text()).toContain('Logout'); + it('renders the header containing the logout button', () => { + expect(header.find('header').find(Logout)).toExist(); + }); + + it('renders the header pixelated logo', () => { + expect(header.find('header').find('img').props().alt).toEqual('Pixelated'); }); }); |