Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Input box > Theme service optionally provided #203

Merged
merged 7 commits into from
Sep 25, 2020

Conversation

Blackbaud-SteveBrush
Copy link
Member

@Blackbaud-SteveBrush Blackbaud-SteveBrush commented Sep 23, 2020

@blackbaud-ado
Copy link
Member

@codecov
Copy link

codecov bot commented Sep 23, 2020

Codecov Report

Merging #203 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #203   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           29        29           
  Lines          865       865           
  Branches       164       164           
=========================================
  Hits           865       865           
Impacted Files Coverage Δ
...pp/public/modules/input-box/input-box.component.ts 100.00% <100.00%> (ø)

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 391b2cc...3137d65. Read the comment docs.

@blackbaud-ado
Copy link
Member

@@ -144,26 +162,24 @@ describe('Input box component', () => {
});
});

it('should render the label and input elements in the expected locations', () => {
it('should handle SkyThemeService not provided', () => {
TestBed.overrideProvider(SkyThemeService, {

Choose a reason for hiding this comment

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

This is going to ensure that the component handles an undefined SkyThemeService, but it doesn't test the case where Angular has no provider for SkyThemeService. I think I'd maybe flip these two tests where the TestBed doesn't have SkyThemeService provided at all, but the test where we ensure providing it has the desired effect uses overrideComponent to inject SkyThemeService.

Copy link
Member Author

Choose a reason for hiding this comment

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

I had to wrap the default and modern tests in their own describe blocks and create separate TestBeds to get it to work. I also put the duplicate testing module configuration in an InputBoxFixturesModule.

@Blackbaud-SteveBrush Blackbaud-SteveBrush marked this pull request as draft September 23, 2020 16:18
@blackbaud-ado
Copy link
Member

@Blackbaud-SteveBrush Blackbaud-SteveBrush merged commit 8a95e22 into master Sep 25, 2020
@Blackbaud-SteveBrush Blackbaud-SteveBrush deleted the input-box-optional-theme-svc branch September 25, 2020 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants