-
Notifications
You must be signed in to change notification settings - Fork 1
TT-106 exponential growth UI #637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b110353
fix: TT-106 Syntax correction in the ProjectListHover, EntryFields, T…
VanessaIniguezG 480f033
refactor: TT-106 Use the exponentialGrowth flag to destroy unnecessar…
VanessaIniguezG 1d9395a
refactor: TT-106 Change of variables and call of the feature toggle i…
VanessaIniguezG 6146572
refactor: TT-106 Delete exponentialGrowth variable in the TimeClock, …
VanessaIniguezG 38d25bf
refactor: TT-106 New tests for the ProjectListHover component to ver…
VanessaIniguezG b0c9e78
refactor: TT-106 Use the ngOnDestroy to destroy subscriptions running…
VanessaIniguezG 6e889eb
refactor: TT-106 Delete unnecessary imports
VanessaIniguezG 40db859
fix: TT-106 Syntax correction in the ProjectListHover, EntryFields, T…
VanessaIniguezG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
fix: TT-106 Syntax correction in the ProjectListHover, EntryFields, T…
…imeClock components and test files
- Loading branch information
commit b11035362aefd6d13ea81ae13ae821759135bb5f
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { of } from 'rxjs'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Check if is using of?
VanessaIniguez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import { FormBuilder } from '@angular/forms'; | ||
import { StopTimeEntryRunning, EntryActionTypes, LoadEntriesSummary } from './../store/entry.actions'; | ||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
@@ -11,12 +12,14 @@ import { AzureAdB2CService } from '../../login/services/azure.ad.b2c.service'; | |
import { ActionsSubject } from '@ngrx/store'; | ||
import { EntryFieldsComponent } from '../components/entry-fields/entry-fields.component'; | ||
import { ToastrService } from 'ngx-toastr'; | ||
import { FeatureManagerService } from 'src/app/modules/shared/feature-toggles/feature-toggle-manager.service'; | ||
|
||
describe('TimeClockComponent', () => { | ||
let component: TimeClockComponent; | ||
let fixture: ComponentFixture<TimeClockComponent>; | ||
let store: MockStore<ProjectState>; | ||
let azureAdB2CService: AzureAdB2CService; | ||
let featureManagerService: FeatureManagerService; | ||
const actionSub: ActionsSubject = new ActionsSubject(); | ||
|
||
let injectedToastrService; | ||
|
@@ -69,6 +72,7 @@ describe('TimeClockComponent', () => { | |
fixture.detectChanges(); | ||
azureAdB2CService = TestBed.inject(AzureAdB2CService); | ||
injectedToastrService = TestBed.inject(ToastrService); | ||
featureManagerService = TestBed.inject(FeatureManagerService); | ||
}); | ||
|
||
it('should be created', () => { | ||
|
@@ -142,4 +146,14 @@ describe('TimeClockComponent', () => { | |
|
||
expect(injectedToastrService.error).toHaveBeenCalled(); | ||
}); | ||
|
||
const exponentialGrowth = [true, false]; | ||
exponentialGrowth.map((toggleValue) => { | ||
it(`when FeatureToggle is ${toggleValue} should return true`, () => { | ||
spyOn(featureManagerService, 'isToggleEnabled').and.returnValue(of(toggleValue)); | ||
const isFeatureToggleActivated: Promise<boolean> = component.isFeatureToggleActivated(); | ||
expect(featureManagerService.isToggleEnabled).toHaveBeenCalled(); | ||
isFeatureToggleActivated.then((value) => expect(value).toEqual(toggleValue)); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.