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