diff --git a/webapp/components/Group/GroupForm.vue b/webapp/components/Group/GroupForm.vue index cb407a3d9..52437d644 100644 --- a/webapp/components/Group/GroupForm.vue +++ b/webapp/components/Group/GroupForm.vue @@ -37,8 +37,6 @@ {{ $t('group.type') }} - - - - + { + let wrapper + let mocks + + beforeEach(() => { + mocks = { + $t: jest.fn(), + } + }) + + describe('mount', () => { + const Wrapper = () => { + return shallowMount(ActionRadiusSelect, { propsData, mocks, localVue }) + } + + beforeEach(() => { + wrapper = Wrapper() + }) + it('renders the select', () => { + expect(wrapper.findComponent(ActionRadiusSelect).exists()).toBe(true) + }) + + describe('when an option is selected', () => { + it('emits a change event with the new value', () => { + const select = wrapper.find('select') + select.trigger('change') + expect(wrapper.emitted().change[0]).toEqual(['regional']) + }) + }) + }) +}) diff --git a/webapp/components/Select/ActionRadiusSelect.vue b/webapp/components/Select/ActionRadiusSelect.vue new file mode 100644 index 000000000..0a090e0a5 --- /dev/null +++ b/webapp/components/Select/ActionRadiusSelect.vue @@ -0,0 +1,33 @@ + + +