-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(accordion): added Card Bootstrap Color Options #431
Conversation
@@ -271,15 +272,34 @@ describe('ngb-accordion', () => { | |||
expectOpenPanels(fixture.nativeElement, [false, false, false]); | |||
}); | |||
}))); | |||
|
|||
it('should override the type in accordion with type in panel', async(inject([TestComponentBuilder], (tcb) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very light on tests.... We need some more:
- what happens if no type is specified? (No binding to
[type]
on accordion / panel)? - what happens if type is specified only on accordion level and no panel has type?
I know that those might sound like trivial cases but we need to have them covered.
BTW: you don't have to re-use the same html in each and every test, feel free to have test-specific markup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW: you don't have to re-use the same html in each and every test, feel free to have test-specific markup.
you caught me here. I will update now.
e11878b
to
3e915c8
Compare
@@ -88,7 +95,8 @@ export interface NgbPanelChangeEvent { | |||
</div> | |||
` | |||
}) | |||
export class NgbAccordion implements AfterContentChecked { | |||
export class NgbAccordion implements AfterContentChecked, | |||
OnInit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have OnInit
imported and used in implements
here? I don't see it being used (I would expect TS to complain in this case...)
3e915c8
to
9ec4994
Compare
let el = fixture.nativeElement.querySelectorAll('.card-header'); | ||
expect(el[0]).toHaveCssClass('card-primary'); | ||
expect(el[1]).toHaveCssClass('card-primary'); | ||
expect(el[2]).toHaveCssClass('card-primary'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct! We shouldn't get any class other than card-header
(and eventually active
) by default. Run the demo and see how it looks....
feat(accordion): updates as per comments feat(accordion): changed default into primary feat(accordion): removed ngOnInit feat(accordion): removed default type
a498726
to
8433a08
Compare
Before submitting a pull request, please make sure you have at least performed the following:
fixes #420