Skip to content

Commit d777878

Browse files
test: TTL-910 fix tests
1 parent 4c2c5f9 commit d777878

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/app/modules/reports/components/time-entries-table/time-entries-table.component.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ describe('Reports Page', () => {
295295
const customerObj: Customer = { name: 'name' };
296296
const projectsArray: Project[] = [
297297
{
298-
id: 'test_id',
298+
id: 'projectId',
299299
customer_id: 'customer_id',
300300
customer: customerObj,
301301
name: 'name',
302-
description: 'description',
302+
description: 'proejectDescription',
303303
project_type_id: 'project_type_id',
304304
status: 'active',
305305
},
@@ -313,20 +313,20 @@ describe('Reports Page', () => {
313313
});
314314

315315
it('Should populate the activities with the payload from the action executed', () => {
316-
const actionSubject = TestBed.inject(ActionsSubject) as ActionsSubject;
316+
const Subject = TestBed.inject(ActionsSubject) as ActionsSubject;
317317
const activitiesArray: Activity[] = [
318318
{
319-
id: 'test_id',
320-
name: 'name',
321-
description: 'description',
319+
id: 'activityId',
320+
name: 'activityName',
321+
description: 'activityDescription',
322322
status: 'string'
323323
},
324324
];
325325
const action = {
326326
type: ActivityManagementActionTypes.LOAD_ACTIVITIES_SUCCESS,
327327
payload: activitiesArray,
328328
};
329-
actionSubject.next(action);
329+
Subject.next(action);
330330
expect(component.activities).toEqual(activitiesArray);
331331
});
332332

src/app/modules/reports/components/time-range-form/time-range.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ describe('Reports Page', () => {
147147
});
148148

149149
it('When the ngOnChanges method is the first change, the onSubmit method is not called', () => {
150-
const userIdNotCalled = 'test-user-2';
151-
const projectIdNotCalled = 'test-project';
152-
const activityIdNotCalled = 'test-activity';
150+
const userIdNotCalled = 'test_user_id';
151+
const projectIdNotCalled = 'test-project_id';
152+
const activityIdNotCalled = 'test-activity_id';
153153
spyOn(component, 'onSubmit');
154154

155155
component.ngOnChanges({

0 commit comments

Comments
 (0)