Commit 352ed0f9 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ss/add-multiselect-wrapper' into 'master'

Add assignee multiselect for sidebar work

See merge request gitlab-org/gitlab!44087
parents 9f5f35ed 8f90148b
<script>
import { GlDropdown, GlDropdownForm } from '@gitlab/ui';
export default {
components: {
GlDropdownForm,
GlDropdown,
},
props: {
headerText: {
type: String,
required: true,
},
text: {
type: String,
required: true,
},
},
};
</script>
<template>
<gl-dropdown class="show" :text="text" :header-text="headerText">
<gl-dropdown-form>
<slot name="items"></slot>
</gl-dropdown-form>
</gl-dropdown>
</template>
---
title: Add assignees multiselect wrapper
merge_request: 44087
author:
type: added
import { shallowMount } from '@vue/test-utils';
import { getByText } from '@testing-library/dom';
import AssigneesDropdown from '~/vue_shared/components/sidebar/assignees_dropdown.vue';
describe('AssigneesDropdown Component', () => {
it('renders items slot', () => {
const wrapper = shallowMount(AssigneesDropdown, {
propsData: {
text: '',
headerText: '',
},
slots: {
items: '<p>Test</p>',
},
});
expect(getByText(wrapper.element, 'Test')).toBeDefined();
});
});
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