mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1853: feat(return-process): add getReceiptItemQuantity helper and related tests
feat(return-process): add getReceiptItemQuantity helper and related tests Ref: #5156
This commit is contained in:
committed by
Nino Righi
parent
a37201ef33
commit
61ce9940c9
@@ -1,4 +1,8 @@
|
||||
import { createComponentFactory, Spectator, mockProvider } from '@ngneat/spectator/jest';
|
||||
import {
|
||||
createComponentFactory,
|
||||
Spectator,
|
||||
mockProvider,
|
||||
} from '@ngneat/spectator/jest';
|
||||
import { FilterActionsComponent } from './filter-actions.component';
|
||||
import { FilterService } from '../core';
|
||||
|
||||
@@ -13,7 +17,6 @@ describe('FilterActionsComponent', () => {
|
||||
{ group: 'other', key: 'key2' },
|
||||
]),
|
||||
commit: jest.fn(),
|
||||
commitInput: jest.fn(),
|
||||
reset: jest.fn(),
|
||||
resetInput: jest.fn(),
|
||||
}),
|
||||
@@ -51,7 +54,7 @@ describe('FilterActionsComponent', () => {
|
||||
spectator.setInput('inputKey', 'key1');
|
||||
spectator.component.onApply();
|
||||
|
||||
expect(filterService.commitInput).toHaveBeenCalledWith('key1');
|
||||
expect(filterService.commit).toHaveBeenCalled();
|
||||
expect(appliedSpy).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -74,7 +77,7 @@ describe('FilterActionsComponent', () => {
|
||||
spectator.setInput('inputKey', 'key1');
|
||||
spectator.component.onReset();
|
||||
|
||||
expect(filterService.resetInput).toHaveBeenCalledWith('key1');
|
||||
expect(filterService.resetInput).toHaveBeenCalledWith(['key1']);
|
||||
expect(filterService.commit).toHaveBeenCalled();
|
||||
expect(resetedSpy).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user