refactor: application dependency management (#2363)
This commit is contained in:
@@ -48,7 +48,7 @@ describe('auth fringe cases', () => {
|
||||
console.warn("Expecting errors 'Unable to find operator for version undefined'")
|
||||
|
||||
const restartedApplication = await Factory.restartApplication(context.application)
|
||||
const refreshedNote = restartedApplication.payloadManager.findOne(note.uuid)
|
||||
const refreshedNote = restartedApplication.payloads.findOne(note.uuid)
|
||||
expect(refreshedNote.errorDecrypting).to.equal(true)
|
||||
|
||||
await Factory.safeDeinit(restartedApplication)
|
||||
@@ -67,9 +67,9 @@ describe('auth fringe cases', () => {
|
||||
)
|
||||
|
||||
await restartedApplication.signIn(context.email, context.password, undefined, undefined, undefined, awaitSync)
|
||||
const refreshedNote = restartedApplication.itemManager.findItem(note.uuid)
|
||||
const refreshedNote = restartedApplication.items.findItem(note.uuid)
|
||||
expect(isDecryptedItem(refreshedNote)).to.equal(true)
|
||||
expect(restartedApplication.itemManager.getDisplayableNotes().length).to.equal(1)
|
||||
expect(restartedApplication.items.getDisplayableNotes().length).to.equal(1)
|
||||
await Factory.safeDeinit(restartedApplication)
|
||||
}).timeout(10000)
|
||||
})
|
||||
@@ -97,15 +97,13 @@ describe('auth fringe cases', () => {
|
||||
/** Sign in and merge local data */
|
||||
await newApplication.signIn(context.email, context.password, undefined, undefined, true, true)
|
||||
|
||||
expect(newApplication.itemManager.getDisplayableNotes().length).to.equal(2)
|
||||
expect(newApplication.items.getDisplayableNotes().length).to.equal(2)
|
||||
|
||||
expect(
|
||||
newApplication.itemManager.getDisplayableNotes().find((n) => n.uuid === firstVersionOfNote.uuid).text,
|
||||
).to.equal(staleText)
|
||||
expect(newApplication.items.getDisplayableNotes().find((n) => n.uuid === firstVersionOfNote.uuid).text).to.equal(
|
||||
staleText,
|
||||
)
|
||||
|
||||
const conflictedCopy = newApplication.itemManager
|
||||
.getDisplayableNotes()
|
||||
.find((n) => n.uuid !== firstVersionOfNote.uuid)
|
||||
const conflictedCopy = newApplication.items.getDisplayableNotes().find((n) => n.uuid !== firstVersionOfNote.uuid)
|
||||
expect(conflictedCopy.text).to.equal(serverText)
|
||||
expect(conflictedCopy.duplicate_of).to.equal(firstVersionOfNote.uuid)
|
||||
await Factory.safeDeinit(newApplication)
|
||||
|
||||
Reference in New Issue
Block a user