From 231b9b5729033997d6c84587ecad29499001cb2a Mon Sep 17 00:00:00 2001 From: Alexandru Enache Date: Wed, 6 Mar 2019 15:17:36 +0200 Subject: [PATCH 1/2] fix(select): update nb-select to correctly render nb-options wrapped in ng-container --- .../theme/components/select/select.component.html | 2 +- src/framework/theme/components/select/select.spec.ts | 12 ++++++++++++ .../select/select-showcase.component.html | 1 - 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/framework/theme/components/select/select.component.html b/src/framework/theme/components/select/select.component.html index f26fa4be67..d438bf2d2a 100644 --- a/src/framework/theme/components/select/select.component.html +++ b/src/framework/theme/components/select/select.component.html @@ -28,6 +28,6 @@ - + diff --git a/src/framework/theme/components/select/select.spec.ts b/src/framework/theme/components/select/select.spec.ts index ad746c4018..32469e5f28 100644 --- a/src/framework/theme/components/select/select.spec.ts +++ b/src/framework/theme/components/select/select.spec.ts @@ -61,6 +61,9 @@ const TEST_GROUPS = [ {{ option.title }} + + ng-container option + @@ -221,4 +224,13 @@ describe('Component: NbSelectComponent', () => { expect(button.textContent).toContain('1 noitpO'); }) }); + + fit('should render option wrapped in ng-container', () => { + select.multiple = true; + setSelectedAndOpen([]); + + const options = overlayContainer.querySelectorAll('nb-option'); + const lastOption = options[options.length - 1]; + expect(lastOption.textContent).toEqual('ng-container option'); + }); }); diff --git a/src/playground/with-layout/select/select-showcase.component.html b/src/playground/with-layout/select/select-showcase.component.html index bdae8073a7..6f325edd6f 100644 --- a/src/playground/with-layout/select/select-showcase.component.html +++ b/src/playground/with-layout/select/select-showcase.component.html @@ -4,4 +4,3 @@ Option 3 Option 4 - From e31884cdbda54379c54f019c6aa3475e5dd10cb9 Mon Sep 17 00:00:00 2001 From: Alexandru Enache Date: Wed, 6 Mar 2019 15:19:00 +0200 Subject: [PATCH 2/2] removed incorrect usage of fit --- src/framework/theme/components/select/select.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/theme/components/select/select.spec.ts b/src/framework/theme/components/select/select.spec.ts index 32469e5f28..c248ababea 100644 --- a/src/framework/theme/components/select/select.spec.ts +++ b/src/framework/theme/components/select/select.spec.ts @@ -225,7 +225,7 @@ describe('Component: NbSelectComponent', () => { }) }); - fit('should render option wrapped in ng-container', () => { + it('should render option wrapped in ng-container', () => { select.multiple = true; setSelectedAndOpen([]);