Commit cc93c875 authored by Phil Hughes's avatar Phil Hughes

Fixed frontend specs

parent 8708347c
...@@ -71,16 +71,16 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -71,16 +71,16 @@ describe 'Issue Boards', feature: true, js: true do
let!(:list1) { create(:list, board: board, label: planning, position: 0) } let!(:list1) { create(:list, board: board, label: planning, position: 0) }
let!(:list2) { create(:list, board: board, label: development, position: 1) } let!(:list2) { create(:list, board: board, label: development, position: 1) }
let!(:confidential_issue) { create(:labeled_issue, :confidential, project: project, author: user, labels: [planning]) } let!(:confidential_issue) { create(:labeled_issue, :confidential, project: project, author: user, labels: [planning], relative_position: 9) }
let!(:issue1) { create(:labeled_issue, project: project, assignee: user, labels: [planning]) } let!(:issue1) { create(:labeled_issue, project: project, assignee: user, labels: [planning], relative_position: 8) }
let!(:issue2) { create(:labeled_issue, project: project, author: user2, labels: [planning]) } let!(:issue2) { create(:labeled_issue, project: project, author: user2, labels: [planning], relative_position: 7) }
let!(:issue3) { create(:labeled_issue, project: project, labels: [planning]) } let!(:issue3) { create(:labeled_issue, project: project, labels: [planning], relative_position: 6) }
let!(:issue4) { create(:labeled_issue, project: project, labels: [planning]) } let!(:issue4) { create(:labeled_issue, project: project, labels: [planning], relative_position: 5) }
let!(:issue5) { create(:labeled_issue, project: project, labels: [planning], milestone: milestone) } let!(:issue5) { create(:labeled_issue, project: project, labels: [planning], milestone: milestone, relative_position: 4) }
let!(:issue6) { create(:labeled_issue, project: project, labels: [planning, development]) } let!(:issue6) { create(:labeled_issue, project: project, labels: [planning, development], relative_position: 3) }
let!(:issue7) { create(:labeled_issue, project: project, labels: [development]) } let!(:issue7) { create(:labeled_issue, project: project, labels: [development], relative_position: 2) }
let!(:issue8) { create(:closed_issue, project: project) } let!(:issue8) { create(:closed_issue, project: project) }
let!(:issue9) { create(:labeled_issue, project: project, labels: [planning, testing, bug, accepting]) } let!(:issue9) { create(:labeled_issue, project: project, labels: [planning, testing, bug, accepting], relative_position: 1) }
before do before do
visit namespace_project_board_path(project.namespace, project, board) visit namespace_project_board_path(project.namespace, project, board)
......
...@@ -9,9 +9,9 @@ describe 'Issue Boards', :feature, :js do ...@@ -9,9 +9,9 @@ describe 'Issue Boards', :feature, :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:label) { create(:label, project: project) } let(:label) { create(:label, project: project) }
let!(:list1) { create(:list, board: board, label: label, position: 0) } let!(:list1) { create(:list, board: board, label: label, position: 0) }
let!(:issue1) { create(:labeled_issue, project: project, title: 'testing 1', labels: [label], relative_position: 3.0) } let!(:issue1) { create(:labeled_issue, project: project, title: 'testing 1', labels: [label], relative_position: 3) }
let!(:issue2) { create(:labeled_issue, project: project, title: 'testing 2', labels: [label], relative_position: 2.0) } let!(:issue2) { create(:labeled_issue, project: project, title: 'testing 2', labels: [label], relative_position: 2) }
let!(:issue3) { create(:labeled_issue, project: project, title: 'testing 3', labels: [label], relative_position: 1.0) } let!(:issue3) { create(:labeled_issue, project: project, title: 'testing 3', labels: [label], relative_position: 1) }
before do before do
project.team << [user, :master] project.team << [user, :master]
......
window.ES6Promise = require('vendor/es6-promise.auto');
window.ES6Promise.polyfill();
/* eslint-disable comma-dangle, one-var, no-unused-vars */ /* eslint-disable comma-dangle, one-var, no-unused-vars */
/* global Vue */ /* global Vue */
/* global BoardService */ /* global BoardService */
...@@ -16,6 +14,7 @@ require('~/boards/models/user'); ...@@ -16,6 +14,7 @@ require('~/boards/models/user');
require('~/boards/services/board_service'); require('~/boards/services/board_service');
require('~/boards/stores/boards_store'); require('~/boards/stores/boards_store');
require('./mock_data'); require('./mock_data');
require('es6-promise').polyfill();
describe('Store', () => { describe('Store', () => {
beforeEach(() => { beforeEach(() => {
......
...@@ -103,6 +103,7 @@ describe('List model', () => { ...@@ -103,6 +103,7 @@ describe('List model', () => {
listDup.updateIssueLabel(list, issue); listDup.updateIssueLabel(list, issue);
expect(gl.boardService.moveIssue).toHaveBeenCalledWith(issue.id, list.id, listDup.id); expect(gl.boardService.moveIssue)
.toHaveBeenCalledWith(issue.id, list.id, listDup.id, undefined, undefined);
}); });
}); });
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