Commit 3ca1235e authored by Florie Guibert's avatar Florie Guibert

Epic Boards - MVC1 bug fixes

Review feedback
parent 2ad2eafa
...@@ -13,7 +13,7 @@ export default { ...@@ -13,7 +13,7 @@ export default {
</script> </script>
<template> <template>
<span class="gl-ml-3 gl-display-flex gl-align-items-center"> <span class="gl-ml-3 gl-display-flex gl-align-items-center" data-testid="boards-create-list">
<gl-button variant="confirm" @click="setAddColumnFormVisibility(true)" <gl-button variant="confirm" @click="setAddColumnFormVisibility(true)"
>{{ __('Create list') }} >{{ __('Create list') }}
</gl-button> </gl-button>
......
...@@ -79,6 +79,32 @@ RSpec.describe 'epic boards', :js do ...@@ -79,6 +79,32 @@ RSpec.describe 'epic boards', :js do
end end
end end
context 'when user can admin epic boards' do
before do
stub_licensed_features(epics: true)
group.add_maintainer(user)
sign_in(user)
visit_epic_boards_page
end
it "shows 'Create list' button" do
expect(page).to have_selector('[data-testid="boards-create-list"]')
end
end
context 'when user cannot admin epic boards' do
before do
stub_licensed_features(epics: true)
group.add_guest(user)
sign_in(user)
visit_epic_boards_page
end
it "does not show 'Create list'" do
expect(page).not_to have_selector('[data-testid="boards-create-list"]')
end
end
def visit_epic_boards_page def visit_epic_boards_page
visit group_epic_boards_path(group) visit group_epic_boards_path(group)
wait_for_requests wait_for_requests
......
...@@ -35,7 +35,7 @@ describe('BoardsSelector', () => { ...@@ -35,7 +35,7 @@ describe('BoardsSelector', () => {
const createStore = () => { const createStore = () => {
return new Vuex.Store({ return new Vuex.Store({
getters: { getters: {
isEpicBoard: () => true, isEpicBoard: () => false,
}, },
}); });
}; };
......
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