[ACS-5647] rework template of library metadata form component (#3487)

* ACS-5647 Removed template for view mode and used template for edit mode instead

* ACS-5647 Fixed auto focus for name field

* ACS-5647 Reverted data automation id

* ACS-5647 Corrected unit tests

* e2e fix for library details

---------

Co-authored-by: akash.rathod@hyland.com <akash.rathod@hyland.com>
This commit is contained in:
AleksanderSklorz
2023-10-24 22:29:59 +02:00
committed by GitHub
parent 9b2cf2bbf1
commit 7ae335c3d2
6 changed files with 66 additions and 111 deletions

View File

@@ -32,6 +32,8 @@ export class LibraryMetadata extends Component {
visibilityPublic = this.byCssText('.mat-option .mat-option-text', 'Public', browser);
visibilityPrivate = this.byCssText('.mat-option .mat-option-text', 'Private', browser);
visibilityModerated = this.byCssText('.mat-option .mat-option-text', 'Moderated', browser);
visibilityValue = this.byCss('[data-automation-id="library-visibility-properties-wrapper"] .mat-select');
hint = this.byCss('.mat-hint');
error = this.byCss('.mat-error');
@@ -57,7 +59,7 @@ export class LibraryMetadata extends Component {
}
private async getValueOfField(fieldName: string) {
return this.getFieldByName(fieldName).getText();
return this.getFieldByName(fieldName).getAttribute('value');
}
private async enterTextInInput(fieldName: string, text: string) {
@@ -140,11 +142,11 @@ export class LibraryMetadata extends Component {
}
async isVisibilityDisplayed() {
return this.isFieldDisplayed('Visibility');
return browser.isElementPresent(this.visibilityValue);
}
async getVisibility(): Promise<string> {
return this.getValueOfField('Visibility');
return this.visibilityValue.getText();
}
async setVisibility(visibility: string) {