Skip to content

Conversation

daros10
Copy link
Contributor

@daros10 daros10 commented Mar 31, 2020

Este PR remplaza al anterior ya que hubo conflictos con la nueva estructura.
Se ha añadido el buscador tanto en Time Clock y Projects.
Se ha usado el servicio ProjectService para poblar la lista de proyectos activos en la vista de Time Clock.

component.changeFilterProject.emit('angular');
component.filterProject = 'angular';
component.changeFilterValue();
expect(component.filterProject).toEqual('angular');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is not a good test because you are assigning the value in the variable and after you wait that your expect has that value.
You should test that emit has been called, you can is that example in project-list test.

});

it('test method of pipe', () => {
expect(new FilterProjectPipe().transform([], '')).toEqual([]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

improve the test, you can create a mock with projects data and test the transform method.

{
"id": 3,
"name": "Facebook",
"details": "It's a good app to play Lottery",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the detail, please :)

"@angular-devkit/build-angular": "^0.900.5",
"@angular/cli": "~9.0.4",
"@angular-devkit/build-angular": "^0.901.0",
"@angular/cli": "^9.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong.

@daros10 daros10 closed this Apr 2, 2020
@enriquezrene enriquezrene deleted the TimeClock-FindProject#3 branch April 9, 2020 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants