mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-7381][ADF] Break DataTable dependency on Material Module (#9657)
* [ACS-7381] remove MaterialModule dependency and convert components to standalone * [ACS-7381] remove MaterialModule dependency and convert components to standalone * [ACS-7381] tests fixes * [ACS-7381] tests fixes * [ACS-7381] tests fixes * [ACS-7381] tests fixes * [ACS-7381] tests fixes * [ACS-7381] tests fixes * [ACS-7381] tests fixes * [ACS-7381] tests fixes * [ACS-7381] tests fixes * [ACS-7381] fix e2e tests * [ACS-7381] update e2e tests * [ACS-7381] update e2e tests * [ACS-7381] update e2e tests * [ACS-7381] update e2e tests * [ACS-7381] update e2e tests * [ACS-7381] fix for checkboxes * [ACS-7381] fix e2e * [ACS-7381] fix e2e * [ACS-7381] fix e2e * [ACS-7381] fix e2e * [ACS-7381] fix for e2e * [ACS-7381] fix for e2e
This commit is contained in:
@@ -20,13 +20,12 @@ 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 = $('div[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 = $('td[class*="adf-no-content-container"]');
|
||||
|
||||
async checkEmptyAttachmentList(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noContentContainer);
|
||||
@@ -39,7 +38,7 @@ export class AttachmentListPage {
|
||||
}
|
||||
|
||||
async checkFileIsAttached(name: string): Promise<void> {
|
||||
const fileAttached = $$('div[data-automation-id="' + name + '"]').first();
|
||||
const fileAttached = $$('td[data-automation-id="' + name + '"]').first();
|
||||
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
||||
}
|
||||
|
||||
@@ -49,7 +48,7 @@ export class AttachmentListPage {
|
||||
|
||||
async viewFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click($$('div[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click($$('td[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click(this.buttonMenu);
|
||||
await browser.sleep(500);
|
||||
await BrowserActions.click(this.viewButton);
|
||||
@@ -58,7 +57,7 @@ export class AttachmentListPage {
|
||||
|
||||
async removeFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click($$('div[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click($$('td[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click(this.buttonMenu);
|
||||
await browser.sleep(500);
|
||||
await BrowserActions.click(this.removeButton);
|
||||
@@ -67,7 +66,7 @@ export class AttachmentListPage {
|
||||
|
||||
async downloadFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click($$('div[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click($$('td[data-automation-id="' + name + '"]').first());
|
||||
await BrowserActions.click(this.buttonMenu);
|
||||
await browser.sleep(500);
|
||||
await BrowserActions.click(this.downloadButton);
|
||||
@@ -75,15 +74,14 @@ export class AttachmentListPage {
|
||||
|
||||
async doubleClickFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserVisibility.waitUntilElementIsVisible($$(`div[data-automation-id="${name}"]`).first());
|
||||
const fileAttached = $$(`div[data-automation-id="${name}"]`).first();
|
||||
await BrowserVisibility.waitUntilElementIsVisible($$(`td[data-automation-id="${name}"]`).first());
|
||||
const fileAttached = $$(`td[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 = $$(`div[data-automation-id="${name}"]`).first();
|
||||
const fileAttached = $$(`td[data-automation-id="${name}"]`).first();
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(fileAttached);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user