Fix tests errors and warnings - iteration 6 (#12212) (#12227)

This commit is contained in:
Michael S. Molina
2021-01-26 04:34:05 -03:00
committed by GitHub
parent 4d04565c9a
commit 20503f92ae
10 changed files with 92 additions and 69 deletions

View File

@@ -59,7 +59,7 @@ describe('DashboardTable', () => {
},
mine: mockDashboards,
};
const wrapper = mount(<DashboardTable store={store} {...dashboardProps} />);
let wrapper = mount(<DashboardTable store={store} {...dashboardProps} />);
beforeAll(async () => {
await waitForComponentToPaint(wrapper);
@@ -87,15 +87,18 @@ describe('DashboardTable', () => {
expect(wrapper.find(DashboardCard)).toExist();
});
it('display EmptyState if there is no data', () => {
const wrapper = mount(
<DashboardTable
dashboardFilter="Mine"
user={{ userId: '2' }}
mine={[]}
store={store}
/>,
);
it('display EmptyState if there is no data', async () => {
await act(async () => {
wrapper = mount(
<DashboardTable
dashboardFilter="Mine"
user={{ userId: '2' }}
mine={[]}
store={store}
/>,
);
});
expect(wrapper.find('EmptyState')).toExist();
});
});