mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[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:
committed by
Cilibiu Bogdan
parent
213c2deedc
commit
86a90d33e2
@@ -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))
|
||||
|
@@ -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);
|
||||
});
|
||||
|
@@ -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);
|
||||
|
@@ -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 }))
|
||||
|
@@ -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}))
|
||||
|
||||
|
Reference in New Issue
Block a user