Fix console being thrown in Dashboard test

This commit is contained in:
mabashian 2020-12-15 17:01:55 -05:00
parent de0967a587
commit 70b90dbb24

View File

@ -35,9 +35,12 @@ describe('<Dashboard />', () => {
test('renders template list when the active tab is changed', async () => {
expect(pageWrapper.find('DashboardTemplateList').length).toBe(0);
pageWrapper
.find('button[aria-label="Recent Templates list tab"]')
.simulate('click');
await act(async () => {
pageWrapper
.find('button[aria-label="Recent Templates list tab"]')
.simulate('click');
});
pageWrapper.update();
expect(pageWrapper.find('DashboardTemplateList').length).toBe(1);
});