Update tests and use js-issuable class for context form

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2015-06-26 15:05:30 +02:00
parent a9095280c7
commit b9fa82daee
No known key found for this signature in database
GPG key ID: 161B5D6A44D3D88A
8 changed files with 11 additions and 11 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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'

View file

@ -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

View file

@ -10,4 +10,4 @@
%textarea.js-task-list-field
\- [ ] Task List Item
%form.js-issue-update{action: '/foo'}
%form.js-issuable-update{action: '/foo'}

View file

@ -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'}