1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-27 17:29:39 +02:00

feat(ui): write tests [EE-6685] (#11082)

This commit is contained in:
Chaim Lev-Ari 2024-02-14 17:25:32 +02:00 committed by GitHub
parent 513cd9c9b3
commit a83321ebe6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 232 additions and 15 deletions

View file

@ -29,15 +29,15 @@ test('submit button should be disabled when name or image is missing', async ()
expect(button).toBeDisabled();
const nameInput = getByLabelText(/name/i);
userEvent.type(nameInput, 'name');
await userEvent.type(nameInput, 'name');
const imageInput = getByLabelText(/image/i);
userEvent.type(imageInput, 'image');
await userEvent.type(imageInput, 'image');
await expect(findByText(/Deploy the container/)).resolves.toBeEnabled();
expect(nameInput).toHaveValue('name');
userEvent.clear(nameInput);
await userEvent.clear(nameInput);
await expect(findByText(/Deploy the container/)).resolves.toBeDisabled();
});