mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix: test
This commit is contained in:
parent
039f00e3b2
commit
51032d2bf1
2 changed files with 20 additions and 17 deletions
|
|
@ -789,8 +789,13 @@ export const updatePages = async (
|
|||
return null
|
||||
}
|
||||
|
||||
console.log('update pages task started', body.task)
|
||||
return body.task as string
|
||||
if (async) {
|
||||
console.log('update pages task started', body.task)
|
||||
return body.task as string
|
||||
}
|
||||
|
||||
console.log('updated pages in elastic', body.updated)
|
||||
return body.updated as string
|
||||
} catch (e) {
|
||||
console.log('failed to update pages in elastic', e)
|
||||
return null
|
||||
|
|
|
|||
|
|
@ -1267,13 +1267,11 @@ describe('Article API', () => {
|
|||
authToken
|
||||
).expect(200)
|
||||
expect(res.body.data.bulkAction.success).to.be.true
|
||||
// Wait for the archive to finish
|
||||
await setTimeout(async () => {
|
||||
const pages = await graphqlRequest(searchQuery(), authToken).expect(
|
||||
200
|
||||
)
|
||||
expect(pages.body.data.search.pageInfo.totalCount).to.eql(0)
|
||||
}, 1000)
|
||||
|
||||
await refreshIndex()
|
||||
|
||||
const pages = await graphqlRequest(searchQuery(), authToken).expect(200)
|
||||
expect(pages.body.data.search.pageInfo.totalCount).to.eql(0)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
@ -1284,14 +1282,14 @@ describe('Article API', () => {
|
|||
authToken
|
||||
).expect(200)
|
||||
expect(res.body.data.bulkAction.success).to.be.true
|
||||
// Wait for the delete to finish
|
||||
await setTimeout(async () => {
|
||||
const pages = await graphqlRequest(
|
||||
searchQuery('in:all'),
|
||||
authToken
|
||||
).expect(200)
|
||||
expect(pages.body.data.search.pageInfo.totalCount).to.eql(0)
|
||||
}, 1000)
|
||||
|
||||
await refreshIndex()
|
||||
|
||||
const pages = await graphqlRequest(
|
||||
searchQuery('in:all'),
|
||||
authToken
|
||||
).expect(200)
|
||||
expect(pages.body.data.search.pageInfo.totalCount).to.eql(0)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue