mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-5869] Added missing methods for e2e's (#7480)
* [AAE-5869] added missing methods for e2e's * [AAE-5869] use TestElement * [AAE-5869] added method to display no content container * [AAE-5869] added method to wait for file properties table * trigger travis * [AAE-5869] upgrade simpleapp id of new widget * trigger travis * [AAE-5869] upgrade simpleapp * trigger travis * [AAE-5869] removed check for table display for file not attached method * [AAE-5869] fixed string lint * [AAE-5869] fixed lint error
This commit is contained in:
Binary file not shown.
@@ -39,7 +39,7 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
dataTable = this.contentList.dataTablePage();
|
dataTable = this.contentList.dataTablePage();
|
||||||
siteListDropdown = new DropdownPage(this.dialog.$(`mat-select[data-automation-id='site-my-files-option']`));
|
siteListDropdown = new DropdownPage(this.dialog.$(`mat-select[data-automation-id='site-my-files-option']`));
|
||||||
breadcrumbDropdown = new BreadcrumbDropdownPage();
|
breadcrumbDropdown = new BreadcrumbDropdownPage();
|
||||||
tabPage: TabPage = new TabPage();
|
tab: TabPage = new TabPage();
|
||||||
uploadButtonComponent = new UploadButtonPage();
|
uploadButtonComponent = new UploadButtonPage();
|
||||||
|
|
||||||
uploadFromLocalTab = $$('*[role="tab"]').get(1);
|
uploadFromLocalTab = $$('*[role="tab"]').get(1);
|
||||||
@@ -50,6 +50,10 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
return this.breadcrumbDropdown;
|
return this.breadcrumbDropdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tabPage(): TabPage {
|
||||||
|
return this.tab;
|
||||||
|
}
|
||||||
|
|
||||||
uploadButtonPage(): UploadButtonPage {
|
uploadButtonPage(): UploadButtonPage {
|
||||||
return this.uploadButtonComponent;
|
return this.uploadButtonComponent;
|
||||||
}
|
}
|
||||||
@@ -159,11 +163,11 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
async attachFilesFromLocal(files: FileModel[]): Promise<void> {
|
async attachFilesFromLocal(files: FileModel[]): Promise<void> {
|
||||||
await this.checkFileServerTabIsLoaded();
|
await this.checkFileServerTabIsLoaded();
|
||||||
|
|
||||||
await this.tabPage.clickTabByLabel(this.uploadFromLocalTabName);
|
await this.tab.clickTabByLabel(this.uploadFromLocalTabName);
|
||||||
|
|
||||||
await this.uploadButtonComponent.attachFiles(files);
|
await this.uploadButtonComponent.attachFiles(files);
|
||||||
|
|
||||||
await this.tabPage.clickTabByLabel(this.repositoryTabName);
|
await this.tab.clickTabByLabel(this.repositoryTabName);
|
||||||
|
|
||||||
await this.dataTable.waitForTableBody();
|
await this.dataTable.waitForTableBody();
|
||||||
await this.dataTable.waitTillContentLoaded();
|
await this.dataTable.waitTillContentLoaded();
|
||||||
|
@@ -40,6 +40,18 @@ export class BreadcrumbDropdownPage {
|
|||||||
await this.breadCrumbDropdown.checkDropdownIsVisible();
|
await this.breadCrumbDropdown.checkDropdownIsVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkBreadCrumbDropdownIsNotDisplayed(): Promise<void> {
|
||||||
|
await this.breadCrumbDropdown.checkDropdownIsNotVisible();
|
||||||
|
}
|
||||||
|
|
||||||
|
async checkBreadCrumbOptionIsDisplayed(optionName: string): Promise<void> {
|
||||||
|
await this.breadCrumbDropdown.checkOptionIsDisplayed(optionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
async checkBreadCrumbOptionIsNotDisplayed(optionName: string): Promise<void> {
|
||||||
|
await this.breadCrumbDropdown.checkOptionIsNotDisplayed(optionName);
|
||||||
|
}
|
||||||
|
|
||||||
async getTextOfCurrentFolder(): Promise<string> {
|
async getTextOfCurrentFolder(): Promise<string> {
|
||||||
return BrowserActions.getText(this.currentFolder);
|
return BrowserActions.getText(this.currentFolder);
|
||||||
}
|
}
|
||||||
|
@@ -34,6 +34,7 @@ export class DataTableComponentPage {
|
|||||||
emptyList: ElementFinder;
|
emptyList: ElementFinder;
|
||||||
emptyListTitle: ElementFinder;
|
emptyListTitle: ElementFinder;
|
||||||
emptyListSubtitle: ElementFinder;
|
emptyListSubtitle: ElementFinder;
|
||||||
|
noContentContainer: ElementFinder;
|
||||||
|
|
||||||
rows = `adf-datatable div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`;
|
rows = `adf-datatable div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`;
|
||||||
|
|
||||||
@@ -52,6 +53,7 @@ export class DataTableComponentPage {
|
|||||||
this.emptyList = this.rootElement.$(`adf-empty-content`);
|
this.emptyList = this.rootElement.$(`adf-empty-content`);
|
||||||
this.emptyListTitle = this.rootElement.$(`.adf-empty-content__title`);
|
this.emptyListTitle = this.rootElement.$(`.adf-empty-content__title`);
|
||||||
this.emptyListSubtitle = this.rootElement.$(`.adf-empty-content__subtitle`);
|
this.emptyListSubtitle = this.rootElement.$(`.adf-empty-content__subtitle`);
|
||||||
|
this.noContentContainer = $(`div[class*='adf-no-content-container']`);
|
||||||
}
|
}
|
||||||
|
|
||||||
geCellElementDetail(detail: string): ElementArrayFinder {
|
geCellElementDetail(detail: string): ElementArrayFinder {
|
||||||
@@ -462,6 +464,10 @@ export class DataTableComponentPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible($(`div[data-automation-id="auto_id_entry.${column}"]`));
|
await BrowserVisibility.waitUntilElementIsVisible($(`div[data-automation-id="auto_id_entry.${column}"]`));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkNoContentContainerIsDisplayed() {
|
||||||
|
await BrowserVisibility.waitUntilElementIsVisible(this.noContentContainer);
|
||||||
|
}
|
||||||
|
|
||||||
async getNumberOfColumns(): Promise<number> {
|
async getNumberOfColumns(): Promise<number> {
|
||||||
return this.allColumns.count();
|
return this.allColumns.count();
|
||||||
}
|
}
|
||||||
|
@@ -16,12 +16,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, $ } from 'protractor';
|
import { by, element, $ } from 'protractor';
|
||||||
|
import { TestElement } from '../../../test-element';
|
||||||
import { BrowserActions, BrowserVisibility } from '../../../utils/public-api';
|
import { BrowserActions, BrowserVisibility } from '../../../utils/public-api';
|
||||||
|
|
||||||
export class TabPage {
|
export class TabPage {
|
||||||
|
|
||||||
changeTabAnimation = $('div[class="mat-ripple-element"]');
|
changeTabAnimation = $('div[class="mat-ripple-element"]');
|
||||||
|
|
||||||
|
public disabledContentNodeSelectorTabInfoIcon = TestElement.byCss('[data-automation-id="adf-content-node-selector-disabled-tab-info-icon"]');
|
||||||
|
|
||||||
async clickTabByLabel(tabLabel): Promise<void> {
|
async clickTabByLabel(tabLabel): Promise<void> {
|
||||||
const user = element(by.cssContainingText('.mat-tab-label-content', tabLabel));
|
const user = element(by.cssContainingText('.mat-tab-label-content', tabLabel));
|
||||||
await BrowserActions.click(user);
|
await BrowserActions.click(user);
|
||||||
|
@@ -53,6 +53,10 @@ export class DropdownPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.dropDownElement);
|
await BrowserVisibility.waitUntilElementIsVisible(this.dropDownElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkDropdownIsNotVisible(): Promise<void> {
|
||||||
|
await BrowserVisibility.waitUntilElementIsNotVisible(this.dropDownElement);
|
||||||
|
}
|
||||||
|
|
||||||
async checkDropdownIsClickable(): Promise<void> {
|
async checkDropdownIsClickable(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsClickable(this.dropDownElement);
|
await BrowserVisibility.waitUntilElementIsClickable(this.dropDownElement);
|
||||||
}
|
}
|
||||||
|
@@ -24,14 +24,18 @@ import { TestElement } from '../../../../core/test-element';
|
|||||||
export class AttachFileWidgetCloudPage {
|
export class AttachFileWidgetCloudPage {
|
||||||
|
|
||||||
widget: ElementFinder;
|
widget: ElementFinder;
|
||||||
|
filesListLocator: string = 'div[class="adf-file-properties-table"]';
|
||||||
|
|
||||||
constructor(fieldId: string) {
|
constructor(fieldId: string) {
|
||||||
this.assignWidget(fieldId);
|
this.assignWidget(fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFileAttachedLocatorByContainingText = async (text: string): Promise<ElementFinder> => {
|
async isFileTablePropertiesDisplayed(): Promise<void> {
|
||||||
const filesListLocator = 'div[class="adf-file-properties-table"]';
|
await BrowserVisibility.waitUntilElementIsVisible(this.widget.$(this.filesListLocator));
|
||||||
return this.widget.$(filesListLocator).element(by.cssContainingText('table tbody tr td span ', text));
|
}
|
||||||
|
|
||||||
|
getFileAttachedLocatorByContainingText = async(text: string): Promise<ElementFinder> => {
|
||||||
|
return this.widget.$(this.filesListLocator).element(by.cssContainingText('table tbody tr td span ', text));
|
||||||
};
|
};
|
||||||
|
|
||||||
assignWidget(fieldId: string): void {
|
assignWidget(fieldId: string): void {
|
||||||
@@ -55,6 +59,7 @@ export class AttachFileWidgetCloudPage {
|
|||||||
|
|
||||||
async checkFileIsAttached(name): Promise<void> {
|
async checkFileIsAttached(name): Promise<void> {
|
||||||
const fileAttached = await this.getFileAttachedLocatorByContainingText(name);
|
const fileAttached = await this.getFileAttachedLocatorByContainingText(name);
|
||||||
|
await this.isFileTablePropertiesDisplayed();
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,8 +70,7 @@ export class AttachFileWidgetCloudPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkNoFileIsAttached(): Promise<void> {
|
async checkNoFileIsAttached(): Promise<void> {
|
||||||
const filesListLocator = 'div[class="adf-file-properties-table"]';
|
const fileItem = new TestElement(this.widget.$(this.filesListLocator).$('table'));
|
||||||
const fileItem = new TestElement(this.widget.$(filesListLocator).$('table'));
|
|
||||||
await fileItem.waitNotVisible();
|
await fileItem.waitNotVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -298,7 +298,8 @@ export const ACTIVITI_CLOUD_APPS = {
|
|||||||
attachFileWidget2: 'Attachfile04mfeb',
|
attachFileWidget2: 'Attachfile04mfeb',
|
||||||
attachFileLocalChildFolder: 'Attachfilelocalchildfolder',
|
attachFileLocalChildFolder: 'Attachfilelocalchildfolder',
|
||||||
attachFileContentServices: 'Attachfilecontentservices',
|
attachFileContentServices: 'Attachfilecontentservices',
|
||||||
attachFileLocalMultiple: 'Attachfilelocalmultiple'
|
attachFileLocalMultiple: 'Attachfilelocalmultiple',
|
||||||
|
attachFileInvalidPath: 'Attachfileinvalidpath'
|
||||||
},
|
},
|
||||||
attachSingleMultiple: {
|
attachSingleMultiple: {
|
||||||
name: 'attach-single-multiple',
|
name: 'attach-single-multiple',
|
||||||
|
Reference in New Issue
Block a user