front/plugins/home-page: fix SquadTechHealth tests

This commit is contained in:
Patrik Oldsberg
2020-02-07 11:08:33 +01:00
parent da8895abac
commit 961dc279a9
@@ -1,26 +0,0 @@
import SquadTechHealth from './SquadTechHealth';
import { buildComponentInApp } from 'testUtils';
const minProps = {
user: {
googleCloudPlatformProjects: [],
squads: [{ id: 'tools', googleCloudPlatformProjects: [], services: [] }],
},
squads: ['tools'],
insights: {
testCertified: 0.5,
},
};
describe('<SquadTechHealth/>', () => {
it('renders without exploding', () => {
const rendered = buildComponentInApp(SquadTechHealth)
.withTheme()
.render(minProps);
expect(rendered.getByText('Test Certified')).toBeInTheDocument();
expect(rendered.getByText('50%')).toBeInTheDocument();
expect(rendered.getByText('Cloud Cost')).toBeInTheDocument();
});
});