Merge pull request #3502 from overleaf/ta-file-tree-select-created

[ReactFileTree] Auto-Select Entities Created by User

GitOrigin-RevId: b45d54cbe124c51be819456b8ea17ddd075b1922
This commit is contained in:
Timothée Alby
2021-01-06 03:07:59 +00:00
committed by Copybot
parent fc38e20dfb
commit 8c7bf5fbd2
7 changed files with 80 additions and 31 deletions
@@ -22,11 +22,13 @@ const modulePath = require('path').join(
)
const MockClient = require('../helpers/MockClient')
const assert = require('assert')
const { ObjectId } = require('mongodb')
describe('EditorController', function() {
beforeEach(function() {
this.project_id = 'test-project-id'
this.source = 'dropbox'
this.user_id = new ObjectId()
this.doc = { _id: (this.doc_id = 'test-doc-id') }
this.docName = 'doc.tex'
@@ -112,7 +114,8 @@ describe('EditorController', function() {
'reciveNewDoc',
this.folder_id,
this.doc,
this.source
this.source,
this.user_id
)
.should.equal(true)
})
@@ -160,7 +163,8 @@ describe('EditorController', function() {
this.folder_id,
this.file,
this.source,
this.linkedFileData
this.linkedFileData,
this.user_id
)
.should.equal(true)
})
@@ -225,7 +229,8 @@ describe('EditorController', function() {
'reciveNewDoc',
this.folder_id,
this.doc,
this.source
this.source,
this.user_id
)
.should.equal(true)
})
@@ -291,7 +296,8 @@ describe('EditorController', function() {
this.folder_id,
this.file,
this.source,
this.linkedFileData
this.linkedFileData,
this.user_id
)
.should.equal(true)
})
@@ -343,7 +349,8 @@ describe('EditorController', function() {
'reciveNewDoc',
this.folder_id,
this.doc,
this.source
this.source,
this.user_id
)
.should.equal(true)
})
@@ -442,7 +449,8 @@ describe('EditorController', function() {
this.folder_id,
this.file,
this.source,
this.linkedFileData
this.linkedFileData,
this.user_id
)
.should.equal(true)
})
@@ -502,6 +510,7 @@ describe('EditorController', function() {
this.folder_id,
this.folderName,
this.source,
this.user_id,
this.callback
)
})
@@ -513,11 +522,9 @@ describe('EditorController', function() {
})
it('should notifyProjectUsersOfNewFolder', function() {
return this.EditorController._notifyProjectUsersOfNewFolder.calledWith(
this.project_id,
this.folder_id,
this.folder
)
return this.EditorController._notifyProjectUsersOfNewFolder
.calledWith(this.project_id, this.folder_id, this.folder, this.user_id)
.should.equal(true)
})
it('should return the folder in the callback', function() {