mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[Dem0 shell] increase default time to message in order to help the e2e
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput type="number" class="form-control" formControlName="duration" placeholder="Duration" data-automation-id="notification-duration">
|
<input matInput type="number" class="form-control" formControlName="duration" [value]="defaultDuration" placeholder="Duration" data-automation-id="notification-duration">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select class="form-control" formControlName="horizontalPosition" placeholder="Horizontal Position" data-automation-id="notification-horizontal-position">
|
<mat-select class="form-control" formControlName="horizontalPosition" placeholder="Horizontal Position" data-automation-id="notification-horizontal-position">
|
||||||
|
@@ -53,8 +53,12 @@ export class NotificationsComponent implements OnInit {
|
|||||||
{ value: 'bottom', title: 'Bottom' }
|
{ value: 'bottom', title: 'Bottom' }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
defaultDuration = 20000;
|
||||||
|
|
||||||
constructor(private notificationService: NotificationService,
|
constructor(private notificationService: NotificationService,
|
||||||
private formBuilder: FormBuilder) { }
|
private formBuilder: FormBuilder) {
|
||||||
|
this.snackBarConfig.duration = this.defaultDuration;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.configForm = this.formBuilder.group({
|
this.configForm = this.formBuilder.group({
|
||||||
@@ -97,12 +101,11 @@ export class NotificationsComponent implements OnInit {
|
|||||||
|
|
||||||
if (this.message) {
|
if (this.message) {
|
||||||
if (this.withAction) {
|
if (this.withAction) {
|
||||||
this.notificationService
|
this.notificationService.openSnackMessageAction(this.message, 'Some action', this.snackBarConfig.duration)
|
||||||
.openSnackMessageAction(this.message, 'Some action')
|
|
||||||
.onAction()
|
.onAction()
|
||||||
.subscribe(() => this.actionOutput = 'Action clicked');
|
.subscribe(() => this.actionOutput = 'Action clicked');
|
||||||
} else {
|
} else {
|
||||||
this.notificationService.openSnackMessage(this.message);
|
this.notificationService.openSnackMessage(this.message, this.snackBarConfig.duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user