|
1 | | -xdescribe('<SidebarContainer />', () => { |
2 | | - it('should render an <img> tag with the Chronos logo'); |
3 | | - it("should render a <Link /> with the label as 'Home'"); |
4 | | - it("should render a <Link /> with the label as 'About'"); |
5 | | - it("should render a <Link /> with the label as 'Contact'"); |
6 | | - it("should render a <Link /> with the label as 'Settings'"); |
| 1 | +import React from 'react'; |
| 2 | +import { configure, shallow, render } from 'enzyme'; |
| 3 | + |
| 4 | +import SidebarContainer from '../../../app/containers/SidebarContainer' |
| 5 | +import { Link } from 'react-router-dom'; |
| 6 | + |
| 7 | + |
| 8 | +describe('<SidebarContainer />', () => { |
| 9 | + it('should render an <img> tag with the Chronos logo', () => { |
| 10 | + const wrapper = shallow(<SidebarContainer />); |
| 11 | + console.log(wrapper.debug({ verbose: true })) |
| 12 | + |
| 13 | + expect(wrapper.contains(<img alt="Chronos Logo" id="serviceDashLogo" src="../assets/icon2Cropped.png" />)).toBe(true); |
| 14 | + }); |
| 15 | + it("should render a <Link /> with the label as 'Home'", () => { |
| 16 | + const wrapper = shallow(<SidebarContainer />); |
| 17 | + |
| 18 | + expect(wrapper.contains(<Link className="sidebar-link" to="/"> |
| 19 | + Home |
| 20 | + </Link>)).toBe(true) |
| 21 | + }); |
| 22 | + it("should render a <Link /> with the label as 'About'", () => { |
| 23 | + const wrapper = shallow(<SidebarContainer />); |
| 24 | + |
| 25 | + expect(wrapper.contains(<Link className="sidebar-link" to="/"> |
| 26 | + About |
| 27 | + </Link>)).toBe(true) |
| 28 | + }); |
| 29 | + it("should render a <Link /> with the label as 'Contact'", () => { |
| 30 | + const wrapper = shallow(<SidebarContainer />); |
| 31 | + |
| 32 | + expect(wrapper.contains(<Link className="sidebar-link" to="/"> |
| 33 | + Contact |
| 34 | + </Link>)).toBe(true) |
| 35 | + }); |
| 36 | + it("should render a <Link /> with the label as 'Settings'", () => { |
| 37 | + const wrapper = shallow(<SidebarContainer />); |
| 38 | + |
| 39 | + expect(wrapper.contains(<Link className="sidebar-link" to="/"> |
| 40 | + Settings |
| 41 | + </Link>)).toBe(true) |
| 42 | + }); |
| 43 | + |
| 44 | + |
7 | 45 | }); |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
0 commit comments