Skip to content

Commit

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

const tree = shallow(<Toolbar breadcrumbs={breadcrumbs} actions={outlinedActions} history={history} />);
const tree = shallow(<Toolbar breadcrumbs={breadcrumbs} actions={outlinedActions} pageTitle=''
history={history} />);
expect(tree).toMatchSnapshot();
});

Expand All @@ -128,7 +129,8 @@ describe('Toolbar', () => {
tooltip: 'test tooltip',
}];

const tree = shallow(<Toolbar breadcrumbs={breadcrumbs} actions={outlinedActions} history={history} />);
const tree = shallow(<Toolbar breadcrumbs={breadcrumbs} actions={outlinedActions} pageTitle=''
history={history} />);
expect(tree).toMatchSnapshot();
});

Expand All @@ -142,13 +144,14 @@ describe('Toolbar', () => {
tooltip: 'test tooltip',
}];

const tree = shallow(<Toolbar breadcrumbs={breadcrumbs} actions={outlinedActions} history={history} />);
const tree = shallow(<Toolbar breadcrumbs={breadcrumbs} actions={outlinedActions} pageTitle=''
history={history} />);
expect(tree).toMatchSnapshot();
});

it('renders with two breadcrumbs and two actions', () => {
const tree = shallow(<Toolbar breadcrumbs={breadcrumbs} actions={actions} history={history}
pageTitle='' />);
const tree = shallow(<Toolbar breadcrumbs={breadcrumbs} actions={actions} pageTitle=''
history={history} />);
expect(tree).toMatchSnapshot();
});
});
2 changes: 1 addition & 1 deletion frontend/src/components/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Toolbar extends React.Component<ToolbarProps> {
<BusyButton id={b.id} color='secondary' onClick={b.action} disabled={b.disabled}
title={b.title} icon={b.icon} busy={b.busy || false}
outlined={(b.outlined && !b.primary) || false}
className={b.primary ? commonCss.buttonAction : ''}/>
className={b.primary ? commonCss.buttonAction : ''} />
</div>
</Tooltip>
))}
Expand Down

0 comments on commit 23f6f36

Please sign in to comment.