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 {
</script>
<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)"
>{{ __('Create list') }}
</gl-button>
......
......@@ -79,6 +79,32 @@ RSpec.describe 'epic boards', :js do
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
visit group_epic_boards_path(group)
wait_for_requests
......
......@@ -35,7 +35,7 @@ describe('BoardsSelector', () => {
const createStore = () => {
return new Vuex.Store({
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