Skip to content

Commit

Permalink
feat(VsDrawer): use v-show to render (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
seaneez authored May 31, 2024
1 parent 37d6dca commit 579c3e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/vlossom/src/components/vs-drawer/VsDrawer.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<Transition name="drawer" :duration="300">
<div
v-if="isOpen"
v-show="isOpen"
class="vs-drawer"
:style="{
...computedStyleSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('vs-drawer', () => {
});

// then
expect(wrapper.find('div.vs-dialog').exists()).toBe(false);
expect(wrapper.find('div.vs-dialog')?.isVisible()).toBe(false);
});

it('modelValue가 true이면 drawer가 열린다', async () => {
Expand All @@ -27,13 +27,11 @@ describe('vs-drawer', () => {
},
});

expect(wrapper.find('div.vs-dialog').exists()).toBe(false);

// when
await wrapper.setProps({ modelValue: true });

// then
expect(wrapper.find('div.vs-dialog').exists()).toBe(true);
expect(wrapper.find('div.vs-dialog')?.isVisible()).toBe(true);
});
});

Expand Down

0 comments on commit 579c3e0

Please sign in to comment.