Skip to content

Commit

Permalink
remove other browsers and fixup test
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson authored Mar 8, 2024
1 parent 390bb6a commit 69718a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions website/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ export default defineConfig({
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
} /* ,
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
},*/
],
});
6 changes: 3 additions & 3 deletions website/src/components/ReviewPage/ReviewPage.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ describe('ReviewPage', () => {
getByText('Discard sequences').click();

await waitFor(() => {

Check failure on line 119 in website/src/components/ReviewPage/ReviewPage.spec.tsx

View workflow job for this annotation

GitHub Actions / Unit Tests

src/components/ReviewPage/ReviewPage.spec.tsx > ReviewPage > should render the review page and show button to bulk delete/approve all erroneous sequences

TestingLibraryElementError: Unable to find an element with the text: (text) => text.includes("Release 1 sequence"). This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style <body> <div> <div class="flex flex-col py-2" > <div> 2 of 2 sequences processed. </div> <div> <input checked="" class="mr-3" title="Show sequences with errors" type="checkbox" /> Show Errors </div> </div> <div class="flex justify-end items-center gap-3" > <div class="relative inline-block text-left" data-headlessui-state="open" > <button aria-controls="headlessui-menu-items-:r1:" aria-expanded="true" aria-haspopup="menu" class="border rounded-md p-1 bg-gray-500 text-white px-2" data-headlessui-state="open" id="headlessui-menu-button-:r0:" type="button" > <svg class="inline-block w-4 h-4 -mt-0.5 mr-1.5" height="1.2em" viewBox="0 0 16 16" width="1.2em" > <g fill="currentColor" > <path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z" /> <path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z" /> </g> </svg> Discard sequences <svg class="inline-block ml-1 w-3 h-3 -mt-0.5" height="1.2em" viewBox="0 0 40 40" width="1.2em" > <path d="M4.659 11.833h30.682L20 32.167z" fill="currentColor" /> </svg> </button> <div aria-labelledby="headlessui-menu-button-:r0:" class="origin-top-right absolute z-50 bg-white" data-headlessui-state="open" id="headlessui-menu-items-:r1:" role="menu" tabindex="0" > <div class="py-1" role="none" > <button class="group flex rounded-md items-center w-full px-2 py-2 text-sm hover:bg-gray-400 bg-gray-500 text-white text-left mb-1" data-headlessui-state="" id="headlessui-menu-item-:r2:" role="menuitem" tabindex="-1" > <svg class="inline-block w-4 h-4 -mt-0.5 mr-1.5" height="1.2em" viewBox="0 0 16 16" width="1.2em" > <g fill="currentColor" > <path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z" /> <path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z" /> </g> </svg> Discard 1 sequence with errors </button> <button class="group flex rounded-md items-center w-full px-2 py-2 text-sm hover:bg-gray-400 bg-gray-500 text-white text-left mb-1" data-headlessui-state="" id="headlessui-menu-item-:r3:"
expect(getByText((text) => text.includes('Discard 1 sequences with errors'))).toBeDefined();
expect(getByText((text) => text.includes('Release 1 sequences without errors'))).toBeDefined();
expect(getByText((text) => text.includes('Discard 1 sequence with errors'))).toBeDefined();
expect(getByText((text) => text.includes('Release 1 sequence'))).toBeDefined();
});

mockRequest.backend.getSequences(200, generateGetSequencesResponse([]));

getByText((text) => text.includes('Release 1 sequences without errors')).click();
getByText((text) => text.includes('Release 1 valid sequence')).click();
await waitFor(() => {
expect(getByText('Confirm')).toBeDefined();
});
Expand Down
5 changes: 3 additions & 2 deletions website/src/components/ReviewPage/ReviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const InnerReviewPage: FC<ReviewPageProps> = ({ clientConfig, organism, accessTo
}
>
<BiTrash className='inline-block w-4 h-4 -mt-0.5 mr-1.5' />
Discard {errorCount} sequences with errors
Discard {errorCount} sequence{errorCount > 1 ? 's' : ''} with errors
</button>
</Menu.Item>
)}
Expand Down Expand Up @@ -183,7 +183,8 @@ const InnerReviewPage: FC<ReviewPageProps> = ({ clientConfig, organism, accessTo
}
>
<WpfPaperPlane className='inline-block w-4 h-4 -mt-0.5 mr-1.5' />
Release {processedCount + revocationCount} valid sequences
Release {processedCount + revocationCount} valid sequence
{processedCount + revocationCount > 1 ? 's' : ''}
</button>
)}
</div>
Expand Down

0 comments on commit 69718a8

Please sign in to comment.