[ACS-5725]fixed failing e2es

This commit is contained in:
Yasa-Nataliya
2023-10-09 20:20:57 +05:30
parent 90f92f7ae0
commit 69b396fbea
8 changed files with 39 additions and 62 deletions
+8 -6
View File
@@ -33,7 +33,7 @@ export class MetadataViewPage {
author = $(`[data-automation-id='card-textitem-value-properties.cm:author']`);
titleProperty = $(`span[data-automation-id='card-textitem-value-properties.cm:title'] span`);
editIcon = $(`button[data-automation-id='meta-data-card-toggle-edit']`);
editIconGeneral = $(`button[data-automation-id='meta-data-card-toggle-generalInfo-edit']`);
editIconGeneral = $(`button[data-automation-id='meta-data-generalInfo-edit']`);
informationButton = $(`button[data-automation-id='meta-data-card-toggle-expand']`);
informationSpan = $(`span[data-automation-id='meta-data-card-toggle-expand-label']`);
informationIcon = $(`span[data-automation-id='meta-data-card-toggle-expand-label'] ~ mat-icon`);
@@ -111,7 +111,11 @@ export class MetadataViewPage {
await BrowserVisibility.waitUntilElementIsNotVisible(this.editIcon);
}
async generaleditIconDisplayed(): Promise<void> {
async generalEditIconDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.editIconGeneral);
}
async generaleditIconNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsNotVisible(this.editIconGeneral);
}
@@ -120,7 +124,7 @@ export class MetadataViewPage {
}
async editIconGeneralClick(): Promise<void> {
await BrowserActions.clickExecuteScript('button[data-automation-id="meta-data-card-toggle-generalInfo-edit"]');
await BrowserActions.clickExecuteScript('button[data-automation-id="meta-data-generalInfo-edit"]');
}
async informationButtonIsDisplayed(): Promise<void> {
@@ -222,9 +226,7 @@ export class MetadataViewPage {
}
async getMetadataGroupTitle(groupName: string): Promise<string> {
const group = $(
'mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"] > mat-expansion-panel-header > span > mat-panel-title'
);
const group = $('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"] > mat-expansion-panel-header > span > div > mat-panel-title');
return BrowserActions.getText(group);
}