Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: TTL-910 fix tests
  • Loading branch information
Santiago220991 committed Aug 1, 2023
commit d777878d863863bdc09629af316051b16248bd75
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@ describe('Reports Page', () => {
const customerObj: Customer = { name: 'name' };
const projectsArray: Project[] = [
{
id: 'test_id',
id: 'projectId',
customer_id: 'customer_id',
customer: customerObj,
name: 'name',
description: 'description',
description: 'proejectDescription',
project_type_id: 'project_type_id',
status: 'active',
},
Expand All @@ -313,20 +313,20 @@ describe('Reports Page', () => {
});

it('Should populate the activities with the payload from the action executed', () => {
const actionSubject = TestBed.inject(ActionsSubject) as ActionsSubject;
const Subject = TestBed.inject(ActionsSubject) as ActionsSubject;
const activitiesArray: Activity[] = [
{
id: 'test_id',
name: 'name',
description: 'description',
id: 'activityId',
name: 'activityName',
description: 'activityDescription',
status: 'string'
},
];
const action = {
type: ActivityManagementActionTypes.LOAD_ACTIVITIES_SUCCESS,
payload: activitiesArray,
};
actionSubject.next(action);
Subject.next(action);
expect(component.activities).toEqual(activitiesArray);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ describe('Reports Page', () => {
});

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

component.ngOnChanges({
Expand Down