Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit 9c7330b

Browse files
태재영Matt Goo
authored andcommitted
fix(top-app-bar): clientHeight unit test (#668)
1 parent c4a2a01 commit 9c7330b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/unit/top-app-bar/index.test.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,8 @@ test('#adapter.getTopAppBarHeight should return clientHeight', () => {
212212
const options = {attachTo: div};
213213
const wrapper = mount<TopAppBar>(<TopAppBar title='Hi' />, options);
214214
const topAppBarHeight = wrapper.instance().adapter.getTopAppBarHeight();
215-
// 18 is the rendered height in pixels. It won't have the actual
216-
// top app bar height since the css is not applied. 18 is the height
217-
// of the title element.
218-
assert.equal(topAppBarHeight, 18);
215+
const realDOMHeight = wrapper.getDOMNode().clientHeight;
216+
assert.equal(topAppBarHeight, realDOMHeight);
219217
div.remove();
220218
});
221219

0 commit comments

Comments
 (0)