mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[HXCS-1322] fix e2e NotificaionComponent demo (#8413)
* [HXCS-1322] fix e2e NotificaionComponent demo * [HXCS-1173] revert to one line * [HXCS-1173] move new test after breaking tests --------- Co-authored-by: Adriano Costa <Adriano.Costa@hyland.comgit>
This commit is contained in:
@@ -29,7 +29,7 @@ import { takeUntil } from 'rxjs/operators';
|
|||||||
export class NotificationsComponent implements OnInit, OnDestroy {
|
export class NotificationsComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
message = 'I ♥️ ADF';
|
message = 'I ♥️ ADF';
|
||||||
decorativeIcon = 'folder';
|
decorativeIcon = '';
|
||||||
withAction = false;
|
withAction = false;
|
||||||
actionOutput = '';
|
actionOutput = '';
|
||||||
snackBarConfigObject = '';
|
snackBarConfigObject = '';
|
||||||
|
@@ -67,13 +67,6 @@ describe('Notifications Component', () => {
|
|||||||
await expect(await notificationPage.snackbarPage.getSnackBarMessage()).toEqual('test');
|
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 () => {
|
it('[C279978] Should show notification with action when the message is not empty and button is clicked', async () => {
|
||||||
await notificationPage.enterMessageField('test');
|
await notificationPage.enterMessageField('test');
|
||||||
await notificationPage.clickActionToggle();
|
await notificationPage.clickActionToggle();
|
||||||
@@ -103,6 +96,13 @@ describe('Notifications Component', () => {
|
|||||||
await notificationPage.clickActionToggle();
|
await notificationPage.clickActionToggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
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('[C279987] Should show custom notification during a limited time when a duration is added', async () => {
|
it('[C279987] Should show custom notification during a limited time when a duration is added', async () => {
|
||||||
await notificationPage.enterMessageField('test');
|
await notificationPage.enterMessageField('test');
|
||||||
await notificationPage.enterDurationField(1000);
|
await notificationPage.enterDurationField(1000);
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
<p class="adf-snackbar-message-content" data-automation-id="adf-snackbar-message-content" aria-hidden="true">
|
<p class="adf-snackbar-message-content" data-automation-id="adf-snackbar-message-content" aria-hidden="true"><mat-icon *ngIf="data.decorativeIcon" data-automation-id="adf-snackbar-decorative-icon">{{ data.decorativeIcon }}</mat-icon>{{ data.message }}</p>
|
||||||
<mat-icon *ngIf="data.decorativeIcon" data-automation-id="adf-snackbar-decorative-icon">{{ data.decorativeIcon }}</mat-icon>{{ data.message }}
|
|
||||||
</p>
|
|
||||||
<div *ngIf="data.showAction" class="adf-snackbar-message-content-action" aria-hidden="true">
|
<div *ngIf="data.showAction" class="adf-snackbar-message-content-action" aria-hidden="true">
|
||||||
<button mat-button (click)="snackBarRef.dismissWithAction()" *ngIf="data.actionLabel" class="adf-snackbar-message-content-action-button"
|
<button mat-button (click)="snackBarRef.dismissWithAction()" *ngIf="data.actionLabel" class="adf-snackbar-message-content-action-button"
|
||||||
data-automation-id="adf-snackbar-message-content-action-button">
|
data-automation-id="adf-snackbar-message-content-action-button">
|
||||||
|
Reference in New Issue
Block a user