Commit 2e474792 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'jswain_whats_new_backdrop' into 'master'

clicking backdrop closes modal for What's New

See merge request gitlab-org/gitlab!61420
parents 3f75c17e e908ab6e
......@@ -88,6 +88,6 @@ export default {
<skeleton-loader />
</div>
</gl-drawer>
<div v-if="open" class="whats-new-modal-backdrop modal-backdrop"></div>
<div v-if="open" class="whats-new-modal-backdrop modal-backdrop" @click="closeDrawer"></div>
</div>
</template>
---
title: clicking backdrop closes modal for What's New
merge_request: 61420
author:
type: changed
......@@ -82,6 +82,7 @@ describe('App', () => {
});
const getDrawer = () => wrapper.find(GlDrawer);
const getBackdrop = () => wrapper.find('.whats-new-modal-backdrop');
it('contains a drawer', () => {
expect(getDrawer().exists()).toBe(true);
......@@ -100,6 +101,11 @@ describe('App', () => {
expect(actions.closeDrawer).toHaveBeenCalled();
});
it('dispatches closeDrawer when clicking the backdrop', () => {
getBackdrop().trigger('click');
expect(actions.closeDrawer).toHaveBeenCalled();
});
it.each([true, false])('passes open property', async (openState) => {
wrapper.vm.$store.state.open = openState;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment