Skip to content

Commit

Permalink
fix(website): allow unaligned sequences #741 (#944)
Browse files Browse the repository at this point in the history
  • Loading branch information
bh-ethz authored Feb 8, 2024
1 parent 4fb516a commit 7733ab3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('SequencesContainer', () => {

click('Sequence');
await waitFor(() => {
expect(screen.getByText("LAPIS v2 doesn't support unaligned nucleotide sequences yet")).toBeVisible();
expect(screen.getByText(unalignedSingleSegmentSequence)).toBeVisible();
});
});

Expand All @@ -89,7 +89,7 @@ describe('SequencesContainer', () => {

click(`${multiSegmentName} (unaligned)`);
await waitFor(() => {
expect(screen.getByText("LAPIS v2 doesn't support unaligned nucleotide sequences yet")).toBeVisible();
expect(screen.getByText(unalignedMultiSegmentSequence)).toBeVisible();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type FC, useMemo } from 'react';
import { getLapisUrl } from '../../config.ts';
import { lapisClientHooks } from '../../services/serviceHooks.ts';
import type { ClientConfig } from '../../types/runtimeConfig.ts';
import { isUnalignedSequence, type SequenceType } from '../../utils/sequenceTypeHelpers.ts';
import { type SequenceType } from '../../utils/sequenceTypeHelpers.ts';
import { splitString } from '../../utils/splitLines';

const LINE_LENGTH = 100;
Expand All @@ -30,10 +30,6 @@ export const SequencesViewer: FC<Props> = ({

const lines = useMemo(() => (data !== undefined ? splitString(data.sequence, LINE_LENGTH) : undefined), [data]);

if (isUnalignedSequence(sequenceType)) {
return <div className='text-error'>LAPIS v2 doesn't support unaligned nucleotide sequences yet</div>;
}

if (error !== null) {
return (
<div className='text-error'>
Expand Down

0 comments on commit 7733ab3

Please sign in to comment.