Vibe Genomics: Sequencing Your Whole Genome at Home
vibe-genomics.replit.app4 pointsby moozilla2 comments
test('shows spinner while loading and content after API call', async () => {
render(<Example />);
userEvent.click(screen.getByRole('button', { name: /load content/i }));
expect(screen.getByRole('main')).toHaveAttribute('aria-busy', 'true');
await waitFor(() => {
expect(screen.getByRole('main')).toHaveAttribute('aria-busy', 'false');
expect(screen.getByText(/content loaded/i)).toBeInTheDocument();
});
});
[1] https://testing-library.com/docs/queries/about#priority
[2] https://developer.mozilla.org/en-US/docs/Web/Accessibility/A...