mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
enable prefer-const rule for tslint, fix issues (#4409)
* enable prefer-const rule for tslint, fix issues * Update content-node-selector.component.spec.ts * Update content-node-selector.component.spec.ts * fix const * fix lint issues * update tests * update tests * update tests * fix code * fix page class
This commit is contained in:
committed by
Eugenio Romano
parent
26c5982a1a
commit
a7a48e8b2b
@@ -36,32 +36,32 @@ class ProvidesNotificationServiceComponent {
|
||||
}
|
||||
|
||||
sendMessageWithoutConfig() {
|
||||
let promise = this.notificationService.openSnackMessage('Test notification', 1000);
|
||||
const promise = this.notificationService.openSnackMessage('Test notification', 1000);
|
||||
return promise;
|
||||
}
|
||||
|
||||
sendMessage() {
|
||||
let promise = this.notificationService.openSnackMessage('Test notification', 1000);
|
||||
const promise = this.notificationService.openSnackMessage('Test notification', 1000);
|
||||
return promise;
|
||||
}
|
||||
|
||||
sendCustomMessage() {
|
||||
let promise = this.notificationService.openSnackMessage('Test notification', new MatSnackBarConfig());
|
||||
const promise = this.notificationService.openSnackMessage('Test notification', new MatSnackBarConfig());
|
||||
return promise;
|
||||
}
|
||||
|
||||
sendMessageActionWithoutConfig() {
|
||||
let promise = this.notificationService.openSnackMessageAction('Test notification', 'TestWarn', 1000);
|
||||
const promise = this.notificationService.openSnackMessageAction('Test notification', 'TestWarn', 1000);
|
||||
return promise;
|
||||
}
|
||||
|
||||
sendMessageAction() {
|
||||
let promise = this.notificationService.openSnackMessageAction('Test notification', 'TestWarn', 1000);
|
||||
const promise = this.notificationService.openSnackMessageAction('Test notification', 'TestWarn', 1000);
|
||||
return promise;
|
||||
}
|
||||
|
||||
sendCustomMessageAction() {
|
||||
let promise = this.notificationService.openSnackMessageAction('Test notification', 'TestWarn', new MatSnackBarConfig());
|
||||
const promise = this.notificationService.openSnackMessageAction('Test notification', 'TestWarn', new MatSnackBarConfig());
|
||||
return promise;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ describe('NotificationService', () => {
|
||||
it('should translate messages', (done) => {
|
||||
spyOn(translationService, 'instant').and.callThrough();
|
||||
|
||||
let promise = fixture.componentInstance.sendMessage();
|
||||
const promise = fixture.componentInstance.sendMessage();
|
||||
promise.afterDismissed().subscribe(() => {
|
||||
expect(translationService.instant).toHaveBeenCalled();
|
||||
done();
|
||||
@@ -109,7 +109,7 @@ describe('NotificationService', () => {
|
||||
});
|
||||
|
||||
it('should open a message notification bar', (done) => {
|
||||
let promise = fixture.componentInstance.sendMessage();
|
||||
const promise = fixture.componentInstance.sendMessage();
|
||||
promise.afterDismissed().subscribe(() => {
|
||||
done();
|
||||
});
|
||||
@@ -120,7 +120,7 @@ describe('NotificationService', () => {
|
||||
});
|
||||
|
||||
it('should open a message notification bar without custom configuration', (done) => {
|
||||
let promise = fixture.componentInstance.sendMessageWithoutConfig();
|
||||
const promise = fixture.componentInstance.sendMessageWithoutConfig();
|
||||
promise.afterDismissed().subscribe(() => {
|
||||
done();
|
||||
});
|
||||
@@ -131,7 +131,7 @@ describe('NotificationService', () => {
|
||||
});
|
||||
|
||||
it('should open a message notification bar with custom configuration', async((done) => {
|
||||
let promise = fixture.componentInstance.sendCustomMessage();
|
||||
const promise = fixture.componentInstance.sendCustomMessage();
|
||||
promise.afterDismissed().subscribe(() => {
|
||||
done();
|
||||
});
|
||||
@@ -142,7 +142,7 @@ describe('NotificationService', () => {
|
||||
}));
|
||||
|
||||
it('should open a message notification bar with action', (done) => {
|
||||
let promise = fixture.componentInstance.sendMessageAction();
|
||||
const promise = fixture.componentInstance.sendMessageAction();
|
||||
promise.afterDismissed().subscribe(() => {
|
||||
done();
|
||||
});
|
||||
@@ -153,7 +153,7 @@ describe('NotificationService', () => {
|
||||
});
|
||||
|
||||
it('should open a message notification bar with action and custom configuration', async((done) => {
|
||||
let promise = fixture.componentInstance.sendCustomMessageAction();
|
||||
const promise = fixture.componentInstance.sendCustomMessageAction();
|
||||
promise.afterDismissed().subscribe(() => {
|
||||
done();
|
||||
});
|
||||
@@ -164,7 +164,7 @@ describe('NotificationService', () => {
|
||||
}));
|
||||
|
||||
it('should open a message notification bar with action and no custom configuration', (done) => {
|
||||
let promise = fixture.componentInstance.sendMessageActionWithoutConfig();
|
||||
const promise = fixture.componentInstance.sendMessageActionWithoutConfig();
|
||||
promise.afterDismissed().subscribe(() => {
|
||||
done();
|
||||
});
|
||||
|
Reference in New Issue
Block a user