Fix widget test (#9565)
This commit is contained in:
parent
0f31a0548c
commit
9ee1b5f30a
|
@ -37,7 +37,7 @@ describe('After user signed in', () => {
|
||||||
it(`${widgetName} widget should get added`, () => {
|
it(`${widgetName} widget should get added`, () => {
|
||||||
cy.get('.mk-widget-edit').click();
|
cy.get('.mk-widget-edit').click();
|
||||||
cy.get('.mk-widget-select select').select(widgetName, { force: true });
|
cy.get('.mk-widget-select select').select(widgetName, { force: true });
|
||||||
cy.get('.bg._modalBg.transparent').click({ multiple: true, force: true });
|
cy.get('.data-cy-bg._modalBg.data-cy-transparent').click({ multiple: true, force: true });
|
||||||
cy.get('.mk-widget-add').click({ force: true });
|
cy.get('.mk-widget-add').click({ force: true });
|
||||||
cy.get(`.mkw-${widgetName}`).should('exist');
|
cy.get(`.mkw-${widgetName}`).should('exist');
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
:duration="transitionDuration" appear @after-leave="emit('closed')" @enter="emit('opening')" @after-enter="onOpened"
|
:duration="transitionDuration" appear @after-leave="emit('closed')" @enter="emit('opening')" @after-enter="onOpened"
|
||||||
>
|
>
|
||||||
<div v-show="manualShowing != null ? manualShowing : showing" v-hotkey.global="keymap" :class="[$style.root, { [$style.drawer]: type === 'drawer', [$style.dialog]: type === 'dialog', [$style.popup]: type === 'popup' }]" :style="{ zIndex, pointerEvents: (manualShowing != null ? manualShowing : showing) ? 'auto' : 'none', '--transformOrigin': transformOrigin }">
|
<div v-show="manualShowing != null ? manualShowing : showing" v-hotkey.global="keymap" :class="[$style.root, { [$style.drawer]: type === 'drawer', [$style.dialog]: type === 'dialog', [$style.popup]: type === 'popup' }]" :style="{ zIndex, pointerEvents: (manualShowing != null ? manualShowing : showing) ? 'auto' : 'none', '--transformOrigin': transformOrigin }">
|
||||||
<div class="_modalBg" :class="[$style.bg, { [$style.bgTransparent]: transparentBg && (type === 'popup') }]" :style="{ zIndex }" @click="onBgClick" @mousedown="onBgClick" @contextmenu.prevent.stop="() => {}"></div>
|
<div class="_modalBg data-cy-bg" :class="[$style.bg, { [$style.bgTransparent]: isEnableBgTransparent, 'data-cy-transparent': isEnableBgTransparent }]" :style="{ zIndex }" @click="onBgClick" @mousedown="onBgClick" @contextmenu.prevent.stop="() => {}"></div>
|
||||||
<div ref="content" :class="[$style.content, { [$style.fixed]: fixed }]" :style="{ zIndex }" @click.self="onBgClick">
|
<div ref="content" :class="[$style.content, { [$style.fixed]: fixed }]" :style="{ zIndex }" @click.self="onBgClick">
|
||||||
<slot :max-height="maxHeight" :type="type"></slot>
|
<slot :max-height="maxHeight" :type="type"></slot>
|
||||||
</div>
|
</div>
|
||||||
|
@ -82,6 +82,7 @@ const type = $computed<ModalTypes>(() => {
|
||||||
return props.preferType!;
|
return props.preferType!;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const isEnableBgTransparent = props.transparentBg && (type === 'popup');
|
||||||
let transitionName = $computed((() =>
|
let transitionName = $computed((() =>
|
||||||
defaultStore.state.animation
|
defaultStore.state.animation
|
||||||
? useSendAnime
|
? useSendAnime
|
||||||
|
@ -271,7 +272,7 @@ onMounted(() => {
|
||||||
fixed = (type === 'drawer') || (getFixedContainer(props.src) != null);
|
fixed = (type === 'drawer') || (getFixedContainer(props.src) != null);
|
||||||
|
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
|
||||||
align();
|
align();
|
||||||
}, { immediate: true });
|
}, { immediate: true });
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue