Skip to content

Commit

Permalink
fix tests and format
Browse files Browse the repository at this point in the history
  • Loading branch information
fengelniederhammer committed Jan 22, 2025
1 parent a6bdac8 commit c128424
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 1 addition & 3 deletions backend/src/main/kotlin/org/loculus/backend/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ data class Schema(
val submissionDataTypes: SubmissionDataTypes = SubmissionDataTypes(),
)

data class SubmissionDataTypes(
val consensusSequences: Boolean = true,
)
data class SubmissionDataTypes(val consensusSequences: Boolean = true)

// The Json property names need to be kept in sync with website config enum `metadataPossibleTypes` in `config.ts`
// They also need to be in sync with SILO database config, as the Loculus config is a sort of superset of it
Expand Down
12 changes: 7 additions & 5 deletions website/src/components/SearchPage/SearchFullUI.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { render, screen, waitFor, waitForElementToBeRemoved } from '@testing-lib
import userEvent from '@testing-library/user-event';
import { beforeEach, describe, expect, it, vi } from 'vitest';

import { SearchFullUI } from './SearchFullUI';
import { testConfig, testOrganism, testSiteName } from '../../../vitest.setup.ts';
import { type InnerSearchFullUIProps, SearchFullUI } from './SearchFullUI';
import { testConfig, testOrganism } from '../../../vitest.setup.ts';
import { lapisClientHooks } from '../../services/serviceHooks.ts';
import type { MetadataFilter, Schema } from '../../types/config.ts';
import type { ReferenceGenomesSequenceNames, ReferenceAccession } from '../../types/referencesGenomes.ts';
import type { ReferenceAccession, ReferenceGenomesSequenceNames } from '../../types/referencesGenomes.ts';

global.ResizeObserver = class FakeResizeObserver {
observe() {}
Expand Down Expand Up @@ -89,18 +89,20 @@ function renderSearchFullUI({
accessToken: 'dummyAccessToken',
referenceGenomesSequenceNames,
myGroups: [],
websiteName: testSiteName,
organism: testOrganism,
clientConfig,
schema: {
metadata: metadataSchema,
tableColumns: ['field1', 'field3'],
primaryKey: 'accession',
submissionDataTypes: {
consensusSequences: true,
},
} as Schema,
initialData: [],
initialCount: 0,
initialQueryDict: {},
};
} satisfies InnerSearchFullUIProps;

render(
<QueryClientProvider client={new QueryClient()}>
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/SearchPage/SearchFullUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
import { EditDataUseTermsModal } from '../DataUseTerms/EditDataUseTermsModal.tsx';
import ErrorBox from '../common/ErrorBox.tsx';

interface InnerSearchFullUIProps {
export interface InnerSearchFullUIProps {
accessToken?: string;
referenceGenomesSequenceNames: ReferenceGenomesSequenceNames;
myGroups: Group[];
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Submission/RevisionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { DataUploadForm } from './DataUploadForm.tsx';
import { routes } from '../../routes/routes.ts';
import { type Group } from '../../types/backend.ts';
import type { InputField } from '../../types/config.ts';
import type { SubmissionDataTypes } from '../../types/config.ts';
import type { ReferenceGenomesSequenceNames } from '../../types/referencesGenomes';
import type { ClientConfig } from '../../types/runtimeConfig.ts';
import type { SubmissionDataTypes } from '../../types/config.ts';

type RevisionFormProps = {
accessToken: string;
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Submission/SubmissionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { DataUploadForm } from './DataUploadForm.tsx';
import { routes } from '../../routes/routes.ts';
import { type Group } from '../../types/backend.ts';
import type { InputField } from '../../types/config.ts';
import type { SubmissionDataTypes } from '../../types/config.ts';
import type { ReferenceGenomesSequenceNames } from '../../types/referencesGenomes';
import type { ClientConfig } from '../../types/runtimeConfig.ts';
import type { SubmissionDataTypes } from '../../types/config.ts';

type SubmissionFormProps = {
accessToken: string;
Expand Down

0 comments on commit c128424

Please sign in to comment.