From 8ca0e978975a8f70393b208ea34ba1313ef89b5c Mon Sep 17 00:00:00 2001 From: Preston Goforth Date: Mon, 25 Mar 2019 16:13:34 -0400 Subject: [PATCH 1/3] Temporary fix for `addon-cssresources` till scrollbars are properly addressed --- addons/cssresources/src/css-resource-panel.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/cssresources/src/css-resource-panel.tsx b/addons/cssresources/src/css-resource-panel.tsx index a3aaca1aaec4..0c159c31db8f 100644 --- a/addons/cssresources/src/css-resource-panel.tsx +++ b/addons/cssresources/src/css-resource-panel.tsx @@ -87,7 +87,7 @@ export class CssResourcePanel extends Component { } return ( - +
{list && list.map(({ id, code, picked }) => (
@@ -98,7 +98,7 @@ export class CssResourcePanel extends Component { {code ? {code} : null}
))} - +
); } } From d41a707a1ca4b641e72d1068432a233af4eb7fd0 Mon Sep 17 00:00:00 2001 From: Preston Goforth Date: Thu, 28 Mar 2019 15:08:08 -0400 Subject: [PATCH 2/3] Update tests --- addons/cssresources/src/css-resource-panel.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/cssresources/src/css-resource-panel.test.js b/addons/cssresources/src/css-resource-panel.test.js index 2d3353e7a1ef..347ad45e05ea 100644 --- a/addons/cssresources/src/css-resource-panel.test.js +++ b/addons/cssresources/src/css-resource-panel.test.js @@ -55,8 +55,8 @@ describe('CSSResourcePanel', () => { expect(node).toHaveState({ list: [], currentStoryId: '' }); }); - it('should not render anything', () => { - expect(node).toBeEmptyRender(); + it('should render an empty div', () => { + expect(node.matchesElement('
')).toEqual(true); }); }); From 0f9bf9c4cbea07f00b02f8c582bf70ec92018eec Mon Sep 17 00:00:00 2001 From: Preston Goforth Date: Thu, 28 Mar 2019 21:13:29 -0400 Subject: [PATCH 3/3] Update tests using html string --- addons/cssresources/src/css-resource-panel.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/cssresources/src/css-resource-panel.test.js b/addons/cssresources/src/css-resource-panel.test.js index 347ad45e05ea..7a9c71ed0b2e 100644 --- a/addons/cssresources/src/css-resource-panel.test.js +++ b/addons/cssresources/src/css-resource-panel.test.js @@ -56,7 +56,7 @@ describe('CSSResourcePanel', () => { }); it('should render an empty div', () => { - expect(node.matchesElement('
')).toEqual(true); + expect(node.html()).toEqual('
'); }); });