Commit 8f5da962 authored by Phil Hughes's avatar Phil Hughes

fixed boards specs

added key to assignee avatar loop
parent 3a4b3a19
...@@ -128,7 +128,7 @@ $(() => { ...@@ -128,7 +128,7 @@ $(() => {
}, },
computed: { computed: {
disabled() { disabled() {
return !this.store.lists.filter(list => list.type !== 'blank' && list.type !== 'done').length; return !this.store.lists.filter(list => !list.preset).length;
}, },
tooltipTitle() { tooltipTitle() {
if (this.disabled) { if (this.disabled) {
......
...@@ -152,6 +152,7 @@ gl.issueBoards.IssueCardInner = Vue.extend({ ...@@ -152,6 +152,7 @@ gl.issueBoards.IssueCardInner = Vue.extend({
<div class="card-assignee"> <div class="card-assignee">
<user-avatar-link <user-avatar-link
v-for="(assignee, index) in issue.assignees" v-for="(assignee, index) in issue.assignees"
:key="assignee.id"
v-if="shouldRenderAssignee(index)" v-if="shouldRenderAssignee(index)"
class="js-no-trigger" class="js-no-trigger"
:link-href="assigneeUrl(assignee)" :link-href="assigneeUrl(assignee)"
......
...@@ -26,7 +26,7 @@ gl.issueBoards.ModalFooter = Vue.extend({ ...@@ -26,7 +26,7 @@ gl.issueBoards.ModalFooter = Vue.extend({
}, },
methods: { methods: {
addIssues() { addIssues() {
const list = this.modal.selectedList || this.state.lists[0]; const list = this.modal.selectedList || this.state.lists[1];
const selectedIssues = ModalStore.getSelectedIssues(); const selectedIssues = ModalStore.getSelectedIssues();
const issueIds = selectedIssues.map(issue => issue.globalId); const issueIds = selectedIssues.map(issue => issue.globalId);
......
...@@ -231,7 +231,7 @@ describe 'Issue Boards add issue modal', :feature, :js do ...@@ -231,7 +231,7 @@ describe 'Issue Boards add issue modal', :feature, :js do
click_button 'Add 1 issue' click_button 'Add 1 issue'
end end
page.within(first('.board')) do page.within(find('.board:nth-child(2)')) do
expect(page).to have_selector('.card') expect(page).to have_selector('.card')
end end
end end
...@@ -247,7 +247,7 @@ describe 'Issue Boards add issue modal', :feature, :js do ...@@ -247,7 +247,7 @@ describe 'Issue Boards add issue modal', :feature, :js do
click_button 'Add 1 issue' click_button 'Add 1 issue'
end end
page.within(find('.board:nth-child(2)')) do page.within(find('.board:nth-child(3)')) do
expect(page).to have_selector('.card') expect(page).to have_selector('.card')
end end
end end
......
...@@ -13,7 +13,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -13,7 +13,7 @@ describe 'Issue Boards', feature: true, js: true do
let!(:issue2) { create(:labeled_issue, project: project, labels: [development, stretch], relative_position: 1) } let!(:issue2) { create(:labeled_issue, project: project, labels: [development, stretch], relative_position: 1) }
let(:board) { create(:board, project: project) } let(:board) { create(:board, project: project) }
let!(:list) { create(:list, board: board, label: development, position: 0) } let!(:list) { create(:list, board: board, label: development, position: 0) }
let(:card) { first('.board').first('.card') } let(:card) { find('.board:nth-child(2)').first('.card') }
before do before do
Timecop.freeze Timecop.freeze
...@@ -74,7 +74,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -74,7 +74,7 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_requests wait_for_requests
page.within(first('.board')) do page.within(find('.board:nth-child(2)')) do
expect(page).to have_selector('.card', count: 1) expect(page).to have_selector('.card', count: 1)
end end
end end
...@@ -101,7 +101,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -101,7 +101,7 @@ describe 'Issue Boards', feature: true, js: true do
end end
it 'removes the assignee' do it 'removes the assignee' do
card_two = first('.board').find('.card:nth-child(2)') card_two = find('.board:nth-child(2)').find('.card:nth-child(2)')
click_card(card_two) click_card(card_two)
page.within('.assignee') do page.within('.assignee') do
...@@ -154,7 +154,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -154,7 +154,7 @@ describe 'Issue Boards', feature: true, js: true do
expect(page).to have_content(user.name) expect(page).to have_content(user.name)
end end
page.within(first('.board')) do page.within(find('.board:nth-child(2)')) do
find('.card:nth-child(2)').trigger('click') find('.card:nth-child(2)').trigger('click')
end end
......
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