Skip to content

Commit

Permalink
Feature: create management / public workspaces when calling list api (#…
Browse files Browse the repository at this point in the history
…236)

* feat: create management / public workspaces when calling list api

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: fix bootstrap

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: integration test

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: flaky test

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
(cherry picked from commit 8ff9e88)
  • Loading branch information
SuZhou-Joe committed Oct 23, 2023
1 parent 1ac7ec4 commit 534269c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ContextValue, ServicesContextProvider } from '../contexts';
import { serviceContextMock } from '../contexts/services_context.mock';
import { wrapWithIntl, nextTick } from 'test_utils/enzyme_helpers';
import { ReactWrapper, mount } from 'enzyme';
import { waitFor } from '@testing-library/dom';

const mockFile = new File(['{"text":"Sample JSON data"}'], 'sample.json', {
type: 'application/json',
Expand Down Expand Up @@ -122,9 +123,11 @@ describe('ImportFlyout Component', () => {
expect(component.find(overwriteOptionIdentifier).first().props().checked).toBe(false);

// should update existing query
expect(mockUpdate).toBeCalledTimes(1);
expect(mockClose).toBeCalledTimes(1);
expect(mockRefresh).toBeCalledTimes(1);
await waitFor(() => {
expect(mockUpdate).toBeCalledTimes(1);
expect(mockClose).toBeCalledTimes(1);
expect(mockRefresh).toBeCalledTimes(1);
});
});

it('should handle errors during import', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ describe('workspace service', () => {
page: 1,
})
.expect(200);
expect(listResult.body.result.total).toEqual(1);
expect(listResult.body.result.total).toEqual(3);
});
});
});

0 comments on commit 534269c

Please sign in to comment.