Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Bauer <[email protected]>
  • Loading branch information
bimtauer committed Mar 1, 2024
1 parent 96df4fa commit 09f1dfb
Showing 1 changed file with 36 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
import * as React from 'react';
import { ThemeProvider } from '@mui/material/styles';
import {
fireEvent,
screen,
queryAllByRole,
render,
waitFor,
getByRole,
within,
} from '@testing-library/react';
import { muiTheme } from '@clients/theme/Theme/muiTheme';
import {
QueryClient,
QueryClientProvider as QueryClientProviderImport,
QueryClientProviderProps,
} from 'react-query';
import Long from 'long';
import { RequestConfig } from '@clients/common/types/adminEntityTypes';
import { APIContext } from '../../../data/apiContext';
import { mockAPIContextValue } from '../../../data/__mocks__/apiContext';

import {
BlobDimensionality,
Identifier,
Expand All @@ -27,18 +8,10 @@ import {
Variable,
} from '../../../../models/Common/types';
import {

Check failure on line 10 in packages/oss-console/src/components/Launch/LaunchForm/test/LaunchWorkflowFormInputs.test.tsx

View workflow job for this annotation

GitHub Actions / lint_project

`react-query` import should occur before import of `../../../../models/Common/types`
createWorkflowExecution, // CreateWorkflowExecutionArguments
} from '../../../../models/Execution/api';
import { listLaunchPlans } from '../../../../models/Launch/api';
import { LaunchPlan } from '../../../../models/Launch/types';
import { getWorkflow, listWorkflows } from '../../../../models/Workflow/api';
import { Workflow } from '../../../../models/Workflow/types';
import { createMockWorkflowClosure } from '../../../../models/__mocks__/workflowData';
import { createTestQueryClient } from '../../../../test/utils';
import { WorkflowNodeExecutionsProvider } from '../../../Executions/contextProvider/NodeExecutionDetails/WorkflowNodeExecutionsProvider';
import t from '../strings';
import { LaunchForm } from '../LaunchForm';
import { LaunchFormProps } from '../types';
QueryClient,
QueryClientProvider as QueryClientProviderImport,
QueryClientProviderProps,
} from 'react-query';
import {
blobType,
collectionType,
Expand All @@ -49,10 +22,38 @@ import {
unionType,
} from '../__mocks__/mockInputs';
import {

Check failure on line 24 in packages/oss-console/src/components/Launch/LaunchForm/test/LaunchWorkflowFormInputs.test.tsx

View workflow job for this annotation

GitHub Actions / lint_project

`@testing-library/react` import should occur before import of `../../../../models/Common/types`
// stringInputName,
fireEvent,
getByRole,
queryAllByRole,
render,
screen,
waitFor,
within,
} from '@testing-library/react';
import { getWorkflow, listWorkflows } from '../../../../models/Workflow/api';

import { APIContext } from '../../../data/apiContext';
import { LaunchForm } from '../LaunchForm';
import { LaunchFormProps } from '../types';
import { LaunchPlan } from '../../../../models/Launch/types';
import Long from 'long';

Check failure on line 39 in packages/oss-console/src/components/Launch/LaunchForm/test/LaunchWorkflowFormInputs.test.tsx

View workflow job for this annotation

GitHub Actions / lint_project

`long` import should occur before import of `../../../../models/Common/types`
import { RequestConfig } from '@clients/common/types/adminEntityTypes';

Check failure on line 40 in packages/oss-console/src/components/Launch/LaunchForm/test/LaunchWorkflowFormInputs.test.tsx

View workflow job for this annotation

GitHub Actions / lint_project

`@clients/common/types/adminEntityTypes` import should occur before import of `../../../../models/Common/types`
import { ThemeProvider } from '@mui/material/styles';

Check failure on line 41 in packages/oss-console/src/components/Launch/LaunchForm/test/LaunchWorkflowFormInputs.test.tsx

View workflow job for this annotation

GitHub Actions / lint_project

`@mui/material/styles` import should occur before import of `../../../../models/Common/types`
import { Workflow } from '../../../../models/Workflow/types';
import { WorkflowNodeExecutionsProvider } from '../../../Executions/contextProvider/NodeExecutionDetails/WorkflowNodeExecutionsProvider';
import { createMockObjects } from './utils';
import { createMockWorkflowClosure } from '../../../../models/__mocks__/workflowData';
import { createTestQueryClient } from '../../../../test/utils';
import {
createWorkflowExecution
} from '../../../../models/Execution/api';
import { listLaunchPlans } from '../../../../models/Launch/api';
import { mockAPIContextValue } from '../../../data/__mocks__/apiContext';
import { muiTheme } from '@clients/theme/Theme/muiTheme';

Check failure on line 52 in packages/oss-console/src/components/Launch/LaunchForm/test/LaunchWorkflowFormInputs.test.tsx

View workflow job for this annotation

GitHub Actions / lint_project

`@clients/theme/Theme/muiTheme` import should occur before import of `../../../../models/Common/types`
import {
stringNoLabelName,
} from './constants';
import { createMockObjects } from './utils';
import t from '../strings';
import { workflowNoInputsString } from '../constants';

const QueryClientProvider: React.FC<React.PropsWithChildren<QueryClientProviderProps>> =
Expand Down Expand Up @@ -2224,7 +2225,7 @@ describe('LaunchForm: Workflow', () => {
// expect datetime to be correctly prepopulated
await waitFor(() => {
// bool should be true
expect(datetimeInput!).toHaveValue('10/17/2023 19:07:39');
expect(datetimeInput!).toHaveValue('2023-10-17 19:07:39');
});

// expect no validation error
Expand Down

0 comments on commit 09f1dfb

Please sign in to comment.