Add a test case for top position greater than bottom position

This commit is contained in:
Hongbo Wu 2023-03-10 12:56:00 +08:00
parent 45b2fa6329
commit 8a9a464e84

View file

@ -768,6 +768,14 @@ describe('Article API', () => {
.readingProgressTopPercent
).to.eql(topPercent)
})
it('returns BAD_DATA error if top position is greater than bottom position', async () => {
query = saveArticleReadingProgressQuery(pageId, 0.5, 0.8)
const res = await graphqlRequest(query, authToken).expect(200)
expect(res.body.data.saveArticleReadingProgress.errorCodes).to.eql([
'BAD_DATA',
])
})
})
xdescribe('SaveFile', () => {