feat(Tabbar): add placeholder prop (#5979)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`placeholder prop 1`] = `
|
||||
<div class="van-nav-bar__placeholder" style="height: 0px;">
|
||||
<div class="van-nav-bar__placeholder" style="height: 50px;">
|
||||
<div class="van-nav-bar van-nav-bar--fixed van-hairline--bottom">
|
||||
<div class="van-nav-bar__left"></div>
|
||||
<div class="van-nav-bar__title van-ellipsis"></div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import NavBar from '..';
|
||||
import { mount } from '../../../test';
|
||||
import { mount, mockGetBoundingClientRect } from '../../../test';
|
||||
|
||||
test('render left & right slot', () => {
|
||||
const wrapper = mount(NavBar, {
|
||||
@@ -23,6 +23,8 @@ test('render title slot', () => {
|
||||
});
|
||||
|
||||
test('placeholder prop', () => {
|
||||
const restore = mockGetBoundingClientRect({ height: 50 });
|
||||
|
||||
const wrapper = mount(NavBar, {
|
||||
propsData: {
|
||||
fixed: true,
|
||||
@@ -31,6 +33,8 @@ test('placeholder prop', () => {
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
|
||||
restore();
|
||||
});
|
||||
|
||||
test('click-left event', () => {
|
||||
|
||||
Reference in New Issue
Block a user