Skip to content

Commit eb677be

Browse files
committed
fix: TT-41 review and small change/correction of test
1 parent 287a5aa commit eb677be

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/app/modules/customer-management/components/projects/components/project-list/project-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<tr class="d-flex" *ngFor="let project of projects">
1515
<td class="col-sm-3">{{ project.id }}</td>
1616
<td class="col-sm-3">{{ project.name }}</td>
17-
<td class="col-sm-2">{{ project.technologies }}</td>
17+
<td class="col-sm-2">{{ project.technologies ? project.technologies.toString() : ""}}</td>
1818
<td class="col-sm-2">{{ getProjectTypeName(project.project_type_id) }}</td>
1919
<td class="col-sm-1 text-center">
2020
<button type="button" class="btn btn-sm btn-primary" (click)="updateProject(project)">

src/app/modules/customer-management/components/projects/components/project-list/project-list.component.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('ProjectListComponent', () => {
1818
let getCustomerProjectsSelectorMock;
1919
let allCustomerProjectsSelectorMock;
2020

21-
const project = { id: '123', name: 'aaa', description: 'xxx', project_type_id: '1234', status: 'inactive' };
21+
const project = { id: '123', name: 'aaa', description: 'xxx', project_type_id: '1234', technologies: ['python', 'angular'], status: 'inactive' };
2222

2323
const state: ProjectState = {
2424
projects: [project],
@@ -124,6 +124,7 @@ describe('ProjectListComponent', () => {
124124
name: 'aaa',
125125
description: 'xxx',
126126
project_type_id: '1234',
127+
technologies: ['python', 'angular'],
127128
status: 'activate',
128129
key: 'activate',
129130
_status: false,
@@ -143,6 +144,7 @@ describe('ProjectListComponent', () => {
143144
name: 'aaa',
144145
description: 'xxx',
145146
project_type_id: '1234',
147+
technologies: ['python', 'angular'],
146148
status: 'inactive',
147149
key: 'inactive',
148150
_status: true,
@@ -186,10 +188,10 @@ describe('ProjectListComponent', () => {
186188
expect(tableRows.length).toBe(2);
187189

188190
const headerRow = tableRows[0];
189-
expect(headerRow.cells[2].innerHTML).toBe('Project Type');
191+
expect(headerRow.cells[3].innerHTML).toBe('Project Type');
190192

191193
const dataRow = tableRows[1];
192-
expect(dataRow.cells[2].innerHTML).toBe('BK');
194+
expect(dataRow.cells[3].innerHTML).toBe('BK');
193195

194196
done();
195197
});

src/app/modules/customer-management/components/projects/components/project-list/project-list.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import * as actions from '../store/project.actions';
88
import { ProjectUI } from '../../../../../shared/models/project.model';
99
import { allProjectTypes, ProjectTypeState } from '../../../projects-type/store';
1010
import { ProjectType } from 'src/app/modules/shared/models';
11+
import { runInThisContext } from 'vm';
1112

1213
@Component({
1314
selector: 'app-project-list',

0 commit comments

Comments
 (0)