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 {
</script>
<template>
<gl-form-group class="gl-mb-0" data-testid="roadmap-epics-state">
<label for="roadmap-epics-state" class="gl-display-block">{{ $options.i18n.header }}</label>
<gl-form-radio-group
id="roadmap-epics-state"
:checked="epicsState"
stacked
:options="availableStates"
@change="handleEpicStateChange"
/>
</gl-form-group>
<div>
<gl-form-group class="gl-mb-0" :label="$options.i18n.header" data-testid="roadmap-epics-state">
<gl-form-radio-group
:checked="epicsState"
stacked
:options="availableStates"
@change="handleEpicStateChange"
/>
</gl-form-group>
</div>
</template>
......@@ -122,19 +122,6 @@ RSpec.describe 'group epic roadmap', :js do
expect(page).to have_selector('.epics-list-item .epic-title', count: 1)
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
describe 'roadmap page with filter applied' do
......@@ -315,16 +302,6 @@ RSpec.describe 'group epic roadmap', :js do
expect(page).to have_content(epic_with_bug.title)
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
describe 'roadmap page with sort order applied' do
......
......@@ -39,13 +39,9 @@ describe('RoadmapEpicsState', () => {
});
describe('template', () => {
it('renders field label', () => {
expect(wrapper.find('label').exists()).toBe(true);
expect(wrapper.find('label').text()).toContain('Epics');
});
it('renders form group', () => {
expect(findFormGroup().exists()).toBe(true);
expect(findFormGroup().attributes('label')).toBe('Epics');
});
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