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
This commit is contained in:
Phil Hughes 2017-02-09 15:51:49 +00:00
parent 110cd58999
commit 2bd1a22906
2 changed files with 7 additions and 1 deletions

View File

@ -95,7 +95,7 @@ $(() => {
},
computed: {
disabled() {
return Store.shouldAddBlankState();
return !this.store.lists.filter(list => list.type !== 'blank' && list.type !== 'done').length;
},
},
template: `

View File

@ -28,6 +28,12 @@ describe 'Issue Boards', feature: true, js: true do
expect(page).to have_content('Welcome to your Issue Board!')
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
page.within(find('.board-blank-state')) do
click_button("Nevermind, I'll use my own")