diff options
author | Yoav Schneiderman <yoav.schneiderman@intl.att.com> | 2019-12-17 22:10:31 +0200 |
---|---|---|
committer | Yoav Schneiderman <yoav.schneiderman@intl.att.com> | 2019-12-17 22:10:31 +0200 |
commit | eafbe7ef997988a6922d004703dcd35dd28bf991 (patch) | |
tree | 1a71e856cdedbfe5b0d5058962b3a411d0285ee7 /vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts | |
parent | 4bfa2df6e5735b0060a88e4661f38b955094d1a1 (diff) |
Add details in template list popup
Issue-ID: VID-730
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Change-Id: I7042e85a1e12e7d5d9a19b5cc1eb92c65ea08134
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts index 1ff0f61e2..2f044112b 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts @@ -130,4 +130,21 @@ describe('instantiation templates modal service', () => { expect(result.instanceName).toEqual('<Automatically generated>'); }); + test('filterByUserId should filter table data by userId: not empty list', () => { + const jobs : InstantiationTemplatesRowModel[] = [ + new InstantiationTemplatesRowModel({userId : 'userId_1'}), + new InstantiationTemplatesRowModel({userId : 'userId'}), + new InstantiationTemplatesRowModel({userId : 'userId'}), + new InstantiationTemplatesRowModel({userId : 'userId_1'}) + ]; + let result: InstantiationTemplatesRowModel[] = service.filterByUserId('userId', jobs); + expect(result).toHaveLength(2); + }); + + test('filterByUserId should filter table data by userId: empty list should return empty list', () => { + const jobs : InstantiationTemplatesRowModel[] = []; + let result: InstantiationTemplatesRowModel[] = service.filterByUserId('userId', jobs); + expect(result).toHaveLength(0); + }); + }); |