-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove warnings from tests (#2369)
* fix: wrap fireEvent in act() * fix: ensure disabled is always passed a boolean processing can be a uid or a boolean * fix: replace react-beautiful-dnd with @hello-pangea/dnd
- Loading branch information
1 parent
72288f4
commit 8f4f830
Showing
8 changed files
with
54 additions
and
79 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,23 +161,31 @@ test('GroupForm: Input change', async () => { | |
const { inputs } = await setup(); | ||
|
||
expect(inputs.name).toHaveValue('Group name'); | ||
fireEvent.change(inputs.name, { target: { value: 'New name' } }); | ||
await act(async () => | ||
fireEvent.change(inputs.name, { target: { value: 'New name' } }) | ||
); | ||
expect(inputs.name).toHaveValue('New name'); | ||
|
||
expect(inputs.description).toHaveValue('Group description'); | ||
fireEvent.change(inputs.description, { | ||
target: { value: 'New description' }, | ||
}); | ||
await act(async () => | ||
fireEvent.change(inputs.description, { | ||
target: { value: 'New description' }, | ||
}) | ||
); | ||
expect(inputs.description).toHaveValue('New description'); | ||
|
||
expect(inputs.email).toHaveValue('[email protected]'); | ||
fireEvent.change(inputs.email, { target: { value: '[email protected]' } }); | ||
await act(async () => | ||
fireEvent.change(inputs.email, { target: { value: '[email protected]' } }) | ||
); | ||
expect(inputs.email).toHaveValue('[email protected]'); | ||
|
||
expect(inputs.website).toHaveValue('https://www.group.org'); | ||
fireEvent.change(inputs.website, { | ||
target: { value: 'https://www.other.org' }, | ||
}); | ||
await act(async () => | ||
fireEvent.change(inputs.website, { | ||
target: { value: 'https://www.other.org' }, | ||
}) | ||
); | ||
expect(inputs.website).toHaveValue('https://www.other.org'); | ||
}); | ||
test('GroupForm: Input validation', async () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters