mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Improve checkFilesAreAttachedToWidget() method (#6943)
* Improve checkFilesAreAttachedToWidget() method * Add types for the parameters * exclude test
This commit is contained in:
@@ -4,5 +4,6 @@
|
|||||||
"C279932": "login problem APS not basic",
|
"C279932": "login problem APS not basic",
|
||||||
"C279931": "login problem APS not basic",
|
"C279931": "login problem APS not basic",
|
||||||
"C279930": "login problem APS not basic",
|
"C279930": "login problem APS not basic",
|
||||||
"C593560": "https://alfresco.atlassian.net/browse/ADF-5366"
|
"C593560": "https://alfresco.atlassian.net/browse/ADF-5366",
|
||||||
|
"C290069": "https://alfresco.atlassian.net/browse/ADF-5387"
|
||||||
}
|
}
|
||||||
|
@@ -47,16 +47,16 @@ export class AttachFileWidgetPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsNotVisible(fileItem);
|
await BrowserVisibility.waitUntilElementIsNotVisible(fileItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFileIsAttached(fieldId, name): 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));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFilesAreAttachedToWidget(fieldId, name): Promise<void> {
|
async checkFilesAreAttachedToWidget(fieldId: string, names: string[]): Promise<void> {
|
||||||
await name.forEach(async fileName => {
|
for (const fileName of names) {
|
||||||
await this.checkFileIsAttached(fieldId, fileName);
|
await this.checkFileIsAttached(fieldId, fileName);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFileIsNotAttached(fieldId, name): Promise<void> {
|
async checkFileIsNotAttached(fieldId, name): Promise<void> {
|
||||||
|
Reference in New Issue
Block a user