From 06c3642f589166bfd3471e6a056c3a02e6a3a10d Mon Sep 17 00:00:00 2001 From: crisnicandrei <62384997+crisnicandrei@users.noreply.github.com> Date: Tue, 6 Feb 2024 00:04:47 +0200 Subject: [PATCH] changed test names --- .../shared/services/profile/profile.service.spec.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/shared/services/profile/profile.service.spec.ts b/src/app/shared/services/profile/profile.service.spec.ts index 6ec170777..8803ffa80 100644 --- a/src/app/shared/services/profile/profile.service.spec.ts +++ b/src/app/shared/services/profile/profile.service.spec.ts @@ -76,7 +76,7 @@ describe('ProfileService', () => { expect(instance).toBeTruthy(); }); - it('should return the correct completion value', async () => { + it('should return the correct completion value when not all the fields have a value', async () => { const mockDictionary = { birth_info: [ { @@ -86,8 +86,7 @@ describe('ProfileService', () => { ], description: [ { - textData1: - 'Description descripoton Description descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDes', + textData1: 'Description', }, ], email: [ @@ -131,7 +130,7 @@ describe('ProfileService', () => { expect(progress).toBe(0.8); }); - it('should return the correct completion value', async () => { + it('should 1 when at least one of each profile category has a value', async () => { const mockDictionary = { birth_info: [ { @@ -141,8 +140,7 @@ describe('ProfileService', () => { ], description: [ { - textData1: - 'Description descripoton Description descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDes', + textData1: 'Description', }, ], email: [ @@ -187,7 +185,7 @@ describe('ProfileService', () => { expect(progress).toBe(1); }); - it('should return the correct completion value', async () => { + it('should return 0 when no fields have any values', async () => { const mockDictionary = {}; const { instance } = await shallow.createService(); (instance as any).profileItemDictionary = mockDictionary;