mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-6196] await-thenable rule for ESLint, fix issues (#9027)
* fix issues for core lib * fix content services lib * fix and cleanup process services * [ci:force] process services cloud * [ci:force] align coverage with all libs * [ci:force] fix the insights
This commit is contained in:
@@ -48,7 +48,7 @@ describe('VersionManagerComponent', () => {
|
||||
component.node = node;
|
||||
|
||||
nodesApiService = TestBed.inject(NodesApiService);
|
||||
spyOnListVersionHistory = spyOn(component.versionListComponent['versionsApi'], 'listVersionHistory').and.callFake(() =>
|
||||
spyOnListVersionHistory = spyOn(component.versionListComponent.versionsApi, 'listVersionHistory').and.callFake(() =>
|
||||
Promise.resolve(new VersionPaging({ list: { entries: [versionEntry] } }))
|
||||
);
|
||||
});
|
||||
@@ -81,24 +81,25 @@ describe('VersionManagerComponent', () => {
|
||||
expect(versionCommentEl).toBeNull();
|
||||
});
|
||||
|
||||
it('should emit success event upon successful upload of a new version', async () => {
|
||||
it('should emit success event upon successful upload of a new version', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
const emittedData = { value: { entry: node } };
|
||||
await component.uploadSuccess.subscribe((event) => {
|
||||
expect(event).toBe(node);
|
||||
});
|
||||
let lastValue: Node;
|
||||
component.uploadSuccess.subscribe((event) => lastValue = event);
|
||||
component.onUploadSuccess(emittedData);
|
||||
expect(lastValue).toBe(node);
|
||||
});
|
||||
|
||||
it('should emit nodeUpdated event upon successful upload of a new version', () => {
|
||||
fixture.detectChanges();
|
||||
nodesApiService.nodeUpdated.subscribe((res) => {
|
||||
expect(res).toEqual(node);
|
||||
});
|
||||
|
||||
let lastValue: Node;
|
||||
nodesApiService.nodeUpdated.subscribe((res) => lastValue = res);
|
||||
|
||||
const emittedData = { value: { entry: node } };
|
||||
component.onUploadSuccess(emittedData);
|
||||
expect(lastValue).toEqual(node);
|
||||
});
|
||||
|
||||
describe('Animation', () => {
|
||||
|
||||
Reference in New Issue
Block a user