Skip to content

Conversation

kevinjlope
Copy link
Contributor

In this PR, I added some unit testing in the methods that were not tested, and I removed the unit testing that was unnecessary in the project.

@codecov
Copy link

codecov bot commented Jun 22, 2021

Codecov Report

Merging #699 (3bbd8ba) into master (13de42e) will increase coverage by 2.21%.
The diff coverage is 96.97%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #699      +/-   ##
==========================================
+ Coverage   93.09%   95.30%   +2.21%     
==========================================
  Files          85      104      +19     
  Lines        1564     2089     +525     
  Branches      107      155      +48     
==========================================
+ Hits         1456     1991     +535     
+ Misses         67       56      -11     
- Partials       41       42       +1     
Impacted Files Coverage Δ
...nents/time-range-form/time-range-form.component.ts 100.00% <ø> (ø)
...time-entries-table/time-entries-table.component.ts 61.90% <60.00%> (+6.34%) ⬆️
src/app/modules/user/store/user.reducer.ts 62.50% <62.50%> (ø)
...ared/components/input-date/input-date.component.ts 66.66% <66.66%> (-2.57%) ⬇️
...dules/time-entries/pages/time-entries.component.ts 84.88% <82.85%> (+2.07%) ⬆️
...toggles/filters/feature-filter-provider.service.ts 93.33% <87.50%> (+15.55%) ⬆️
...project-list-hover/project-list-hover.component.ts 89.36% <90.00%> (+0.98%) ⬆️
.../components/project-list/project-list.component.ts 96.77% <93.75%> (+12.56%) ⬆️
src/app/modules/users/store/user.reducers.ts 94.73% <94.73%> (ø)
...ponents/details-fields/details-fields.component.ts 95.79% <95.58%> (+8.61%) ⬆️
... and 80 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf6e893...3bbd8ba. Read the comment docs.

@scastillo-jp
Copy link
Collaborator

@mrkevinomar in my localist host using your branch I have problems with the test:
should preload data of last entry when a project is selected while creating new entry
Error: Expected $.start_date = Date(Tue Jun 29 2021 14:16:46 GMT-0500 (Ecuador Time)) to equal Date(Tue Jun 29 2021 14:16:46 GMT-0500 (Ecuador Time)).

component.ngOnDestroy();

expect(subscription).toHaveBeenCalledTimes(1);

Copy link
Collaborator

Choose a reason for hiding this comment

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

dete this line white

component.ngOnDestroy();

expect(subscriptionProjectTypes).toHaveBeenCalledTimes(1);

Copy link
Collaborator

Choose a reason for hiding this comment

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

delete this line white

@@ -136,6 +144,7 @@ describe('ProjectListComponent', () => {
spyOn(component, 'openModal');
component.switchStatus(itemData);
expect(component.openModal).toHaveBeenCalled();

Copy link
Collaborator

Choose a reason for hiding this comment

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

delete this line white

import { UserService } from './user.service';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';


Copy link
Collaborator

Choose a reason for hiding this comment

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

delete this line-white

@scastillo-jp scastillo-jp self-requested a review June 29, 2021 19:20
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@kevinjlope kevinjlope merged commit 8b5068a into master Jul 1, 2021
@kevinjlope kevinjlope deleted the TT-264-UI-Test-Coverage branch July 1, 2021 18:16
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.

3 participants