mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
fix acceptance tests
GitOrigin-RevId: 7e61102f91654431761f5f72b4355c6e5954b0d7
This commit is contained in:
parent
22fcbe8648
commit
b4fbb0c9fc
1 changed files with 17 additions and 5 deletions
|
@ -1101,9 +1101,21 @@ describe('ProjectStructureChanges', function() {
|
||||||
|
|
||||||
describe('deleting docs', function() {
|
describe('deleting docs', function() {
|
||||||
beforeEach(function(done) {
|
beforeEach(function(done) {
|
||||||
createExampleProject(this, () => {
|
createExampleProject(owner, (err, projectId) => {
|
||||||
createExampleFolder(this, () => {
|
if (err) {
|
||||||
createExampleDoc(this, () => {
|
return done(err)
|
||||||
|
}
|
||||||
|
this.exampleProjectId = projectId
|
||||||
|
createExampleFolder(owner, projectId, (err, folderId) => {
|
||||||
|
if (err) {
|
||||||
|
return done(err)
|
||||||
|
}
|
||||||
|
this.exampleFolderId = folderId
|
||||||
|
createExampleDoc(owner, projectId, (err, docId) => {
|
||||||
|
if (err) {
|
||||||
|
return done(err)
|
||||||
|
}
|
||||||
|
this.exampleDocId = docId
|
||||||
MockDocUpdaterApi.clearProjectStructureUpdates()
|
MockDocUpdaterApi.clearProjectStructureUpdates()
|
||||||
ProjectGetter.getProject(
|
ProjectGetter.getProject(
|
||||||
this.exampleProjectId,
|
this.exampleProjectId,
|
||||||
|
@ -1130,7 +1142,7 @@ describe('ProjectStructureChanges', function() {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should clear rootDoc_id', function(done) {
|
it('should clear rootDoc_id', function(done) {
|
||||||
deleteItem(this, 'doc', this.exampleDocId, () => {
|
deleteItem(owner, this.exampleProjectId, 'doc', this.exampleDocId, () => {
|
||||||
ProjectGetter.getProject(this.exampleProjectId, (error, project) => {
|
ProjectGetter.getProject(this.exampleProjectId, (error, project) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
throw error
|
throw error
|
||||||
|
@ -1153,7 +1165,7 @@ describe('ProjectStructureChanges', function() {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should not clear rootDoc_id', function(done) {
|
it('should not clear rootDoc_id', function(done) {
|
||||||
deleteItem(this, 'doc', this.exampleDocId, () => {
|
deleteItem(owner, this.exampleProjectId, 'doc', this.exampleDocId, () => {
|
||||||
ProjectGetter.getProject(this.exampleProjectId, (error, project) => {
|
ProjectGetter.getProject(this.exampleProjectId, (error, project) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
throw error
|
throw error
|
||||||
|
|
Loading…
Reference in a new issue