From 8f190da13bc2ed11841dfeb60d9435c58f1adacf Mon Sep 17 00:00:00 2001 From: Dennis Kortsch Date: Wed, 13 Jun 2018 13:49:33 +0200 Subject: [PATCH 1/2] wrap children with .results --- src/modules/Search/SearchCategory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/Search/SearchCategory.js b/src/modules/Search/SearchCategory.js index f56d3e4f15..dcf27decb4 100644 --- a/src/modules/Search/SearchCategory.js +++ b/src/modules/Search/SearchCategory.js @@ -19,7 +19,7 @@ function SearchCategory(props) { return (
{renderer(props)}
- {childrenUtils.isNil(children) ? content : children} +
{childrenUtils.isNil(children) ? content : children}
) } From 7ccb23b7cfefb68b18af9f318a08a2e3b8588af2 Mon Sep 17 00:00:00 2001 From: Alexander Fedyashov Date: Thu, 14 Jun 2018 12:26:29 +0300 Subject: [PATCH 2/2] test(Search): add more tests --- test/specs/modules/Search/SearchCategory-test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/specs/modules/Search/SearchCategory-test.js b/test/specs/modules/Search/SearchCategory-test.js index 7060fdd471..129f1c634a 100644 --- a/test/specs/modules/Search/SearchCategory-test.js +++ b/test/specs/modules/Search/SearchCategory-test.js @@ -1,7 +1,23 @@ +import React from 'react' + import SearchCategory from 'src/modules/Search/SearchCategory' import * as common from 'test/specs/commonTests' describe('SearchCategory', () => { common.isConformant(SearchCategory) common.rendersChildren(SearchCategory) + + describe('children', () => { + it('should be a child with a "name" className', () => { + shallow() + .childAt(0) + .should.have.className('name') + }) + + it('should be wrapped with a "results" className', () => { + shallow() + .childAt(1) + .should.have.className('results') + }) + }) })