diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/projects/issues_controller_spec.rb | 3 | ||||
-rw-r--r-- | spec/features/issues/note_polling_spec.rb | 1 | ||||
-rw-r--r-- | spec/support/features/discussion_comments_shared_example.rb | 8 |
3 files changed, 5 insertions, 7 deletions
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index c07c035fcda..66d6a51578e 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -889,8 +889,7 @@ describe Projects::IssuesController do it 'returns discussion json' do get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid - expect(JSON.parse(response.body).first.keys).to match_array( - ['id', 'reply_id', 'expanded', 'notes', 'individual_note']) + expect(JSON.parse(response.body).first.keys).to match_array(%w[id reply_id expanded notes individual_note]) end end end diff --git a/spec/features/issues/note_polling_spec.rb b/spec/features/issues/note_polling_spec.rb index 2503aecdc23..9145ebb385a 100644 --- a/spec/features/issues/note_polling_spec.rb +++ b/spec/features/issues/note_polling_spec.rb @@ -50,7 +50,6 @@ feature 'Issue notes polling', :js do expect(page).to have_selector(".alert") end - it 'when editing but you changed some things, an update comes in, and you press cancel, show the updated content' do click_edit_action(existing_note) diff --git a/spec/support/features/discussion_comments_shared_example.rb b/spec/support/features/discussion_comments_shared_example.rb index b5004a5beba..81cb94ab8c4 100644 --- a/spec/support/features/discussion_comments_shared_example.rb +++ b/spec/support/features/discussion_comments_shared_example.rb @@ -76,15 +76,14 @@ shared_examples 'discussion comments' do |resource_name| expect(page).not_to have_selector menu_selector end - it 'clicking the ul padding or divider should not change the text' do + find(menu_selector).trigger 'click' + if resource_name == 'issue' - find(menu_selector).trigger 'click' expect(find(dropdown_selector)).to have_content 'Comment' find(toggle_selector).click find("#{menu_selector} .divider").trigger 'click' - expect(find(dropdown_selector)).to have_content 'Comment' else find(menu_selector).trigger 'click' @@ -94,8 +93,9 @@ shared_examples 'discussion comments' do |resource_name| find("#{menu_selector} .divider").trigger 'click' expect(page).to have_selector menu_selector - expect(find(dropdown_selector)).to have_content 'Comment' end + + expect(find(dropdown_selector)).to have_content 'Comment' end describe 'when selecting "Start discussion"' do |