Merge pull request #9658 from overleaf/em-dropbox-folder-sync

Sync folder creation from Dropbox to Overleaf

GitOrigin-RevId: a2749ab8d9db7dd312818b46d6e72f1dbaaaff2e
This commit is contained in:
Eric Mc Sween
2022-09-21 08:01:56 -04:00
committed by Copybot
parent 51046fd375
commit bb24ec117f
11 changed files with 257 additions and 22 deletions

View File

@@ -144,7 +144,7 @@ describe('ProjectEntityMongoUpdateHandler', function () {
path: '/',
})
)
.resolves({ element: this.rootFolder, type: 'folder' })
.resolves({ element: this.rootFolder, type: 'folder', folder: null })
this.ProjectLocator.promises.findElementByPath
.withArgs(
sinon.match({
@@ -152,7 +152,11 @@ describe('ProjectEntityMongoUpdateHandler', function () {
path: '/test-folder',
})
)
.resolves({ element: this.folder, type: 'folder' })
.resolves({
element: this.folder,
type: 'folder',
folder: this.rootFolder,
})
this.ProjectLocator.promises.findElementByPath
.withArgs(
sinon.match({
@@ -160,7 +164,11 @@ describe('ProjectEntityMongoUpdateHandler', function () {
path: '/test-folder/test-subfolder',
})
)
.resolves({ element: this.subfolder, type: 'folder' })
.resolves({
element: this.subfolder,
type: 'folder',
folder: this.folder,
})
this.ProjectGetter = {
promises: {
@@ -437,9 +445,7 @@ describe('ProjectEntityMongoUpdateHandler', function () {
})
it('should report the parent folder', function () {
expect(this.result.folder.parentFolder_id).not.equal(
this.rootFolder._id
)
expect(this.result.folder.parentFolder_id).to.equal(this.rootFolder._id)
})
it('should not return new folders', function () {