[HXCS-1166] extend SnackBar to customize content appearance (#8379)

* [HXCS-1166] add templateRef to SnackBarData interface

* [HXCS-1166] update SnackBarContentComponent

to be able to manage data.templateRef

* [HXCS-1166] add tests to NotificationService

* [HXCS-1166] fix lint

* [HXCS-1166] add documentation

* [HXCS-1166] follow PR advices

* [HXCS-1166] typos

* [HXCS-1166] update testrail id

---------

Co-authored-by: Adriano Costa <Adriano.Costa@hyland.comgit>
This commit is contained in:
Adriano Costa
2023-03-21 16:54:29 +01:00
committed by GitHub
parent 0c4cc37dd2
commit cfe158839b
11 changed files with 124 additions and 8 deletions

View File

@@ -24,6 +24,7 @@ export class SnackbarPage {
notificationSnackBar = $$(`[data-automation-id='adf-snackbar-message-content']`).first();
snackBarAction = $(`[data-automation-id='adf-snackbar-message-content-action-button']`);
snackBarContainerCss = $$('adf-snackbar-content');
decorativeIconSnackBar = $(`[data-automation-id='adf-snackbar-decorative-icon']`).first();
async waitForSnackBarToAppear(timeout = 5000) {
return BrowserVisibility.waitUntilElementIsVisible(this.snackBarContainerCss.first(), timeout,
@@ -45,6 +46,11 @@ export class SnackbarPage {
return this.snackBarAction.getText();
}
async getSnackBarDecorativeIcon(): Promise<string> {
await this.waitForSnackBarToAppear();
return this.decorativeIconSnackBar.getText();
}
async clickSnackBarAction(): Promise<void> {
await this.waitForSnackBarToAppear();
await BrowserActions.click(this.snackBarAction);