-
Notifications
You must be signed in to change notification settings - Fork 4
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(modal): handle Observable values for modal/sidepanel labels #1855
Conversation
e13fbd7
to
f1df1d5
Compare
@@ -13,7 +12,7 @@ import { LU_MODAL_CONFIG, LU_MODAL_REF_FACTORY, LU_MODAL_TRANSLATIONS } from './ | |||
import { luModalTranslations } from './modal.translate'; | |||
|
|||
@NgModule({ | |||
imports: [OverlayModule, PortalModule, CommonModule, A11yModule, LuTooltipModule], |
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.
1 de moins ! 🎉
let fixture: ComponentFixture<ModalOpenerComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ |
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.
Hmm y a spectator sur lf normalement si tu veux moins t'embêter (cc @mathieu-bellange). Y a d'autres specs pour avoir des exemples d'utilisation
f1df1d5
to
137fd46
Compare
|
||
function openModal<T>(type: Type<T>): T { | ||
spectator.component.modal.open(type); | ||
return spectator.debugElement.parent.query(By.directive(type)).componentInstance as T; |
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.
@mathieu-bellange In a perfect world, I would have done:
spectator.query(type, { root: true })
But the root
option only exists for string selectors.
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.
Waiting for a release of Spectator with this PR 😃
Description
Components opened with LuModal/LuSidepanel can provide an Observable value for
title
/submitLabel
/cancelLabel
.