summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstance Okoghenun <cokoghenun@gitlab.com>2018-08-01 16:17:56 +0000
committerPhil Hughes <me@iamphill.com>2018-08-01 16:17:56 +0000
commit4d4d0a7e252bc2d3758373a7bee54e88c1bb232d (patch)
tree58b2772adbe9841dfe9ec4b99a7d03f2619022a2
parent5815b830c86960c6c510bcdac69f9345351d494a (diff)
downloadgitlab-ce-4d4d0a7e252bc2d3758373a7bee54e88c1bb232d.tar.gz
Resolve "List of projects not loading when trying to create an issue from a board (TypeError)"
-rw-r--r--app/assets/javascripts/boards/components/board_new_issue.vue1
-rw-r--r--app/assets/javascripts/boards/components/project_select.vue2
-rw-r--r--changelogs/unreleased/49499-list-of-projects-not-loading-when-trying-to-create-an-issue-from-a-board-typeerror.yml5
-rw-r--r--spec/features/groups/board_spec.rb35
4 files changed, 42 insertions, 1 deletions
diff --git a/app/assets/javascripts/boards/components/board_new_issue.vue b/app/assets/javascripts/boards/components/board_new_issue.vue
index 271c6eac81a..1e3cd43d1f0 100644
--- a/app/assets/javascripts/boards/components/board_new_issue.vue
+++ b/app/assets/javascripts/boards/components/board_new_issue.vue
@@ -115,6 +115,7 @@ export default {
:id="list.id + '-title'"
class="form-control"
type="text"
+ name="issue_title"
autocomplete="off"
/>
<project-select
diff --git a/app/assets/javascripts/boards/components/project_select.vue b/app/assets/javascripts/boards/components/project_select.vue
index dc887db1e73..ef9844d5562 100644
--- a/app/assets/javascripts/boards/components/project_select.vue
+++ b/app/assets/javascripts/boards/components/project_select.vue
@@ -46,7 +46,7 @@ export default {
selectable: true,
data: (term, callback) => {
this.loading = true;
- return Api.groupProjects(this.groupId, term, projects => {
+ return Api.groupProjects(this.groupId, term, {}, projects => {
this.loading = false;
callback(projects);
});
diff --git a/changelogs/unreleased/49499-list-of-projects-not-loading-when-trying-to-create-an-issue-from-a-board-typeerror.yml b/changelogs/unreleased/49499-list-of-projects-not-loading-when-trying-to-create-an-issue-from-a-board-typeerror.yml
new file mode 100644
index 00000000000..043698269e2
--- /dev/null
+++ b/changelogs/unreleased/49499-list-of-projects-not-loading-when-trying-to-create-an-issue-from-a-board-typeerror.yml
@@ -0,0 +1,5 @@
+---
+title: Fixed list of projects not loading in group boards
+merge_request: 20955
+author:
+type: fixed
diff --git a/spec/features/groups/board_spec.rb b/spec/features/groups/board_spec.rb
new file mode 100644
index 00000000000..86a4a016f3d
--- /dev/null
+++ b/spec/features/groups/board_spec.rb
@@ -0,0 +1,35 @@
+require 'rails_helper'
+
+describe 'Group Boards' do
+ let(:group) { create(:group) }
+ let!(:project) { create(:project_empty_repo, group: group) }
+ let(:user) { create(:group_member, :maintainer, user: create(:user), group: group ).user }
+
+ before do
+ sign_in(user)
+ end
+
+ context 'Creates a an issue', :js do
+ before do
+ visit group_boards_path(group)
+ end
+
+ it 'Adds an issue to the backlog' do
+ page.within(find('.board', match: :first)) do
+ issue_title = 'New Issue'
+ find(:css, '.issue-count-badge-add-button').click
+ expect(find('.board-new-issue-form')).to be_visible
+
+ fill_in 'issue_title', with: issue_title
+ find('.dropdown-menu-toggle').click
+
+ wait_for_requests
+
+ click_link(project.name)
+ click_button 'Submit issue'
+
+ expect(page).to have_content(issue_title)
+ end
+ end
+ end
+end