Merge pull request #8909 from mabashian/fix-test-warning

Fix console being thrown in Dashboard test

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-12-15 22:46:15 +00:00
committed by GitHub

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);
});