Skip to content

Commit

Permalink
[ACS-5645] updated the unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
AnukritiGL committed Dec 13, 2023
1 parent 1665d74 commit 260e8c3
Showing 1 changed file with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ describe('DetailsComponent', () => {
expect(component.nodeIcon).toContain(expectedIcon);
});

it('should set aspectActions from extensions', () => {
it('should set aspectActions from extension mock', () => {
const extensionMock = {
getAllowedSidebarActions: () =>
of([
Expand All @@ -184,15 +184,20 @@ describe('DetailsComponent', () => {

extensionsServiceMock.getAllowedSidebarActions.and.returnValue(of(extensionMock));
fixture.detectChanges();
void fixture.whenStable().then(() => {
expect(component.aspectActions).toEqual([
{
id: 'app.sidebar.close',
order: 100,
title: 'close',
icon: 'highlight_off'
} as ContentActionRef
]);
});
fixture
.whenStable()
.then(() => {
expect(component.aspectActions).toEqual([
{
id: 'app.sidebar.close',
order: 100,
title: 'close',
icon: 'highlight_off'
} as ContentActionRef
]);
})
.catch((error) => {
fail(`An error occurred: ${error}`);
});
});
});

0 comments on commit 260e8c3

Please sign in to comment.