multiple: fix act errors in the tests
This also helps reduce noise in the test output.
This commit is contained in:
parent
c2998306cf
commit
78bb1e118b
3 changed files with 5 additions and 3 deletions
|
|
@ -65,7 +65,7 @@ describe('Blueprints', () => {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const { router } = await renderCustomRoutesWithReduxRouter();
|
const view = renderCustomRoutesWithReduxRouter();
|
||||||
await screen.findByText('No blueprints yet');
|
await screen.findByText('No blueprints yet');
|
||||||
const emptyStateAction = screen.getByRole('link', {
|
const emptyStateAction = screen.getByRole('link', {
|
||||||
name: /Add blueprint/i,
|
name: /Add blueprint/i,
|
||||||
|
|
@ -73,6 +73,8 @@ describe('Blueprints', () => {
|
||||||
expect(emptyStateAction).toBeInTheDocument();
|
expect(emptyStateAction).toBeInTheDocument();
|
||||||
|
|
||||||
user.click(emptyStateAction);
|
user.click(emptyStateAction);
|
||||||
|
|
||||||
|
const { router } = await view;
|
||||||
await waitFor(() =>
|
await waitFor(() =>
|
||||||
expect(router.state.location.pathname).toBe(
|
expect(router.state.location.pathname).toBe(
|
||||||
'/insights/image-builder/imagewizard'
|
'/insights/image-builder/imagewizard'
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ const addSatelliteRegistrationCommandViaKeyDown = async (command: string) => {
|
||||||
|
|
||||||
await waitFor(() => user.clear(satelliteRegistrationCommand));
|
await waitFor(() => user.clear(satelliteRegistrationCommand));
|
||||||
await waitFor(() => user.type(satelliteRegistrationCommand, command));
|
await waitFor(() => user.type(satelliteRegistrationCommand, command));
|
||||||
satelliteRegistrationCommand.blur();
|
await waitFor(() => satelliteRegistrationCommand.blur());
|
||||||
};
|
};
|
||||||
|
|
||||||
const uploadFile = async (scriptName: string): Promise<void> => {
|
const uploadFile = async (scriptName: string): Promise<void> => {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ describe('Images Table', () => {
|
||||||
|
|
||||||
const user = userEvent.setup();
|
const user = userEvent.setup();
|
||||||
test('render ImagesTable', async () => {
|
test('render ImagesTable', async () => {
|
||||||
await renderCustomRoutesWithReduxRouter();
|
renderCustomRoutesWithReduxRouter();
|
||||||
|
|
||||||
const table = await screen.findByTestId('images-table');
|
const table = await screen.findByTestId('images-table');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue