diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-12-10 21:06:26 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-12-11 20:11:23 +0100 |
commit | 617ba01322b0d2d8fbe6a543b2e2393b8178089e (patch) | |
tree | 6bc25e30b299fea2f04902c557bffd3690b82442 /spec | |
parent | 6117ae98da6fe9d3c5cf055546c82a97b46c87a6 (diff) | |
download | gitlab-ce-617ba01322b0d2d8fbe6a543b2e2393b8178089e.tar.gz |
Fix tests for new issuable sidebar
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues_spec.rb | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 3d6d87e764a..0cad8c78ad2 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -69,7 +69,10 @@ describe 'Issues', feature: true do click_button 'Save changes' - expect(page).to have_content 'Assignee: none' + page.within('.assignee') do + expect(page).to have_content 'None' + end + expect(issue.reload.assignee).to be_nil end end @@ -202,7 +205,7 @@ describe 'Issues', feature: true do it 'with dropdown menu' do visit namespace_project_issue_path(project.namespace, project, issue) - find('.context #issue_assignee_id'). + find('.issuable-sidebar #issue_assignee_id'). set project.team.members.first.id click_button 'Update Issue' @@ -241,12 +244,16 @@ describe 'Issues', feature: true do it 'with dropdown menu' do visit namespace_project_issue_path(project.namespace, project, issue) - find('.context'). + find('.issuable-sidebar'). select(milestone.title, from: 'issue_milestone_id') click_button 'Update Issue' expect(page).to have_content "Milestone changed to #{milestone.title}" - expect(page).to have_content "Milestone: #{milestone.title}" + + page.within('.milestone') do + expect(page).to have_content milestone.title + end + has_select?('issue_assignee_id', selected: milestone.title) end end @@ -279,13 +286,19 @@ describe 'Issues', feature: true do it 'allows user to remove assignee', js: true do visit namespace_project_issue_path(project.namespace, project, issue) - expect(page).to have_content "Assignee: #{user2.name}" - first('#s2id_issue_assignee_id').click + page.within('.assignee') do + expect(page).to have_content user2.name + end + + find('.assignee .edit-link').click sleep 2 # wait for ajax stuff to complete first('.user-result').click - expect(page).to have_content 'Assignee: none' + page.within('.assignee') do + expect(page).to have_content 'None' + end + sleep 2 # wait for ajax stuff to complete expect(issue.reload.assignee).to be_nil end |