test: Add nodeFetch back

This commit is contained in:
Ondrej Ezr 2024-07-18 15:00:23 +02:00 committed by Klara Simickova
parent 69b7c574ae
commit df993c7fc2
2 changed files with 10 additions and 7 deletions

View file

@ -220,16 +220,19 @@ describe('Repositories edit mode', () => {
const repoCheckbox = await screen.findByRole('checkbox', {
name: /select row 0/i,
});
expect(repoCheckbox).toBeChecked();
await waitFor(() => expect(repoCheckbox).toBeChecked());
await user.click(repoCheckbox);
await new Promise((r) => setTimeout(r, 1000));
user.click(repoCheckbox);
await screen.findByText(/Are you sure?/);
const removeAnywayBtn = await screen.findByRole('button', {
name: /Remove anyway/,
});
await user.click(removeAnywayBtn);
user.click(removeAnywayBtn);
expect(repoCheckbox).not.toBeChecked();
await waitFor(() =>
expect(screen.queryByText(/Are you sure?/)).not.toBeInTheDocument()
);
await waitFor(() => expect(repoCheckbox).not.toBeChecked());
});
});