diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-26 15:05:30 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-26 15:05:30 +0200 |
commit | b9fa82daeeb91d8121e096fec0db4981b46dd5b9 (patch) | |
tree | bc7fa8d234cdcb18dab72183bbf3ba882de9c2d4 | |
parent | a9095280c7954873fa391c9b91822308bdb52901 (diff) | |
download | gitlab-ce-b9fa82daeeb91d8121e096fec0db4981b46dd5b9.tar.gz |
Update tests and use js-issuable class for context form
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | app/assets/javascripts/issue.js.coffee | 2 | ||||
-rw-r--r-- | app/assets/javascripts/merge_request.js.coffee | 2 | ||||
-rw-r--r-- | app/views/projects/issues/_issue.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/issuable/_context.html.haml | 2 | ||||
-rw-r--r-- | spec/features/issues_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/task_lists_spec.rb | 6 | ||||
-rw-r--r-- | spec/javascripts/fixtures/issues_show.html.haml | 2 | ||||
-rw-r--r-- | spec/javascripts/fixtures/merge_requests_show.html.haml | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/app/assets/javascripts/issue.js.coffee b/app/assets/javascripts/issue.js.coffee index 9bb85300848..603a16da1ce 100644 --- a/app/assets/javascripts/issue.js.coffee +++ b/app/assets/javascripts/issue.js.coffee @@ -25,5 +25,5 @@ class @Issue $.ajax type: 'PATCH' - url: $('form.js-issue-update').attr('action') + url: $('form.js-issuable-update').attr('action') data: patchData diff --git a/app/assets/javascripts/merge_request.js.coffee b/app/assets/javascripts/merge_request.js.coffee index d9b8a98ea28..7462975bd3d 100644 --- a/app/assets/javascripts/merge_request.js.coffee +++ b/app/assets/javascripts/merge_request.js.coffee @@ -49,5 +49,5 @@ class @MergeRequest $.ajax type: 'PATCH' - url: $('form.js-merge-request-update').attr('action') + url: $('form.js-issuable-update').attr('action') data: patchData diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index 2c296cab977..3791af55e92 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -1,7 +1,7 @@ %li{ id: dom_id(issue), class: issue_css_classes(issue), url: issue_path(issue) } - if controller.controller_name == 'issues' .issue-check - = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue) + = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :set_assignee, issue) .issue-title %span.issue-title-text diff --git a/app/views/shared/issuable/_context.html.haml b/app/views/shared/issuable/_context.html.haml index 2a41448bb04..5fb6c5155cb 100644 --- a/app/views/shared/issuable/_context.html.haml +++ b/app/views/shared/issuable/_context.html.haml @@ -1,4 +1,4 @@ -= form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, html: {class: 'issuable-context-form inline-update js-merge-request-update'} do |f| += form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, html: {class: 'issuable-context-form inline-update js-issuable-update'} do |f| %div.prepend-top-20 .issuable-context-title %label diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 158a5c0c29c..808a6eeb958 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -218,7 +218,7 @@ describe 'Issues', feature: true do it 'with dropdown menu' do visit namespace_project_issue_path(project.namespace, project, issue) - find('.edit-issue.inline-update #issue_assignee_id'). + find('.context #issue_assignee_id'). set project.team.members.first.id click_button 'Update Issue' @@ -257,7 +257,7 @@ describe 'Issues', feature: true do it 'with dropdown menu' do visit namespace_project_issue_path(project.namespace, project, issue) - find('.edit-issue.inline-update'). + find('.context'). select(milestone.title, from: 'issue_milestone_id') click_button 'Update Issue' diff --git a/spec/features/task_lists_spec.rb b/spec/features/task_lists_spec.rb index 2099fc40cca..fca3c77fc64 100644 --- a/spec/features/task_lists_spec.rb +++ b/spec/features/task_lists_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -feature 'Task Lists' do +feature 'Task Lists', feature: true do include Warden::Test::Helpers let(:project) { create(:project) } @@ -52,7 +52,7 @@ feature 'Task Lists' do expect(page).to have_selector(container) expect(page).to have_selector("#{container} .wiki .task-list .task-list-item .task-list-item-checkbox") expect(page).to have_selector("#{container} .js-task-list-field") - expect(page).to have_selector('form.js-issue-update') + expect(page).to have_selector('form.js-issuable-update') expect(page).to have_selector('a.btn-close') end @@ -128,7 +128,7 @@ feature 'Task Lists' do expect(page).to have_selector(container) expect(page).to have_selector("#{container} .wiki .task-list .task-list-item .task-list-item-checkbox") expect(page).to have_selector("#{container} .js-task-list-field") - expect(page).to have_selector('form.js-merge-request-update') + expect(page).to have_selector('form.js-issuable-update') expect(page).to have_selector('a.btn-close') end diff --git a/spec/javascripts/fixtures/issues_show.html.haml b/spec/javascripts/fixtures/issues_show.html.haml index db5abe0cae3..7e8b2a64351 100644 --- a/spec/javascripts/fixtures/issues_show.html.haml +++ b/spec/javascripts/fixtures/issues_show.html.haml @@ -10,4 +10,4 @@ %textarea.js-task-list-field \- [ ] Task List Item -%form.js-issue-update{action: '/foo'} +%form.js-issuable-update{action: '/foo'} diff --git a/spec/javascripts/fixtures/merge_requests_show.html.haml b/spec/javascripts/fixtures/merge_requests_show.html.haml index c4329b8f94a..f0c622935f8 100644 --- a/spec/javascripts/fixtures/merge_requests_show.html.haml +++ b/spec/javascripts/fixtures/merge_requests_show.html.haml @@ -10,4 +10,4 @@ %textarea.js-task-list-field \- [ ] Task List Item -%form.js-merge-request-update{action: '/foo'} +%form.js-issuable-update{action: '/foo'} |