mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[bugfix] Popup: ensure z-index setting order (#4026)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { mount } from '../../../test/utils';
|
||||
import { mount, later } from '../../../test/utils';
|
||||
import ActionSheet from '..';
|
||||
|
||||
test('callback events', () => {
|
||||
@@ -41,7 +41,7 @@ test('callback events', () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('click overlay and close', () => {
|
||||
test('click overlay and close', async () => {
|
||||
const onInput = jest.fn();
|
||||
const onClickOverlay = jest.fn();
|
||||
const div = document.createElement('div');
|
||||
@@ -71,6 +71,8 @@ test('click overlay and close', () => {
|
||||
}
|
||||
});
|
||||
|
||||
await later();
|
||||
|
||||
div.querySelector('.van-overlay').click();
|
||||
expect(onInput).toHaveBeenCalledWith(false);
|
||||
expect(onClickOverlay).toHaveBeenCalledTimes(1);
|
||||
|
Reference in New Issue
Block a user