Skip to content

Conversation

kevinjlope
Copy link
Contributor

This time, there is not any problem, but the objective is to disable buttons futures of component month picker, in this component added the method monthEnable. Also, disable input date futures of the dashboard of the reports, in this component added the method getCurrentDate.
Finally added two Unit testing of the method monthEnable, because this method disables buttons futures(Months futures) and enables buttons present or past(Months past/present).

…-date futures in reports, test of method monthEnable
…-date futures in reports, test of method monthEnable
@scastillo-jp scastillo-jp force-pushed the TT-262-No-select-future-dates-in-the-page-Reports branch from 3d930d5 to c9423a8 Compare June 11, 2021 16:52
@codecov
Copy link

codecov bot commented Jun 11, 2021

Codecov Report

Merging #697 (ef05e06) into master (13de42e) will increase coverage by 0.98%.
The diff coverage is 93.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #697      +/-   ##
==========================================
+ Coverage   93.09%   94.07%   +0.98%     
==========================================
  Files          85      104      +19     
  Lines        1564     2094     +530     
  Branches      107      155      +48     
==========================================
+ Hits         1456     1970     +514     
- Misses         67       81      +14     
- Partials       41       43       +2     
Impacted Files Coverage Δ
...nents/time-range-form/time-range-form.component.ts 100.00% <ø> (ø)
...er-management/store/customer-management.effects.ts 83.78% <14.28%> (-16.22%) ⬇️
.../components/project-list/project-list.component.ts 65.78% <52.17%> (-18.43%) ⬇️
...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%) ⬇️
src/app/modules/user/services/user-info.service.ts 66.66% <66.66%> (ø)
src/app/modules/user/services/user.service.ts 75.00% <75.00%> (ø)
...es-management/store/activity-management.effects.ts 94.59% <83.33%> (-5.41%) ⬇️
...dules/time-entries/pages/time-entries.component.ts 85.88% <85.29%> (+3.06%) ⬆️
... 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 61a7a35...ef05e06. Read the comment docs.

.gitignore Outdated
@@ -44,6 +44,7 @@ testem.log
keys.ts
src/environments/keys.ts
debug.log
/.vscode
Copy link
Collaborator

Choose a reason for hiding this comment

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

In this part you can use *.vscode

@@ -69,4 +68,14 @@ describe('MonthPickerComponent', () => {
expect(component.selectDate).toHaveBeenCalledWith(monthSelect, yearSelect);
});

it('monthEnable set disable true in the buttoms futures', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

replace this name:
monthEnable sets disabled to true on futures months

expect(component.monthEnable(monthFuture)).toBeTrue();
});

it('monthEnable set disable false in the buttoms presents and past', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this description is not very clear:

I Understand this.
monthEnable set disabled to false in the months presents and past

I Think is no necessary disable the past months only future months

…f github.com:ioet/time-tracker-ui into TT-262-No-select-future-dates-in-the-page-Reports
@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 1add612 into master Jun 14, 2021
@kevinjlope kevinjlope deleted the TT-262-No-select-future-dates-in-the-page-Reports branch June 14, 2021 15:47
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