diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-24 00:08:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-24 00:08:33 +0300 |
commit | 87e9d9675af5df4c703c502b79567baea24f5395 (patch) | |
tree | 09e2f7fa5332f3ad8011d7f610c61dd90408067d /spec/frontend/boards/components | |
parent | d04f2be14dc23606353acf9b1bbc6326e40d7f4b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards/components')
-rw-r--r-- | spec/frontend/boards/components/board_content_sidebar_spec.js | 9 | ||||
-rw-r--r-- | spec/frontend/boards/components/board_settings_sidebar_spec.js | 11 |
2 files changed, 20 insertions, 0 deletions
diff --git a/spec/frontend/boards/components/board_content_sidebar_spec.js b/spec/frontend/boards/components/board_content_sidebar_spec.js index 10d739c65f5..614aa69e827 100644 --- a/spec/frontend/boards/components/board_content_sidebar_spec.js +++ b/spec/frontend/boards/components/board_content_sidebar_spec.js @@ -1,5 +1,6 @@ import { GlDrawer } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; +import { MountingPortal } from 'portal-vue'; import Vuex from 'vuex'; import SidebarDropdownWidget from 'ee_else_ce/sidebar/components/sidebar_dropdown_widget.vue'; import { stubComponent } from 'helpers/stub_component'; @@ -90,6 +91,14 @@ describe('BoardContentSidebar', () => { expect(wrapper.findComponent(GlDrawer).exists()).toBe(true); }); + it('confirms we render MountingPortal', () => { + expect(wrapper.find(MountingPortal).props()).toMatchObject({ + mountTo: '#js-right-sidebar-portal', + append: true, + name: 'board-content-sidebar', + }); + }); + it('does not render GlDrawer when isSidebarOpen is false', () => { createStore({ mockGetters: { isSidebarOpen: () => false } }); createComponent(); diff --git a/spec/frontend/boards/components/board_settings_sidebar_spec.js b/spec/frontend/boards/components/board_settings_sidebar_spec.js index 464331b6e30..20a08be6c19 100644 --- a/spec/frontend/boards/components/board_settings_sidebar_spec.js +++ b/spec/frontend/boards/components/board_settings_sidebar_spec.js @@ -3,6 +3,7 @@ import { GlDrawer, GlLabel } from '@gitlab/ui'; import { shallowMount, createLocalVue } from '@vue/test-utils'; import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; +import { MountingPortal } from 'portal-vue'; import Vuex from 'vuex'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import BoardSettingsSidebar from '~/boards/components/board_settings_sidebar.vue'; @@ -51,6 +52,16 @@ describe('BoardSettingsSidebar', () => { wrapper.destroy(); }); + it('finds a MountingPortal component', () => { + createComponent(); + + expect(wrapper.find(MountingPortal).props()).toMatchObject({ + mountTo: '#js-right-sidebar-portal', + append: true, + name: 'board-settings-sidebar', + }); + }); + describe('when sidebarType is "list"', () => { it('finds a GlDrawer component', () => { createComponent(); |