mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Dev gmandakini automate actionmenu for rows (#4905)
* removing hte test as iti s duplicated. The same tests exist under e2e/content-services/document-list/document-list-actions.e2e.ts * C260127 - Move - Destination picker search, test for content highlighted * C260128 - Move same name file test added * test name updated * C260134 - Move Folder with subfolder and file within it, test added * formatting * C260135 - Move same name folder - test added * C260131 - Copy - Destination picker search, search text highlighted in the results in the Copy dialog. * C260129, C260136 - Tests for Copy same name file and same name folder added * added tests for Copy and Move actions on no permission folder. * added tests for Copy and Move actions on no permission folder.
This commit is contained in:
committed by
Eugenio Romano
parent
cf761ba0b2
commit
939277366f
@@ -109,6 +109,17 @@ describe('Document List Component - Actions', () => {
|
|||||||
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('[C260131] Copy - Destination picker search', () => {
|
||||||
|
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||||
|
contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||||
|
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||||
|
contentNodeSelector.checkDialogIsDisplayed();
|
||||||
|
contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||||
|
contentNodeSelector.contentListPage().dataTablePage().checkCellByHighlightContent(folderName);
|
||||||
|
contentNodeSelector.clickCancelButton();
|
||||||
|
contentNodeSelector.checkDialogIsNotDisplayed();
|
||||||
|
});
|
||||||
|
|
||||||
it('[C297491] Should be able to move a file', () => {
|
it('[C297491] Should be able to move a file', () => {
|
||||||
contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||||
|
|
||||||
@@ -123,6 +134,17 @@ describe('Document List Component - Actions', () => {
|
|||||||
contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('[C260127] Move - Destination picker search', () => {
|
||||||
|
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||||
|
contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||||
|
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||||
|
contentNodeSelector.checkDialogIsDisplayed();
|
||||||
|
contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||||
|
contentNodeSelector.contentListPage().dataTablePage().checkCellByHighlightContent(folderName);
|
||||||
|
contentNodeSelector.clickCancelButton();
|
||||||
|
contentNodeSelector.checkDialogIsNotDisplayed();
|
||||||
|
});
|
||||||
|
|
||||||
it('[C280561] Should be able to delete a file via dropdown menu', () => {
|
it('[C280561] Should be able to delete a file via dropdown menu', () => {
|
||||||
contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||||
|
|
||||||
|
@@ -0,0 +1,214 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Alfresco Software, Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { browser } from 'protractor';
|
||||||
|
import {
|
||||||
|
LoginPage,
|
||||||
|
UploadActions,
|
||||||
|
StringUtil,
|
||||||
|
ContentNodeSelectorDialogPage,
|
||||||
|
NotificationHistoryPage, BrowserActions
|
||||||
|
} from '@alfresco/adf-testing';
|
||||||
|
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||||
|
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||||
|
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||||
|
import resources = require('../../util/resources');
|
||||||
|
import {AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
|
import { FileModel } from '../../models/ACS/fileModel';
|
||||||
|
|
||||||
|
describe('Document List Component', () => {
|
||||||
|
|
||||||
|
const loginPage = new LoginPage();
|
||||||
|
const contentServicesPage = new ContentServicesPage();
|
||||||
|
const navigationBarPage = new NavigationBarPage();
|
||||||
|
const contentNodeSelector = new ContentNodeSelectorDialogPage();
|
||||||
|
const notificationHistoryPage = new NotificationHistoryPage();
|
||||||
|
|
||||||
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
|
provider: 'ECM',
|
||||||
|
hostEcm: browser.params.testConfig.adf.url
|
||||||
|
});
|
||||||
|
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||||
|
|
||||||
|
let uploadedFolder, uploadedFile, sourceFolder, destinationFolder, subFolder, subFolder2, copyFolder, subFile, duplicateFolderName;
|
||||||
|
let acsUser = null, anotherAcsUser: AcsUserModel;
|
||||||
|
let folderName, sameNameFolder;
|
||||||
|
|
||||||
|
const pdfFileModel = new FileModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||||
|
});
|
||||||
|
|
||||||
|
const testFileModel = new FileModel({
|
||||||
|
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||||
|
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeAll(async (done) => {
|
||||||
|
acsUser = new AcsUserModel();
|
||||||
|
anotherAcsUser = new AcsUserModel();
|
||||||
|
folderName = StringUtil.generateRandomString(5);
|
||||||
|
sameNameFolder = StringUtil.generateRandomString(5);
|
||||||
|
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||||
|
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||||
|
await this.alfrescoJsApi.core.peopleApi.addPerson(anotherAcsUser);
|
||||||
|
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||||
|
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||||
|
destinationFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||||
|
sourceFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||||
|
subFolder = await uploadActions.createFolder(sameNameFolder, sourceFolder.entry.id);
|
||||||
|
subFolder2 = await uploadActions.createFolder(StringUtil.generateRandomString(5), subFolder.entry.id);
|
||||||
|
copyFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), sourceFolder.entry.id);
|
||||||
|
duplicateFolderName = await uploadActions.createFolder(sameNameFolder, '-my-');
|
||||||
|
subFile = await uploadActions.uploadFile(testFileModel.location, testFileModel.name, subFolder.entry.id);
|
||||||
|
await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, uploadedFolder.entry.id);
|
||||||
|
uploadedFile = await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, '-my-');
|
||||||
|
await this.alfrescoJsApi.core.nodesApi.updateNode(sourceFolder.entry.id,
|
||||||
|
|
||||||
|
{
|
||||||
|
permissions: {
|
||||||
|
locallySet: [{
|
||||||
|
authorityId: anotherAcsUser.getId(),
|
||||||
|
name: 'Consumer',
|
||||||
|
accessStatus: 'ALLOWED'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
browser.driver.sleep(10000);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async (done) => {
|
||||||
|
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||||
|
uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
|
||||||
|
uploadActions.deleteFileOrFolder(uploadedFile.entry.id);
|
||||||
|
uploadActions.deleteFileOrFolder(sourceFolder.entry.id);
|
||||||
|
uploadActions.deleteFileOrFolder(destinationFolder.entry.id);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Document List Component - Actions Move and Copy', () => {
|
||||||
|
|
||||||
|
beforeEach(async (done) => {
|
||||||
|
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
navigationBarPage.clickContentServicesButton();
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C260128] Move - Same name file', () => {
|
||||||
|
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||||
|
contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||||
|
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||||
|
contentNodeSelector.checkDialogIsDisplayed();
|
||||||
|
contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||||
|
contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||||
|
contentNodeSelector.clickMoveCopyButton();
|
||||||
|
notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C260134] Move - folder with subfolder and file within it', () => {
|
||||||
|
contentServicesPage.checkContentIsDisplayed(destinationFolder.entry.name);
|
||||||
|
contentServicesPage.checkContentIsDisplayed(sourceFolder.entry.name);
|
||||||
|
contentServicesPage.getDocumentList().rightClickOnRow(sourceFolder.entry.name);
|
||||||
|
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||||
|
contentNodeSelector.checkDialogIsDisplayed();
|
||||||
|
contentNodeSelector.typeIntoNodeSelectorSearchField(destinationFolder.entry.name);
|
||||||
|
contentNodeSelector.clickContentNodeSelectorResult(destinationFolder.entry.name);
|
||||||
|
contentNodeSelector.clickMoveCopyButton();
|
||||||
|
contentServicesPage.checkContentIsNotDisplayed(sourceFolder.entry.name);
|
||||||
|
contentServicesPage.doubleClickRow(destinationFolder.entry.name);
|
||||||
|
contentServicesPage.checkContentIsDisplayed(sourceFolder.entry.name);
|
||||||
|
contentServicesPage.doubleClickRow(sourceFolder.entry.name);
|
||||||
|
contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||||
|
contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||||
|
contentServicesPage.checkContentIsDisplayed(subFile.entry.name);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C260135] Move - Same name folder', () => {
|
||||||
|
contentServicesPage.checkContentIsDisplayed(duplicateFolderName.entry.name);
|
||||||
|
contentServicesPage.getDocumentList().rightClickOnRow(duplicateFolderName.entry.name);
|
||||||
|
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||||
|
contentNodeSelector.checkDialogIsDisplayed();
|
||||||
|
contentNodeSelector.typeIntoNodeSelectorSearchField(sourceFolder.entry.name);
|
||||||
|
contentNodeSelector.clickContentNodeSelectorResult(sourceFolder.entry.name);
|
||||||
|
contentNodeSelector.clickMoveCopyButton();
|
||||||
|
notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C260129] Copy - Same name file', () => {
|
||||||
|
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||||
|
contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||||
|
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||||
|
contentNodeSelector.checkDialogIsDisplayed();
|
||||||
|
contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||||
|
contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||||
|
contentNodeSelector.clickMoveCopyButton();
|
||||||
|
notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C260136] Copy - Same name folder', () => {
|
||||||
|
contentServicesPage.checkContentIsDisplayed(duplicateFolderName.entry.name);
|
||||||
|
contentServicesPage.getDocumentList().rightClickOnRow(duplicateFolderName.entry.name);
|
||||||
|
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||||
|
contentNodeSelector.checkDialogIsDisplayed();
|
||||||
|
contentNodeSelector.typeIntoNodeSelectorSearchField(sourceFolder.entry.name);
|
||||||
|
contentNodeSelector.clickContentNodeSelectorResult(sourceFolder.entry.name);
|
||||||
|
contentNodeSelector.clickMoveCopyButton();
|
||||||
|
notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Document List actionns - Move, Copy on no permission folder', () => {
|
||||||
|
|
||||||
|
beforeAll((done) => {
|
||||||
|
loginPage.loginToContentServicesUsingUserModel(anotherAcsUser);
|
||||||
|
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + sourceFolder.entry.id);
|
||||||
|
contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C260133] Move - no permission folder', () => {
|
||||||
|
contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||||
|
contentServicesPage.getDocumentList().rightClickOnRow(subFolder.entry.name);
|
||||||
|
contentServicesPage.checkContextActionIsVisible('Move');
|
||||||
|
expect(contentServicesPage.checkContentActionIsEnabled('Move')).toBe(false);
|
||||||
|
contentServicesPage.closeActionContext();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C260140] Copy - No permission folder', () => {
|
||||||
|
contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||||
|
contentServicesPage.checkContentIsDisplayed(copyFolder.entry.name);
|
||||||
|
contentServicesPage.getDocumentList().rightClickOnRow(copyFolder.entry.name);
|
||||||
|
contentServicesPage.checkContextActionIsVisible('Copy');
|
||||||
|
expect(contentServicesPage.checkContentActionIsEnabled('Copy')).toBe(true);
|
||||||
|
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||||
|
contentNodeSelector.checkDialogIsDisplayed();
|
||||||
|
contentNodeSelector.contentListPage().dataTablePage().checkRowContentIsDisplayed(subFolder.entry.name);
|
||||||
|
contentNodeSelector.contentListPage().dataTablePage().checkRowContentIsDisabled(subFolder.entry.name);
|
||||||
|
contentNodeSelector.clickContentNodeSelectorResult(subFolder.entry.name);
|
||||||
|
contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected(subFolder.entry.name);
|
||||||
|
expect(contentNodeSelector.checkCopyMoveButtonIsEnabled()).toBe(false);
|
||||||
|
contentNodeSelector.contentListPage().dataTablePage().doubleClickRowByContent(subFolder.entry.name);
|
||||||
|
contentNodeSelector.contentListPage().dataTablePage().waitTillContentLoaded();
|
||||||
|
contentNodeSelector.contentListPage().dataTablePage().checkRowContentIsDisplayed(subFolder2.entry.name);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
@@ -1,185 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright 2019 Alfresco Software, Ltd.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { by, element, browser } from 'protractor';
|
|
||||||
import { LoginPage, PaginationPage, UploadActions, ContentNodeSelectorDialogPage, StringUtil } from '@alfresco/adf-testing';
|
|
||||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
|
||||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
|
||||||
import { BreadCrumbDropdownPage } from '../../pages/adf/content-services/breadcrumb/breadCrumbDropdownPage';
|
|
||||||
import { FolderModel } from '../../models/ACS/folderModel';
|
|
||||||
import { BreadCrumbPage } from '../../pages/adf/content-services/breadcrumb/breadCrumbPage';
|
|
||||||
import { InfinitePaginationPage } from '../../pages/adf/core/infinitePaginationPage';
|
|
||||||
|
|
||||||
describe('Document List Component - Actions', () => {
|
|
||||||
|
|
||||||
const loginPage = new LoginPage();
|
|
||||||
const contentServicesPage = new ContentServicesPage();
|
|
||||||
const contentListPage = contentServicesPage.getDocumentList();
|
|
||||||
const contentNodeSelector = new ContentNodeSelectorDialogPage();
|
|
||||||
const paginationPage = new PaginationPage();
|
|
||||||
const breadCrumbDropdownPage = new BreadCrumbDropdownPage();
|
|
||||||
const breadCrumbPage = new BreadCrumbPage();
|
|
||||||
const infinitePaginationPage = new InfinitePaginationPage(element(by.css('adf-content-node-selector')));
|
|
||||||
|
|
||||||
const alfrescoJsApi = new AlfrescoApi({
|
|
||||||
provider: 'ECM',
|
|
||||||
hostEcm: browser.params.testConfig.adf.url
|
|
||||||
});
|
|
||||||
const uploadActions = new UploadActions(alfrescoJsApi);
|
|
||||||
|
|
||||||
describe('Folder Actions - Copy and Move', () => {
|
|
||||||
|
|
||||||
const folderModel1 = new FolderModel({ 'name': StringUtil.generateRandomString() });
|
|
||||||
const folderModel2 = new FolderModel({ 'name': StringUtil.generateRandomString() });
|
|
||||||
const folderModel3 = new FolderModel({ 'name': StringUtil.generateRandomString() });
|
|
||||||
const folderModel4 = new FolderModel({ 'name': StringUtil.generateRandomString() });
|
|
||||||
const folderModel5 = new FolderModel({ 'name': StringUtil.generateRandomString() });
|
|
||||||
const folderModel6 = new FolderModel({ 'name': StringUtil.generateRandomString() });
|
|
||||||
|
|
||||||
let folder1, folder2, folder3, folder4, folder5, folder6;
|
|
||||||
|
|
||||||
let folders;
|
|
||||||
const contentServicesUser = new AcsUserModel();
|
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
|
||||||
|
|
||||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
|
||||||
await alfrescoJsApi.core.peopleApi.addPerson(contentServicesUser);
|
|
||||||
await alfrescoJsApi.login(contentServicesUser.id, contentServicesUser.password);
|
|
||||||
folder1 = await uploadActions.createFolder('A' + folderModel1.name, '-my-');
|
|
||||||
folder2 = await uploadActions.createFolder('B' + folderModel2.name, '-my-');
|
|
||||||
folder3 = await uploadActions.createFolder('C' + folderModel3.name, '-my-');
|
|
||||||
folder4 = await uploadActions.createFolder('D' + folderModel4.name, '-my-');
|
|
||||||
folder5 = await uploadActions.createFolder('E' + folderModel5.name, '-my-');
|
|
||||||
folder6 = await uploadActions.createFolder('F' + folderModel6.name, '-my-');
|
|
||||||
folders = [folder1, folder2, folder3, folder4, folder5, folder6];
|
|
||||||
|
|
||||||
await loginPage.loginToContentServicesUsingUserModel(contentServicesUser);
|
|
||||||
contentServicesPage.goToDocumentList();
|
|
||||||
contentServicesPage.waitForTableBody();
|
|
||||||
paginationPage.selectItemsPerPage('5');
|
|
||||||
contentServicesPage.checkAcsContainer();
|
|
||||||
contentListPage.waitForTableBody();
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async (done) => {
|
|
||||||
await alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
|
||||||
await folders.forEach(function (folder) {
|
|
||||||
uploadActions.deleteFileOrFolder(folder.entry.id);
|
|
||||||
});
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C260132] Move action on folder with - Load more', () => {
|
|
||||||
|
|
||||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
|
||||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);
|
|
||||||
contentListPage.rightClickOnRow('A' + folderModel1.name);
|
|
||||||
contentServicesPage.checkContextActionIsVisible('Move');
|
|
||||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
|
||||||
contentNodeSelector.checkDialogIsDisplayed();
|
|
||||||
expect(contentNodeSelector.getDialogHeaderText()).toBe('Move \'' + 'A' + folderModel1.name + '\' to...');
|
|
||||||
contentNodeSelector.checkSearchInputIsDisplayed();
|
|
||||||
expect(contentNodeSelector.getSearchLabel()).toBe('Search');
|
|
||||||
contentNodeSelector.checkSelectedSiteIsDisplayed('My files');
|
|
||||||
contentNodeSelector.checkCancelButtonIsDisplayed();
|
|
||||||
contentNodeSelector.checkMoveCopyButtonIsDisplayed();
|
|
||||||
expect(contentNodeSelector.getMoveCopyButtonText()).toBe('MOVE');
|
|
||||||
expect(contentNodeSelector.numberOfResultsDisplayed()).toBe(5);
|
|
||||||
infinitePaginationPage.clickLoadMoreButton();
|
|
||||||
expect(contentNodeSelector.numberOfResultsDisplayed()).toBe(6);
|
|
||||||
infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
|
||||||
contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
|
||||||
contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
|
||||||
contentNodeSelector.clickCancelButton();
|
|
||||||
contentNodeSelector.checkDialogIsNotDisplayed();
|
|
||||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
|
||||||
|
|
||||||
contentListPage.rightClickOnRow('A' + folderModel1.name);
|
|
||||||
contentServicesPage.checkContextActionIsVisible('Move');
|
|
||||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
|
||||||
contentNodeSelector.checkDialogIsDisplayed();
|
|
||||||
infinitePaginationPage.clickLoadMoreButton();
|
|
||||||
contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
|
||||||
contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
|
||||||
contentNodeSelector.clickMoveCopyButton();
|
|
||||||
contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
|
||||||
contentServicesPage.doubleClickRow('F' + folderModel6.name);
|
|
||||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
|
||||||
|
|
||||||
contentListPage.rightClickOnRow('A' + folderModel1.name);
|
|
||||||
contentServicesPage.checkContextActionIsVisible('Move');
|
|
||||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
|
||||||
contentNodeSelector.checkDialogIsDisplayed();
|
|
||||||
breadCrumbDropdownPage.clickParentFolder();
|
|
||||||
breadCrumbDropdownPage.checkBreadCrumbDropdownIsDisplayed();
|
|
||||||
breadCrumbDropdownPage.choosePath(contentServicesUser.id);
|
|
||||||
contentNodeSelector.clickMoveCopyButton();
|
|
||||||
contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
|
||||||
|
|
||||||
breadCrumbPage.chooseBreadCrumb(contentServicesUser.id);
|
|
||||||
contentServicesPage.waitForTableBody();
|
|
||||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C305051] Copy action on folder with - Load more', () => {
|
|
||||||
|
|
||||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
|
||||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);
|
|
||||||
contentListPage.rightClickOnRow('A' + folderModel1.name);
|
|
||||||
contentServicesPage.checkContextActionIsVisible('Copy');
|
|
||||||
contentServicesPage.pressContextMenuActionNamed('Copy');
|
|
||||||
contentNodeSelector.checkDialogIsDisplayed();
|
|
||||||
expect(contentNodeSelector.getDialogHeaderText()).toBe('Copy \'' + 'A' + folderModel1.name + '\' to...');
|
|
||||||
contentNodeSelector.checkSearchInputIsDisplayed();
|
|
||||||
expect(contentNodeSelector.getSearchLabel()).toBe('Search');
|
|
||||||
contentNodeSelector.checkSelectedSiteIsDisplayed('My files');
|
|
||||||
contentNodeSelector.checkCancelButtonIsDisplayed();
|
|
||||||
contentNodeSelector.checkMoveCopyButtonIsDisplayed();
|
|
||||||
expect(contentNodeSelector.getMoveCopyButtonText()).toBe('COPY');
|
|
||||||
expect(contentNodeSelector.numberOfResultsDisplayed()).toBe(5);
|
|
||||||
infinitePaginationPage.clickLoadMoreButton();
|
|
||||||
expect(contentNodeSelector.numberOfResultsDisplayed()).toBe(6);
|
|
||||||
infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
|
||||||
contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
|
||||||
contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
|
||||||
contentNodeSelector.clickCancelButton();
|
|
||||||
contentNodeSelector.checkDialogIsNotDisplayed();
|
|
||||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
|
||||||
|
|
||||||
contentListPage.rightClickOnRow('A' + folderModel1.name);
|
|
||||||
contentServicesPage.checkContextActionIsVisible('Copy');
|
|
||||||
contentServicesPage.pressContextMenuActionNamed('Copy');
|
|
||||||
contentNodeSelector.checkDialogIsDisplayed();
|
|
||||||
infinitePaginationPage.clickLoadMoreButton();
|
|
||||||
contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
|
||||||
contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
|
||||||
contentNodeSelector.clickMoveCopyButton();
|
|
||||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
|
||||||
paginationPage.clickOnNextPage();
|
|
||||||
contentListPage.waitForTableBody();
|
|
||||||
contentServicesPage.doubleClickRow('F' + folderModel6.name);
|
|
||||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
@@ -94,6 +94,12 @@ export class ContentServicesPage {
|
|||||||
return actionButton;
|
return actionButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkContentActionIsEnabled(actionName) {
|
||||||
|
const actionButton = element(by.css(`button[data-automation-id="context-${actionName}"`));
|
||||||
|
BrowserVisibility.waitUntilElementIsVisible(actionButton);
|
||||||
|
return actionButton.isEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
getDocumentList() {
|
getDocumentList() {
|
||||||
return this.contentList;
|
return this.contentList;
|
||||||
}
|
}
|
||||||
|
@@ -324,6 +324,12 @@ export class DataTableComponentPage {
|
|||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkCellByHighlightContent(content) {
|
||||||
|
const cell = this.rootElement.element(by.cssContainingText(`div[class*='adf-datatable-row'] div[class*='adf-name-location-cell-name'] span.adf-highlight`, content));
|
||||||
|
BrowserVisibility.waitUntilElementIsVisible(cell);
|
||||||
|
return cell;
|
||||||
|
}
|
||||||
|
|
||||||
clickRowByContent(name) {
|
clickRowByContent(name) {
|
||||||
const resultElement = this.rootElement.all(by.css(`div[data-automation-id='${name}']`)).first();
|
const resultElement = this.rootElement.all(by.css(`div[data-automation-id='${name}']`)).first();
|
||||||
BrowserActions.click(resultElement);
|
BrowserActions.click(resultElement);
|
||||||
@@ -335,6 +341,12 @@ export class DataTableComponentPage {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkRowContentIsDisabled(content) {
|
||||||
|
const resultElement = this.rootElement.all(by.css(`div[data-automation-id='${content}'] div.adf-cell-value img[aria-label='disable']`)).first();
|
||||||
|
BrowserVisibility.waitUntilElementIsVisible(resultElement);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
doubleClickRowByContent(name) {
|
doubleClickRowByContent(name) {
|
||||||
const resultElement = this.rootElement.all(by.css(`div[data-automation-id='${name}']`)).first();
|
const resultElement = this.rootElement.all(by.css(`div[data-automation-id='${name}']`)).first();
|
||||||
BrowserActions.click(resultElement);
|
BrowserActions.click(resultElement);
|
||||||
|
Reference in New Issue
Block a user