test: fix flakey test (#1956)

This commit is contained in:
Nolan Lawson 2021-02-15 16:45:41 -08:00 committed by GitHub
parent 1e974824e1
commit 5b04db8442
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,8 +66,10 @@ test('does not add URLs as media is added/removed', async t => {
.typeText(composeInput, 'this is a toot') .typeText(composeInput, 'this is a toot')
.expect(mediaButton.exists).ok() .expect(mediaButton.exists).ok()
await (uploadKittenImage(1)()) await (uploadKittenImage(1)())
await sleep(500)
await t.expect(composeInput.value).eql('this is a toot') await t.expect(composeInput.value).eql('this is a toot')
await (uploadKittenImage(1)()) await (uploadKittenImage(1)())
await sleep(500)
await t.expect(composeInput.value).eql('this is a toot') await t.expect(composeInput.value).eql('this is a toot')
.click(getNthDeleteMediaButton(1)) .click(getNthDeleteMediaButton(1))
.expect(composeInput.value).eql('this is a toot') .expect(composeInput.value).eql('this is a toot')