mirror of
https://github.com/Unirep/Unirep-Social.git
synced 2026-01-10 06:27:58 -05:00
Fix(frontend): use promise instead of waitFor
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user