Fix(frontend): use promise instead of waitFor

This commit is contained in:
Anthony Madia
2022-09-11 19:48:50 -04:00
parent f57c5e6b93
commit cbc0a38daf

View File

@@ -24,13 +24,9 @@ const renderTextEditor = () => {
test('type text into textbox', async () => {
renderTextEditor()
const textbox = screen.getByRole('textbox')
userEvent.type(textbox, loremText)
await waitFor(
() => {
expect(textbox).toHaveValue(loremText)
},
{ timeout: 10000 }
)
userEvent
.type(textbox, loremText)
.then(() => expect(textbox).toHaveValue(loremText))
})
test('should toggle the Preview and Edit functionality', async () => {