mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-4474]Add checkWidgetsAreVisible method
* Add checkWidgetsAreVisible method * Add checkNoFileIsAttachedToWidgets()
This commit is contained in:
@@ -49,6 +49,12 @@ export class FormFields {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(fieldElement);
|
await BrowserVisibility.waitUntilElementIsVisible(fieldElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkWidgetsAreVisible(fieldsId: string[]): Promise<void> {
|
||||||
|
for (const fieldId of fieldsId) {
|
||||||
|
await this.checkWidgetIsVisible(fieldId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async checkWidgetIsClickable(fieldId: string): Promise<void> {
|
async checkWidgetIsClickable(fieldId: string): Promise<void> {
|
||||||
const fieldElement = element.all(by.css(`adf-form-field div[id='field-${fieldId}-container']`)).first();
|
const fieldElement = element.all(by.css(`adf-form-field div[id='field-${fieldId}-container']`)).first();
|
||||||
await BrowserVisibility.waitUntilElementIsClickable(fieldElement);
|
await BrowserVisibility.waitUntilElementIsClickable(fieldElement);
|
||||||
|
@@ -47,6 +47,12 @@ export class AttachFileWidgetPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsNotVisible(fileItem);
|
await BrowserVisibility.waitUntilElementIsNotVisible(fileItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkNoFileIsAttachedToWidgets(fieldIds: string[]): Promise<void> {
|
||||||
|
for (const fieldId of fieldIds) {
|
||||||
|
await this.checkNoFileIsAttached(fieldId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async checkFileIsAttached(fieldId: string, name: string): Promise<void> {
|
async checkFileIsAttached(fieldId: string, name: string): Promise<void> {
|
||||||
const widget = await this.formFields.getWidget(fieldId);
|
const widget = await this.formFields.getWidget(fieldId);
|
||||||
const fileAttached = widget.element(this.filesListLocator).element(by.cssContainingText('mat-list-item span ', name));
|
const fileAttached = widget.element(this.filesListLocator).element(by.cssContainingText('mat-list-item span ', name));
|
||||||
|
Reference in New Issue
Block a user