remove unused demo shell api

This commit is contained in:
Denys Vuika
2023-07-31 14:40:07 -04:00
parent 3f3e83057d
commit de19b4f5d9
3 changed files with 7 additions and 80 deletions

View File

@@ -49,7 +49,6 @@ export class ContentServicesPage {
multipleFileUploadToggle = $('#adf-document-list-enable-drop-files');
uploadBorder = $('#document-list-container');
contentServices = $('.app-sidenav-link[data-automation-id="Content Services"]');
currentFolder = $('div[class*="adf-breadcrumb-item adf-active"] div');
createFolderButton = $('button[data-automation-id="create-new-folder"]');
editFolderButton = $('button[data-automation-id="edit-folder"]');
@@ -60,20 +59,14 @@ export class ContentServicesPage {
uploadFileButtonInput = $('input[data-automation-id="upload-single-file"]');
uploadMultipleFileButton = $('input[data-automation-id="upload-multiple-files"]');
uploadFolderButton = $('input[data-automation-id="uploadFolder"]');
errorSnackBar = $('simple-snack-bar[class*="mat-simple-snackbar"]');
emptyPagination = $('adf-pagination[class*="adf-pagination__empty"]');
dragAndDrop = $$('adf-upload-drag-area div').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();
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();
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');
emptyFolderImage = $('.adf-empty-folder-image');
emptyRecent = $('.app-container-recent .app-empty-list__title');
gridViewButton = $('button[data-automation-id="document-list-grid-view"]');
cardViewContainer = $('div.app-document-list-container div.adf-datatable-card');
shareNodeButton = element(by.cssContainingText('mat-icon', ' share '));
@@ -234,36 +227,6 @@ export class ContentServicesPage {
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
async checkDocumentListElementsAreDisplayed(): Promise<void> {
await this.checkAcsContainer();
@@ -286,10 +249,6 @@ export class ContentServicesPage {
await this.contentList.dataTablePage().waitTillContentLoaded();
}
async clickOnContentServices(): Promise<void> {
await BrowserActions.click(this.contentServices);
}
async numberOfResultsDisplayed(): Promise<number> {
return this.contentList.dataTablePage().numberOfRows();
}
@@ -331,10 +290,6 @@ export class ContentServicesPage {
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> {
await this.sortByAuthor(sortOrder);
return this.checkListIsSortedByAuthorColumn(sortOrder);
@@ -460,11 +415,6 @@ export class ContentServicesPage {
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> {
await BrowserVisibility.waitUntilElementIsClickable(this.uploadFileButton);
}
@@ -473,10 +423,6 @@ export class ContentServicesPage {
return this.uploadFileButton.isEnabled();
}
async getErrorMessage(): Promise<string> {
return BrowserActions.getText(this.errorSnackBar);
}
async enableInfiniteScrolling(): Promise<void> {
const infiniteScrollButton = element(by.cssContainingText('.mat-slide-toggle-content', 'Enable Infinite Scrolling'));
await BrowserActions.click(infiniteScrollButton);
@@ -532,11 +478,6 @@ export class ContentServicesPage {
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> {
const lockButton = $(`div.adf-datatable-cell[data-automation-id="${name}"] button`);
await BrowserVisibility.waitUntilElementIsVisible(lockButton);
@@ -546,12 +487,6 @@ export class ContentServicesPage {
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> {
await BrowserVisibility.waitUntilElementIsVisible(this.emptyFolder);
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);
}
async checkEmptyRecentFileIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.emptyRecent);
}
async getRowIconImageUrl(fileName): Promise<string> {
const iconRow = $(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`);
return BrowserActions.getAttribute(iconRow, 'src');

View File

@@ -209,8 +209,8 @@ describe('Search Sorting Picker', () => {
const nodeList = await getNodesDisplayed(numberOfElements, idList);
const modifiedDateList = [];
for (let i = 0; i < nodeList.length; i++) {
modifiedDateList.push(new Date(nodeList[i].entry.modifiedAt));
for (const item of nodeList) {
modifiedDateList.push(new Date(item.entry.modifiedAt));
}
await expect(contentServices.checkElementsDateSortedAsc(modifiedDateList)).toBe(true);
@@ -218,14 +218,12 @@ describe('Search Sorting Picker', () => {
const getNodesDisplayed = async function(numberOfElements: number, idList: string[]) {
const promises = [];
let nodeList;
for (let i = 0; i < (numberOfElements - 1); i++) {
if (idList[i] && idList[i].trim() !== '') {
promises.push(nodesApi.getNode(idList[i]));
}
}
nodeList = await Promise.all(promises);
return nodeList;
return Promise.all(promises);
};
});

View File

@@ -52,20 +52,18 @@ describe('Search component - Search Page', () => {
const acsUser = new UserModel();
const emptyFolderModel = new FolderModel({ name: 'search' + StringUtil.generateRandomString() });
let firstFileModel;
const newFolderModel = new FolderModel();
let fileNames = [];
const nrOfFiles = 15;
const adminNrOfFiles = 5;
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);
search.active.firstFile = fileNames[0];
search.active.secondFile = fileNames[1];
fileNames.splice(0, 1);
firstFileModel = new FileModel({
const firstFileModel = new FileModel({
name: search.active.firstFile,
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_path
});