From e3efaba7750703250d5053a58df53d2c8c5be78b Mon Sep 17 00:00:00 2001 From: Yongjie Zhao Date: Wed, 7 Apr 2021 20:08:04 +0800 Subject: [PATCH] test: prevent flaky frontend unit test case (#13984) * test: prevent flaky unit test case * Update superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> --- .../spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx b/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx index 9b7eefc8a..c1f02e09a 100644 --- a/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx +++ b/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx @@ -84,7 +84,7 @@ describe('ChangeDatasourceModal', () => { }); it('fetches datasources', async () => { - expect(fetchMock.calls(/api\/v1\/dataset\/\\?q*/)).toHaveLength(3); + expect(fetchMock.calls(INFO_ENDPOINT)).toHaveLength(3); }); it('renders confirmation message', async () => {