clipper: handle clipped note sync in background (#2367)

This commit is contained in:
Aman Harwara
2023-08-03 18:43:04 +05:30
committed by GitHub
parent 5602a4014e
commit c76ffc764b
15 changed files with 176 additions and 18 deletions

View File

@@ -1047,4 +1047,25 @@ describe('online syncing', function () {
await contextB.deinit()
})
it('should sync note when running raw sync request for external use', async function () {
const contextA = this.context
const contextB = await Factory.createAppContextWithFakeCrypto('AppB', contextA.email, contextA.password)
await contextB.launch()
await contextB.signIn()
const notePayload = Factory.createNote()
const rawSyncRequest = await this.application.sync.getRawSyncRequestForExternalUse([notePayload])
expect(rawSyncRequest).to.be.ok
const response = await this.application.http.runHttp(rawSyncRequest)
expect(response.status).to.equal(200)
await contextB.sync()
const note = contextB.application.items.findItem(notePayload.uuid)
expect(note).to.be.ok
})
})