[ACA-1635][ACA-1636] update favoritesApi and nodesApi to use alfresco-js-api-node (#564)

* refactor favoritesApi and nodesApi to use alfresco-js-api-node

* remove node-rest-client
This commit is contained in:
Adina Parpalita
2018-08-14 08:57:03 +03:00
committed by Cilibiu Bogdan
parent 213c2deedc
commit 86a90d33e2
36 changed files with 3292 additions and 3565 deletions

View File

@@ -81,7 +81,7 @@ describe('Pagination on Favorites', () => {
describe('on single page', () => {
beforeAll(done => {
nodesApi.createFile(file).then(resp => fileId = resp.data.entry.id)
nodesApi.createFile(file).then(resp => fileId = resp.entry.id)
.then(() => favoritesApi.addFavoriteById('file', fileId))
.then(() => loginPage.loginWith(username))
.then(done);
@@ -105,7 +105,7 @@ describe('Pagination on Favorites', () => {
describe('on multiple pages', () => {
beforeAll(done => {
nodesApi.createFiles(files, parent)
.then(resp => filesIds = resp.data.list.entries.map(entries => entries.entry.id))
.then(resp => filesIds = resp.list.entries.map(entries => entries.entry.id))
.then(() => favoritesApi.addFavoritesByIds('file', filesIds))
.then(() => favoritesApi.waitForApi({ expect: 101 }))
.then(() => loginPage.loginWith(username))

View File

@@ -80,7 +80,7 @@ describe('Pagination on Personal Files', () => {
describe('on single page', () => {
beforeAll(done => {
nodesApi.createFile(file).then(resp => fileId = resp.data.entry.id)
nodesApi.createFile(file).then(resp => fileId = resp.entry.id)
.then(() => loginPage.loginWith(username))
.then(done);
});

View File

@@ -80,7 +80,7 @@ describe('Pagination on Recent Files', () => {
describe('on single page', () => {
beforeAll(done => {
nodesApi.createFile(file).then(resp => fileId = resp.data.entry.id)
nodesApi.createFile(file).then(resp => fileId = resp.entry.id)
.then(() => searchApi.waitForApi(username, { expect: 1 }))
.then(() => loginPage.loginWith(username))
.then(done);

View File

@@ -81,7 +81,7 @@ describe('Pagination on Shared Files', () => {
describe('on single page', () => {
beforeAll(done => {
nodesApi.createFile(file).then(resp => fileId = resp.data.entry.id)
nodesApi.createFile(file).then(resp => fileId = resp.entry.id)
.then(() => sharedApi.shareFileById(fileId))
.then(() => sharedApi.waitForApi({ expect: 1 }))
.then(() => loginPage.loginWith(username))
@@ -106,7 +106,7 @@ describe('Pagination on Shared Files', () => {
describe('on multiple pages', () => {
beforeAll(done => {
nodesApi.createFiles(files, parent)
.then(resp => filesIds = resp.data.list.entries.map(entries => entries.entry.id))
.then(resp => filesIds = resp.list.entries.map(entries => entries.entry.id))
.then(() => sharedApi.shareFilesByIds(filesIds))
.then(() => sharedApi.waitForApi({ expect: 101 }))

View File

@@ -80,7 +80,7 @@ describe('Pagination on Trash', () => {
describe('on single page', () => {
beforeAll(done => {
nodesApi.createFile(file).then(resp => fileId = resp.data.entry.id)
nodesApi.createFile(file).then(resp => fileId = resp.entry.id)
.then(() => nodesApi.deleteNodeById(fileId, false))
.then(() => trashApi.waitForApi({ expect: 1 }))
.then(() => loginPage.loginWith(username))
@@ -105,7 +105,7 @@ describe('Pagination on Trash', () => {
describe('on multiple pages', () => {
beforeAll(done => {
nodesApi.createFiles(filesForDelete)
.then(resp => filesDeletedIds = resp.data.list.entries.map(entries => entries.entry.id))
.then(resp => filesDeletedIds = resp.list.entries.map(entries => entries.entry.id))
.then(() => nodesApi.deleteNodesById(filesDeletedIds, false))
.then(() => trashApi.waitForApi({expect: 101}))