From 9c7330b3e8a83bbae6e00646966a4be9d62ccd79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=83=9C=EC=9E=AC=EC=98=81?= Date: Wed, 13 Feb 2019 08:06:53 +0900 Subject: [PATCH] fix(top-app-bar): clientHeight unit test (#668) --- test/unit/top-app-bar/index.test.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/unit/top-app-bar/index.test.tsx b/test/unit/top-app-bar/index.test.tsx index ea8d94c30..1c15d940d 100644 --- a/test/unit/top-app-bar/index.test.tsx +++ b/test/unit/top-app-bar/index.test.tsx @@ -212,10 +212,8 @@ test('#adapter.getTopAppBarHeight should return clientHeight', () => { const options = {attachTo: div}; const wrapper = mount(, options); const topAppBarHeight = wrapper.instance().adapter.getTopAppBarHeight(); - // 18 is the rendered height in pixels. It won't have the actual - // top app bar height since the css is not applied. 18 is the height - // of the title element. - assert.equal(topAppBarHeight, 18); + const realDOMHeight = wrapper.getDOMNode().clientHeight; + assert.equal(topAppBarHeight, realDOMHeight); div.remove(); });