Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
  • Loading branch information
prymitive committed Mar 21, 2021
1 parent d2e2ab1 commit bcd6ea4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions web/ui/react-app/src/pages/graph/ExpressionInput.test.tsx
Expand Up @@ -122,7 +122,7 @@ describe('ExpressionInput', () => {
const spyExecuteQuery = jest.fn();
const props = { ...expressionInputProps, executeQuery: spyExecuteQuery };
const wrapper = mount(<ExpressionInput {...props} />);
const btn = wrapper.find(Button).filterWhere(btn => btn.hasClass('execute-btn'));
const btn = wrapper.find(Button).filterWhere(btn => btn.props().color === 'primary');
btn.simulate('click');
expect(spyExecuteQuery).toHaveBeenCalledTimes(1);
});
Expand Down Expand Up @@ -259,9 +259,8 @@ describe('ExpressionInput', () => {
const addon = expressionInput.find(InputGroupAddon).filterWhere(addon => addon.prop('addonType') === 'append');
const button = addon
.find(Button)
.find('.execute-btn')
.find('.btn-primary')
.first();
expect(button.prop('color')).toEqual('primary');
expect(button.text()).toEqual('Execute');
});
});
2 changes: 1 addition & 1 deletion web/ui/react-app/src/pages/graph/QueryStatsView.test.tsx
Expand Up @@ -11,7 +11,7 @@ describe('QueryStatsView', () => {
};
const queryStatsView = shallow(<QueryStatsView {...queryStatsProps} />);
expect(queryStatsView.prop('className')).toEqual('query-stats');
expect(queryStatsView.children().prop('className')).toEqual('float-right');
expect(queryStatsView.children().prop('className')).toEqual('float-right text-secondary');
expect(queryStatsView.children().text()).toEqual('Load time: 100ms   Resolution: 5s   Result series: 10000');
});
});

0 comments on commit bcd6ea4

Please sign in to comment.