Skip to content
Closed
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
fix: TT-41 review and small change/correction of test
  • Loading branch information
kevinjlope committed May 24, 2021
commit eb677be7f654cc23d8d40ede5d1203e7bb3cd752
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<tr class="d-flex" *ngFor="let project of projects">
<td class="col-sm-3">{{ project.id }}</td>
<td class="col-sm-3">{{ project.name }}</td>
<td class="col-sm-2">{{ project.technologies }}</td>
<td class="col-sm-2">{{ project.technologies ? project.technologies.toString() : ""}}</td>
<td class="col-sm-2">{{ getProjectTypeName(project.project_type_id) }}</td>
<td class="col-sm-1 text-center">
<button type="button" class="btn btn-sm btn-primary" (click)="updateProject(project)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('ProjectListComponent', () => {
let getCustomerProjectsSelectorMock;
let allCustomerProjectsSelectorMock;

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

const state: ProjectState = {
projects: [project],
Expand Down Expand Up @@ -124,6 +124,7 @@ describe('ProjectListComponent', () => {
name: 'aaa',
description: 'xxx',
project_type_id: '1234',
technologies: ['python', 'angular'],
status: 'activate',
key: 'activate',
_status: false,
Expand All @@ -143,6 +144,7 @@ describe('ProjectListComponent', () => {
name: 'aaa',
description: 'xxx',
project_type_id: '1234',
technologies: ['python', 'angular'],
status: 'inactive',
key: 'inactive',
_status: true,
Expand Down Expand Up @@ -186,10 +188,10 @@ describe('ProjectListComponent', () => {
expect(tableRows.length).toBe(2);

const headerRow = tableRows[0];
expect(headerRow.cells[2].innerHTML).toBe('Project Type');
expect(headerRow.cells[3].innerHTML).toBe('Project Type');

const dataRow = tableRows[1];
expect(dataRow.cells[2].innerHTML).toBe('BK');
expect(dataRow.cells[3].innerHTML).toBe('BK');

done();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as actions from '../store/project.actions';
import { ProjectUI } from '../../../../../shared/models/project.model';
import { allProjectTypes, ProjectTypeState } from '../../../projects-type/store';
import { ProjectType } from 'src/app/modules/shared/models';
import { runInThisContext } from 'vm';

@Component({
selector: 'app-project-list',
Expand Down