mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
remove unused demo shell api
This commit is contained in:
@@ -49,7 +49,6 @@ export class ContentServicesPage {
|
|||||||
|
|
||||||
multipleFileUploadToggle = $('#adf-document-list-enable-drop-files');
|
multipleFileUploadToggle = $('#adf-document-list-enable-drop-files');
|
||||||
uploadBorder = $('#document-list-container');
|
uploadBorder = $('#document-list-container');
|
||||||
contentServices = $('.app-sidenav-link[data-automation-id="Content Services"]');
|
|
||||||
currentFolder = $('div[class*="adf-breadcrumb-item adf-active"] div');
|
currentFolder = $('div[class*="adf-breadcrumb-item adf-active"] div');
|
||||||
createFolderButton = $('button[data-automation-id="create-new-folder"]');
|
createFolderButton = $('button[data-automation-id="create-new-folder"]');
|
||||||
editFolderButton = $('button[data-automation-id="edit-folder"]');
|
editFolderButton = $('button[data-automation-id="edit-folder"]');
|
||||||
@@ -60,20 +59,14 @@ export class ContentServicesPage {
|
|||||||
uploadFileButtonInput = $('input[data-automation-id="upload-single-file"]');
|
uploadFileButtonInput = $('input[data-automation-id="upload-single-file"]');
|
||||||
uploadMultipleFileButton = $('input[data-automation-id="upload-multiple-files"]');
|
uploadMultipleFileButton = $('input[data-automation-id="upload-multiple-files"]');
|
||||||
uploadFolderButton = $('input[data-automation-id="uploadFolder"]');
|
uploadFolderButton = $('input[data-automation-id="uploadFolder"]');
|
||||||
errorSnackBar = $('simple-snack-bar[class*="mat-simple-snackbar"]');
|
|
||||||
emptyPagination = $('adf-pagination[class*="adf-pagination__empty"]');
|
emptyPagination = $('adf-pagination[class*="adf-pagination__empty"]');
|
||||||
dragAndDrop = $$('adf-upload-drag-area div').first();
|
dragAndDrop = $$('adf-upload-drag-area div').first();
|
||||||
nameHeader = $$('div[data-automation-id="auto_header_content_id_name"] > span').first();
|
nameHeader = $$('div[data-automation-id="auto_header_content_id_name"] > span').first();
|
||||||
sizeHeader = $$('div[data-automation-id="auto_header_content_id_content.sizeInBytes"] > span').first();
|
sizeHeader = $$('div[data-automation-id="auto_header_content_id_content.sizeInBytes"] > span').first();
|
||||||
createdByHeader = $$('div[data-automation-id="auto_header_content_id_createdByUser.displayName"] > span').first();
|
createdByHeader = $$('div[data-automation-id="auto_header_content_id_createdByUser.displayName"] > span').first();
|
||||||
createdHeader = $$('div[data-automation-id="auto_header_content_id_createdAt"] > span').first();
|
createdHeader = $$('div[data-automation-id="auto_header_content_id_createdAt"] > span').first();
|
||||||
recentFiles = $('.app-container-recent');
|
|
||||||
recentFilesExpanded = $('.app-container-recent mat-expansion-panel-header.mat-expanded');
|
|
||||||
recentFilesClosed = $('.app-container-recent mat-expansion-panel-header');
|
|
||||||
recentFileIcon = $('.app-container-recent mat-expansion-panel-header mat-icon');
|
|
||||||
emptyFolder = $('.adf-empty-folder-this-space-is-empty');
|
emptyFolder = $('.adf-empty-folder-this-space-is-empty');
|
||||||
emptyFolderImage = $('.adf-empty-folder-image');
|
emptyFolderImage = $('.adf-empty-folder-image');
|
||||||
emptyRecent = $('.app-container-recent .app-empty-list__title');
|
|
||||||
gridViewButton = $('button[data-automation-id="document-list-grid-view"]');
|
gridViewButton = $('button[data-automation-id="document-list-grid-view"]');
|
||||||
cardViewContainer = $('div.app-document-list-container div.adf-datatable-card');
|
cardViewContainer = $('div.app-document-list-container div.adf-datatable-card');
|
||||||
shareNodeButton = element(by.cssContainingText('mat-icon', ' share '));
|
shareNodeButton = element(by.cssContainingText('mat-icon', ' share '));
|
||||||
@@ -234,36 +227,6 @@ export class ContentServicesPage {
|
|||||||
return sorted;
|
return sorted;
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkRecentFileToBeShowed() {
|
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.recentFiles);
|
|
||||||
}
|
|
||||||
|
|
||||||
async expandRecentFiles(): Promise<void> {
|
|
||||||
await this.checkRecentFileToBeShowed();
|
|
||||||
await this.checkRecentFileToBeClosed();
|
|
||||||
await BrowserActions.click(this.recentFilesClosed);
|
|
||||||
await this.checkRecentFileToBeOpened();
|
|
||||||
}
|
|
||||||
|
|
||||||
async closeRecentFiles(): Promise<void> {
|
|
||||||
await this.checkRecentFileToBeShowed();
|
|
||||||
await this.checkRecentFileToBeOpened();
|
|
||||||
await BrowserActions.click(this.recentFilesExpanded);
|
|
||||||
await this.checkRecentFileToBeClosed();
|
|
||||||
}
|
|
||||||
|
|
||||||
async checkRecentFileToBeClosed(): Promise<void> {
|
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.recentFilesClosed);
|
|
||||||
}
|
|
||||||
|
|
||||||
async checkRecentFileToBeOpened(): Promise<void> {
|
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.recentFilesExpanded);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getRecentFileIcon(): Promise<string> {
|
|
||||||
return BrowserActions.getText(this.recentFileIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
// @deprecated prefer waitTillContentLoaded
|
// @deprecated prefer waitTillContentLoaded
|
||||||
async checkDocumentListElementsAreDisplayed(): Promise<void> {
|
async checkDocumentListElementsAreDisplayed(): Promise<void> {
|
||||||
await this.checkAcsContainer();
|
await this.checkAcsContainer();
|
||||||
@@ -286,10 +249,6 @@ export class ContentServicesPage {
|
|||||||
await this.contentList.dataTablePage().waitTillContentLoaded();
|
await this.contentList.dataTablePage().waitTillContentLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickOnContentServices(): Promise<void> {
|
|
||||||
await BrowserActions.click(this.contentServices);
|
|
||||||
}
|
|
||||||
|
|
||||||
async numberOfResultsDisplayed(): Promise<number> {
|
async numberOfResultsDisplayed(): Promise<number> {
|
||||||
return this.contentList.dataTablePage().numberOfRows();
|
return this.contentList.dataTablePage().numberOfRows();
|
||||||
}
|
}
|
||||||
@@ -331,10 +290,6 @@ export class ContentServicesPage {
|
|||||||
return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.createdBy);
|
return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.createdBy);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkListIsSortedBySizeColumn(sortOrder: string): Promise<any> {
|
|
||||||
return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.size);
|
|
||||||
}
|
|
||||||
|
|
||||||
async sortAndCheckListIsOrderedByAuthor(sortOrder: string): Promise<any> {
|
async sortAndCheckListIsOrderedByAuthor(sortOrder: string): Promise<any> {
|
||||||
await this.sortByAuthor(sortOrder);
|
await this.sortByAuthor(sortOrder);
|
||||||
return this.checkListIsSortedByAuthorColumn(sortOrder);
|
return this.checkListIsSortedByAuthorColumn(sortOrder);
|
||||||
@@ -460,11 +415,6 @@ export class ContentServicesPage {
|
|||||||
return BrowserActions.getAttribute(this.uploadMultipleFileButton, 'title');
|
return BrowserActions.getAttribute(this.uploadMultipleFileButton, 'title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFolderButtonTooltip(): Promise<string> {
|
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(this.uploadFolderButton);
|
|
||||||
return BrowserActions.getAttribute(this.uploadFolderButton, 'title');
|
|
||||||
}
|
|
||||||
|
|
||||||
async checkUploadButton(): Promise<void> {
|
async checkUploadButton(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsClickable(this.uploadFileButton);
|
await BrowserVisibility.waitUntilElementIsClickable(this.uploadFileButton);
|
||||||
}
|
}
|
||||||
@@ -473,10 +423,6 @@ export class ContentServicesPage {
|
|||||||
return this.uploadFileButton.isEnabled();
|
return this.uploadFileButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getErrorMessage(): Promise<string> {
|
|
||||||
return BrowserActions.getText(this.errorSnackBar);
|
|
||||||
}
|
|
||||||
|
|
||||||
async enableInfiniteScrolling(): Promise<void> {
|
async enableInfiniteScrolling(): Promise<void> {
|
||||||
const infiniteScrollButton = element(by.cssContainingText('.mat-slide-toggle-content', 'Enable Infinite Scrolling'));
|
const infiniteScrollButton = element(by.cssContainingText('.mat-slide-toggle-content', 'Enable Infinite Scrolling'));
|
||||||
await BrowserActions.click(infiniteScrollButton);
|
await BrowserActions.click(infiniteScrollButton);
|
||||||
@@ -532,11 +478,6 @@ export class ContentServicesPage {
|
|||||||
await DropActions.dropFile(this.dragAndDrop, file);
|
await DropActions.dropFile(this.dragAndDrop, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
async dragAndDropFolder(folderName: string): Promise<void> {
|
|
||||||
await this.checkDragAndDropDIsDisplayed();
|
|
||||||
await DropActions.dropFolder(this.dragAndDrop, folderName);
|
|
||||||
}
|
|
||||||
|
|
||||||
async checkLockIsDisplayedForElement(name): Promise<void> {
|
async checkLockIsDisplayedForElement(name): Promise<void> {
|
||||||
const lockButton = $(`div.adf-datatable-cell[data-automation-id="${name}"] button`);
|
const lockButton = $(`div.adf-datatable-cell[data-automation-id="${name}"] button`);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(lockButton);
|
await BrowserVisibility.waitUntilElementIsVisible(lockButton);
|
||||||
@@ -546,12 +487,6 @@ export class ContentServicesPage {
|
|||||||
return this.contentList.dataTablePage().getColumnValueForRow(this.columns.name, file, columnName);
|
return this.contentList.dataTablePage().getColumnValueForRow(this.columns.name, file, columnName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getStyleValueForRowText(rowName, styleName): Promise<string> {
|
|
||||||
const row = $(`div.adf-datatable-cell[data-automation-id="${rowName}"] span.adf-datatable-cell-value[title="${rowName}"]`);
|
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(row);
|
|
||||||
return row.getCssValue(styleName);
|
|
||||||
}
|
|
||||||
|
|
||||||
async checkEmptyFolderTextToBe(text): Promise<void> {
|
async checkEmptyFolderTextToBe(text): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.emptyFolder);
|
await BrowserVisibility.waitUntilElementIsVisible(this.emptyFolder);
|
||||||
await expect(await this.emptyFolder.getText()).toContain(text);
|
await expect(await this.emptyFolder.getText()).toContain(text);
|
||||||
@@ -561,10 +496,6 @@ export class ContentServicesPage {
|
|||||||
await expect(await BrowserActions.getAttribute(this.emptyFolderImage, 'src')).toContain(url);
|
await expect(await BrowserActions.getAttribute(this.emptyFolderImage, 'src')).toContain(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkEmptyRecentFileIsDisplayed(): Promise<void> {
|
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.emptyRecent);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getRowIconImageUrl(fileName): Promise<string> {
|
async getRowIconImageUrl(fileName): Promise<string> {
|
||||||
const iconRow = $(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`);
|
const iconRow = $(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`);
|
||||||
return BrowserActions.getAttribute(iconRow, 'src');
|
return BrowserActions.getAttribute(iconRow, 'src');
|
||||||
|
@@ -209,8 +209,8 @@ describe('Search Sorting Picker', () => {
|
|||||||
const nodeList = await getNodesDisplayed(numberOfElements, idList);
|
const nodeList = await getNodesDisplayed(numberOfElements, idList);
|
||||||
|
|
||||||
const modifiedDateList = [];
|
const modifiedDateList = [];
|
||||||
for (let i = 0; i < nodeList.length; i++) {
|
for (const item of nodeList) {
|
||||||
modifiedDateList.push(new Date(nodeList[i].entry.modifiedAt));
|
modifiedDateList.push(new Date(item.entry.modifiedAt));
|
||||||
}
|
}
|
||||||
|
|
||||||
await expect(contentServices.checkElementsDateSortedAsc(modifiedDateList)).toBe(true);
|
await expect(contentServices.checkElementsDateSortedAsc(modifiedDateList)).toBe(true);
|
||||||
@@ -218,14 +218,12 @@ describe('Search Sorting Picker', () => {
|
|||||||
|
|
||||||
const getNodesDisplayed = async function(numberOfElements: number, idList: string[]) {
|
const getNodesDisplayed = async function(numberOfElements: number, idList: string[]) {
|
||||||
const promises = [];
|
const promises = [];
|
||||||
let nodeList;
|
|
||||||
|
|
||||||
for (let i = 0; i < (numberOfElements - 1); i++) {
|
for (let i = 0; i < (numberOfElements - 1); i++) {
|
||||||
if (idList[i] && idList[i].trim() !== '') {
|
if (idList[i] && idList[i].trim() !== '') {
|
||||||
promises.push(nodesApi.getNode(idList[i]));
|
promises.push(nodesApi.getNode(idList[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nodeList = await Promise.all(promises);
|
return Promise.all(promises);
|
||||||
return nodeList;
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@@ -52,20 +52,18 @@ describe('Search component - Search Page', () => {
|
|||||||
|
|
||||||
const acsUser = new UserModel();
|
const acsUser = new UserModel();
|
||||||
const emptyFolderModel = new FolderModel({ name: 'search' + StringUtil.generateRandomString() });
|
const emptyFolderModel = new FolderModel({ name: 'search' + StringUtil.generateRandomString() });
|
||||||
let firstFileModel;
|
|
||||||
const newFolderModel = new FolderModel();
|
const newFolderModel = new FolderModel();
|
||||||
let fileNames = [];
|
|
||||||
const nrOfFiles = 15;
|
|
||||||
const adminNrOfFiles = 5;
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
fileNames = StringUtil.generateFilesNames(1, nrOfFiles, search.active.base, search.active.extension);
|
const nrOfFiles = 15;
|
||||||
|
const adminNrOfFiles = 5;
|
||||||
|
const fileNames = StringUtil.generateFilesNames(1, nrOfFiles, search.active.base, search.active.extension);
|
||||||
const adminFileNames = StringUtil.generateFilesNames(nrOfFiles + 1, nrOfFiles + adminNrOfFiles, search.active.base, search.active.extension);
|
const adminFileNames = StringUtil.generateFilesNames(nrOfFiles + 1, nrOfFiles + adminNrOfFiles, search.active.base, search.active.extension);
|
||||||
search.active.firstFile = fileNames[0];
|
search.active.firstFile = fileNames[0];
|
||||||
search.active.secondFile = fileNames[1];
|
search.active.secondFile = fileNames[1];
|
||||||
fileNames.splice(0, 1);
|
fileNames.splice(0, 1);
|
||||||
|
|
||||||
firstFileModel = new FileModel({
|
const firstFileModel = new FileModel({
|
||||||
name: search.active.firstFile,
|
name: search.active.firstFile,
|
||||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_path
|
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_path
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user