mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -67,6 +67,13 @@ describe('Notifications Component', () => {
|
||||
await expect(await notificationPage.snackbarPage.getSnackBarMessage()).toEqual('test');
|
||||
});
|
||||
|
||||
it('[C694098] Should show a decorative icon when the message and the icon fields are not empty and button is clicked', async () => {
|
||||
await notificationPage.enterMessageField('test');
|
||||
await notificationPage.enterDecorativeIconField('folder');
|
||||
await notificationPage.clickNotificationButton();
|
||||
await expect(await notificationPage.snackbarPage.getSnackBarDecorativeIcon()).toEqual('folder');
|
||||
});
|
||||
|
||||
it('[C279978] Should show notification with action when the message is not empty and button is clicked', async () => {
|
||||
await notificationPage.enterMessageField('test');
|
||||
await notificationPage.clickActionToggle();
|
||||
|
@@ -23,6 +23,7 @@ export class NotificationDemoPage {
|
||||
snackbarPage = new SnackbarPage();
|
||||
|
||||
messageField = $('input[data-automation-id="notification-message"]');
|
||||
decorativeIconField = $('input[data-automation-id="notification-icon"]');
|
||||
durationField = $('input[data-automation-id="notification-duration"]');
|
||||
actionToggle = $('mat-slide-toggle[data-automation-id="notification-action-toggle"]');
|
||||
notificationSnackBar = $$('simple-snack-bar').first();
|
||||
@@ -50,6 +51,10 @@ export class NotificationDemoPage {
|
||||
await BrowserActions.clearSendKeys(this.messageField, text);
|
||||
}
|
||||
|
||||
async enterDecorativeIconField(icon: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.decorativeIconField, icon);
|
||||
}
|
||||
|
||||
async enterDurationField(time: number): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.durationField, time.toString());
|
||||
}
|
||||
|
Reference in New Issue
Block a user