Commit ea85d05c authored by Florie Guibert's avatar Florie Guibert

Roadmap settings - Move epics state to sidebar

Review feedback
parent 317eab2c
...@@ -36,14 +36,14 @@ export default { ...@@ -36,14 +36,14 @@ export default {
</script> </script>
<template> <template>
<gl-form-group class="gl-mb-0" data-testid="roadmap-epics-state"> <div>
<label for="roadmap-epics-state" class="gl-display-block">{{ $options.i18n.header }}</label> <gl-form-group class="gl-mb-0" :label="$options.i18n.header" data-testid="roadmap-epics-state">
<gl-form-radio-group <gl-form-radio-group
id="roadmap-epics-state"
:checked="epicsState" :checked="epicsState"
stacked stacked
:options="availableStates" :options="availableStates"
@change="handleEpicStateChange" @change="handleEpicStateChange"
/> />
</gl-form-group> </gl-form-group>
</div>
</template> </template>
...@@ -122,19 +122,6 @@ RSpec.describe 'group epic roadmap', :js do ...@@ -122,19 +122,6 @@ RSpec.describe 'group epic roadmap', :js do
expect(page).to have_selector('.epics-list-item .epic-title', count: 1) expect(page).to have_selector('.epics-list-item .epic-title', count: 1)
end end
end end
it 'saves last selected epic state', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/341827' do
state_dropdown.find('button', text: 'Open epics').click
wait_for_all_requests
visit group_roadmap_path(group)
wait_for_requests
expect(state_dropdown.find('.dropdown-toggle')).to have_text("Open epics")
page.within('.roadmap-container .epics-list-section') do
expect(page).to have_selector('.epics-list-item .epic-title', count: 2)
end
end
end end
describe 'roadmap page with filter applied' do describe 'roadmap page with filter applied' do
...@@ -315,16 +302,6 @@ RSpec.describe 'group epic roadmap', :js do ...@@ -315,16 +302,6 @@ RSpec.describe 'group epic roadmap', :js do
expect(page).to have_content(epic_with_bug.title) expect(page).to have_content(epic_with_bug.title)
end end
end end
# it 'keeps label filter when filtering by state' do
# state_dropdown.find('.dropdown-toggle').click
# state_dropdown.find('button', text: 'Open epics').click
# page.within('.roadmap-container .epics-list-section') do
# expect(page).to have_selector('.epics-list-item .epic-title', count: 1)
# expect(page).to have_content(epic_with_bug.title)
# end
# end
end end
describe 'roadmap page with sort order applied' do describe 'roadmap page with sort order applied' do
......
...@@ -39,13 +39,9 @@ describe('RoadmapEpicsState', () => { ...@@ -39,13 +39,9 @@ describe('RoadmapEpicsState', () => {
}); });
describe('template', () => { describe('template', () => {
it('renders field label', () => {
expect(wrapper.find('label').exists()).toBe(true);
expect(wrapper.find('label').text()).toContain('Epics');
});
it('renders form group', () => { it('renders form group', () => {
expect(findFormGroup().exists()).toBe(true); expect(findFormGroup().exists()).toBe(true);
expect(findFormGroup().attributes('label')).toBe('Epics');
}); });
it('renders radio form group', () => { it('renders radio form group', () => {
......
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