Skip to content
Snippets Groups Projects
Commit 2bd1a229 authored by Phil Hughes's avatar Phil Hughes
Browse files

Disables add issue button

Previously was disabled until any list was present (except for done) this now takes into account the welcome blank state

Closes #27931
parent 110cd589
No related branches found
No related tags found
1 merge request!9100Disables add issue button
Pipeline #
Loading
@@ -95,7 +95,7 @@ $(() => {
Loading
@@ -95,7 +95,7 @@ $(() => {
}, },
computed: { computed: {
disabled() { disabled() {
return Store.shouldAddBlankState(); return !this.store.lists.filter(list => list.type !== 'blank' && list.type !== 'done').length;
}, },
}, },
template: ` template: `
Loading
Loading
Loading
@@ -28,6 +28,12 @@ describe 'Issue Boards', feature: true, js: true do
Loading
@@ -28,6 +28,12 @@ describe 'Issue Boards', feature: true, js: true do
expect(page).to have_content('Welcome to your Issue Board!') expect(page).to have_content('Welcome to your Issue Board!')
end end
   
it 'disables add issues button by default' do
button = page.find('.issue-boards-search button', text: 'Add issues')
expect(button[:disabled]).to eq true
end
it 'hides the blank state when clicking nevermind button' do it 'hides the blank state when clicking nevermind button' do
page.within(find('.board-blank-state')) do page.within(find('.board-blank-state')) do
click_button("Nevermind, I'll use my own") click_button("Nevermind, I'll use my own")
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment