Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasser Elsayed committed Nov 21, 2018
1 parent 23f6f36 commit 8cdbaf1
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 14 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Toolbar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('Toolbar', () => {
});

it('renders without actions, one breadcrumb, and a page name', () => {
const tree = shallow(<Toolbar breadcrumbs={breadcrumbs} actions={[]} history={history}
const tree = shallow(<Toolbar breadcrumbs={[breadcrumbs[0]]} actions={[]} history={history}
pageTitle='test page title' />);
expect(tree).toMatchSnapshot();
});
Expand Down
51 changes: 38 additions & 13 deletions frontend/src/components/__snapshots__/Toolbar.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,22 @@ exports[`Toolbar renders primary action buttons 1`] = `
test display name
</Link>
</span>
<span
className="flex"
key="1"
title="test display name2"
>
<pure(ChevronRightIcon)
className="chevron"
/>
<Link
className="unstyled ellipsis link"
replace={false}
to="/some/test/path2"
>
test display name2
</Link>
</span>
</div>
<div
className="flex"
Expand All @@ -137,10 +153,7 @@ exports[`Toolbar renders primary action buttons 1`] = `
</WithStyles(Tooltip)>
<span
className="pageName ellipsis"
title="test display name2"
>
test display name2
</span>
/>
</div>
</div>
<div
Expand Down Expand Up @@ -229,9 +242,7 @@ exports[`Toolbar renders primary action buttons without outline, even if outline
</WithStyles(Tooltip)>
<span
className="pageName ellipsis"
>
test page title
</span>
/>
</div>
</div>
<div
Expand Down Expand Up @@ -285,6 +296,22 @@ exports[`Toolbar renders with two breadcrumbs and two actions 1`] = `
test display name
</Link>
</span>
<span
className="flex"
key="1"
title="test display name2"
>
<pure(ChevronRightIcon)
className="chevron"
/>
<Link
className="unstyled ellipsis link"
replace={false}
to="/some/test/path2"
>
test display name2
</Link>
</span>
</div>
<div
className="flex"
Expand All @@ -304,10 +331,7 @@ exports[`Toolbar renders with two breadcrumbs and two actions 1`] = `
</WithStyles(Tooltip)>
<span
className="pageName ellipsis"
title="test display name2"
>
test display name2
</span>
/>
</div>
</div>
<div
Expand Down Expand Up @@ -461,9 +485,8 @@ exports[`Toolbar renders without actions, one breadcrumb, and a page name 1`] =
</WithStyles(Tooltip)>
<span
className="pageName ellipsis"
title="test display name2"
>
test display name2
test page title
</span>
</div>
</div>
Expand Down Expand Up @@ -512,6 +535,7 @@ exports[`Toolbar renders without breadcrumbs and a component page title 1`] = `
<div>
<BusyButton
busy={false}
className=""
color="secondary"
icon={[Function]}
id="test id"
Expand Down Expand Up @@ -560,6 +584,7 @@ exports[`Toolbar renders without breadcrumbs and a string page title 1`] = `
<div>
<BusyButton
busy={false}
className=""
color="secondary"
icon={[Function]}
id="test id"
Expand Down

0 comments on commit 8cdbaf1

Please sign in to comment.