From a519fc7141614a7316b04b0753b88f25208f963a Mon Sep 17 00:00:00 2001 From: Marcos Prieto Date: Tue, 2 Nov 2021 10:27:22 +0100 Subject: [PATCH] Add delay to fix flaky test --- .../frontend_apps/components/test/FilePickerApp-test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/static/scripts/frontend_apps/components/test/FilePickerApp-test.js b/lms/static/scripts/frontend_apps/components/test/FilePickerApp-test.js index 1c5d596540..ed8b04bf19 100644 --- a/lms/static/scripts/frontend_apps/components/test/FilePickerApp-test.js +++ b/lms/static/scripts/frontend_apps/components/test/FilePickerApp-test.js @@ -7,7 +7,7 @@ import { Config } from '../../config'; import FilePickerApp, { $imports } from '../FilePickerApp'; import { checkAccessibility } from '../../../test-util/accessibility'; import mockImportedComponents from '../../../test-util/mock-imported-components'; -import { waitFor } from '../../../test-util/wait'; +import { delay, waitFor } from '../../../test-util/wait'; function interact(wrapper, callback) { act(callback); @@ -145,6 +145,7 @@ describe('FilePickerApp', () => { selectContent(wrapper, 'https://example.com'); await waitFor(() => fakeAPICall.called); + await delay(100); wrapper.update(); assert.calledWith(fakeAPICall, {