chore: e2e test for fetching revisions (#2480)

This commit is contained in:
Karol Sójko
2023-09-12 15:56:48 +02:00
committed by GitHub
parent 57265d1d4e
commit 43fc95a7ac
4 changed files with 46 additions and 24 deletions

View File

@@ -269,13 +269,13 @@ describe('history manager', () => {
const item = await Factory.createSyncedNote(application)
expect(item).to.be.ok
await Factory.sleep(2 * Factory.ServerRevisionCreationDelay)
await Factory.sleep(Factory.ServerRevisionCreationDelay)
const itemHistoryOrError = await application.listRevisions.execute({ itemUuid: item.uuid })
expect(itemHistoryOrError.isFailed()).to.equal(false)
const itemHistory = itemHistoryOrError.getValue()
expect(itemHistory.length).to.equal(1)
expect(itemHistory.length >= 1).to.be.true
})
it('should not create new revisions within the revision frequency window', async () => {
@@ -291,13 +291,13 @@ describe('history manager', () => {
syncOptions,
)
await Factory.sleep(2 * Factory.ServerRevisionCreationDelay)
await Factory.sleep(Factory.ServerRevisionCreationDelay)
const itemHistoryOrError = await application.listRevisions.execute({ itemUuid: item.uuid })
expect(itemHistoryOrError.isFailed()).to.equal(false)
const itemHistory = itemHistoryOrError.getValue()
expect(itemHistory.length).to.equal(1)
expect(itemHistory.length >= 1).to.be.true
})
it('should create new revisions outside the revision frequency window', async function () {