[AAE-5843] - Add e2e method to check the visibility of the upload fro… (#7262)

* [AAE-5843] - Add e2e method to check the visibility of the upload from local tab

* Remove expectation from page method

Co-authored-by: Ardit Domi <arditdomi@apl-c02g64vpmd6t.home>
Co-authored-by: Ardit Domi <arditdomi@apl-c02g64vpmd6t.broadband>
This commit is contained in:
arditdomi 2021-09-28 09:14:02 +01:00 committed by GitHub
parent 12ef9656aa
commit df08e36d24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -42,6 +42,7 @@ export class ContentNodeSelectorDialogPage {
tabPage: TabPage = new TabPage();
uploadButtonComponent = new UploadButtonPage();
uploadFromLocalTab = element.all(by.css('*[role="tab"]')).get(1);
uploadFromLocalTabName = 'Upload from your device';
repositoryTabName = 'Repository';
@ -189,4 +190,10 @@ export class ContentNodeSelectorDialogPage {
contentListPage(): DocumentListPage {
return this.contentList;
}
async isUploadFromLocalTabEnabled(): Promise<boolean> {
await BrowserVisibility.waitUntilElementIsPresent(this.uploadFromLocalTab);
const disabled = await BrowserActions.getAttribute(this.uploadFromLocalTab, 'aria-disabled');
return disabled === 'false';
}
}