refactor(Popup): create overlay for every popup (#6357)

This commit is contained in:
neverland
2020-05-24 16:24:20 +08:00
committed by GitHub
parent 6a2a0cc5c6
commit c5c2e9690d
5 changed files with 61 additions and 83 deletions
+4 -2
View File
@@ -224,12 +224,14 @@ test('toggle method', async (done) => {
// show
this.$refs.item.toggle(true, { immediate: true });
await later();
expect(wrapper).toMatchSnapshot();
const content = wrapper.find('.van-dropdown-item__content');
expect(content.element.style.display).toEqual('');
// hide
this.$refs.item.toggle(false, { immediate: true });
await later();
expect(wrapper).toMatchSnapshot();
expect(content.element.style.display).toEqual('none');
done();
},