mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
This reverts commit f27d62585b
.
This commit is contained in:
@@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserActions, createApiService, LoginPage, UploadActions, UserModel, UsersActions, ViewerPage } from '@alfresco/adf-testing';
|
||||
import { browser, by, element, protractor } from 'protractor';
|
||||
import { createApiService, BrowserActions, LoginPage, UploadActions, UserModel, UsersActions, ViewerPage } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Content Services Viewer', () => {
|
||||
const acsUser = new UserModel();
|
||||
@@ -362,7 +362,7 @@ describe('Content Services Viewer', () => {
|
||||
});
|
||||
|
||||
it('[C269109] Should not be able to open thumbnail panel before the pdf is loaded', async () => {
|
||||
const fileView = element.all(by.css(`#document-list-container td[data-automation-id="${pdfFile.name}"]`)).first();
|
||||
const fileView = element.all(by.css(`#document-list-container div[data-automation-id="${pdfFile.name}"]`)).first();
|
||||
await BrowserActions.click(fileView);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
|
||||
|
@@ -271,7 +271,7 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async checkLockIsDisplayedForElement(name: string): Promise<void> {
|
||||
const lockButton = $(`td.adf-datatable-cell[data-automation-id="${name}"] button`);
|
||||
const lockButton = $(`div.adf-datatable-cell[data-automation-id="${name}"] button`);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(lockButton);
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ export class ContentServicesPage {
|
||||
|
||||
async getAttributeValueForElement(elementName: string, propertyName: string): Promise<string> {
|
||||
const elementSize = $(
|
||||
`.app-document-list-container td.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"] span`
|
||||
`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"] span`
|
||||
);
|
||||
return BrowserActions.getText(elementSize);
|
||||
}
|
||||
@@ -306,7 +306,7 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async selectFolder(folderName: string): Promise<void> {
|
||||
const folderSelected = $(`td[data-automation-id="${folderName}"] .adf-datatable-center-img-ie`);
|
||||
const folderSelected = $(`div[data-automation-id="${folderName}"] .adf-datatable-center-img-ie`);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(folderSelected);
|
||||
await BrowserActions.click(folderSelected);
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ export class NavigationBarPage {
|
||||
async clickNavigationBarItem(title: string, untilElementIsVisible?: ElementFinder): Promise<void> {
|
||||
Logger.log(`clickNavigationBarItem ${title}`);
|
||||
|
||||
const menu = this.getMenuItemLocator(title);
|
||||
const menu = $(`.app-sidenav-link[data-automation-id="${title}"]`);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
|
||||
if (untilElementIsVisible) {
|
||||
|
@@ -20,12 +20,13 @@ import * as path from 'path';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class AttachmentListPage {
|
||||
attachFileButton = $('input[type="file"]');
|
||||
buttonMenu = $('button[data-automation-id="action_menu_0"]');
|
||||
viewButton = $('button[data-automation-id*="MENU_ACTIONS.VIEW_CONTENT"]');
|
||||
removeButton = $('button[data-automation-id*="MENU_ACTIONS.REMOVE_CONTENT"]');
|
||||
downloadButton = $('button[data-automation-id*="MENU_ACTIONS.DOWNLOAD_CONTENT"]');
|
||||
noContentContainer = $('td[class*="adf-no-content-container"]');
|
||||
|
||||
attachFileButton = $('input[type=\'file\']');
|
||||
buttonMenu = $('button[data-automation-id=\'action_menu_0\']');
|
||||
viewButton = $('button[data-automation-id*=\'MENU_ACTIONS.VIEW_CONTENT\']');
|
||||
removeButton = $('button[data-automation-id*=\'MENU_ACTIONS.REMOVE_CONTENT\']');
|
||||
downloadButton = $('button[data-automation-id*=\'MENU_ACTIONS.DOWNLOAD_CONTENT\']');
|
||||
noContentContainer = $('div[class*=\'adf-no-content-container\']');
|
||||
|
||||
async checkEmptyAttachmentList(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noContentContainer);
|
||||
@@ -38,7 +39,7 @@ export class AttachmentListPage {
|
||||
}
|
||||
|
||||
async checkFileIsAttached(name: string): Promise<void> {
|
||||
const fileAttached = $$('td[data-automation-id="' + name + '"]').first();
|
||||
const fileAttached = $$('div[data-automation-id="' + name + '"]').first();
|
||||
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@ export class AttachmentListPage {
|
||||
|
||||
async viewFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click($$('td[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click($$('div[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click(this.buttonMenu);
|
||||
await browser.sleep(500);
|
||||
await BrowserActions.click(this.viewButton);
|
||||
@@ -57,7 +58,7 @@ export class AttachmentListPage {
|
||||
|
||||
async removeFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click($$('td[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click($$('div[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click(this.buttonMenu);
|
||||
await browser.sleep(500);
|
||||
await BrowserActions.click(this.removeButton);
|
||||
@@ -66,7 +67,7 @@ export class AttachmentListPage {
|
||||
|
||||
async downloadFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click($$('td[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click($$('div[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click(this.buttonMenu);
|
||||
await browser.sleep(500);
|
||||
await BrowserActions.click(this.downloadButton);
|
||||
@@ -74,14 +75,15 @@ export class AttachmentListPage {
|
||||
|
||||
async doubleClickFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserVisibility.waitUntilElementIsVisible($$(`td[data-automation-id="${name}"]`).first());
|
||||
const fileAttached = $$(`td[data-automation-id="${name}"]`).first();
|
||||
await BrowserVisibility.waitUntilElementIsVisible($$(`div[data-automation-id="${name}"]`).first());
|
||||
const fileAttached = $$(`div[data-automation-id="${name}"]`).first();
|
||||
await BrowserActions.click(fileAttached);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
}
|
||||
|
||||
async checkFileIsRemoved(name: string): Promise<void> {
|
||||
const fileAttached = $$(`td[data-automation-id="${name}"]`).first();
|
||||
const fileAttached = $$(`div[data-automation-id="${name}"]`).first();
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(fileAttached);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user