Commit ad5bd4ad authored by Michel Engelen's avatar Michel Engelen

updated tests to comply with the corresponding EE branch

parent 370d35b3
require 'spec_helper' require 'spec_helper'
describe 'Discussion Comments Commit', :js do describe 'Thread Comments Commit', :js do
include RepoHelpers include RepoHelpers
let(:user) { create(:user) } let(:user) { create(:user) }
...@@ -16,7 +16,7 @@ describe 'Discussion Comments Commit', :js do ...@@ -16,7 +16,7 @@ describe 'Discussion Comments Commit', :js do
visit project_commit_path(project, sample_commit.id) visit project_commit_path(project, sample_commit.id)
end end
it_behaves_like 'discussion comments', 'commit' it_behaves_like 'thread comments', 'commit'
it 'has class .js-note-emoji' do it 'has class .js-note-emoji' do
expect(page).to have_css('.js-note-emoji') expect(page).to have_css('.js-note-emoji')
......
require 'spec_helper' require 'spec_helper'
describe 'Discussion Comments Issue', :js do describe 'Thread Comments Issue', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
let(:issue) { create(:issue, project: project) } let(:issue) { create(:issue, project: project) }
...@@ -12,5 +12,5 @@ describe 'Discussion Comments Issue', :js do ...@@ -12,5 +12,5 @@ describe 'Discussion Comments Issue', :js do
visit project_issue_path(project, issue) visit project_issue_path(project, issue)
end end
it_behaves_like 'discussion comments', 'issue' it_behaves_like 'thread comments', 'issue'
end end
require 'spec_helper' require 'spec_helper'
describe 'Discussion Comments Merge Request', :js do describe 'Thread Comments Merge Request', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:merge_request) { create(:merge_request, source_project: project) } let(:merge_request) { create(:merge_request, source_project: project) }
...@@ -12,5 +12,5 @@ describe 'Discussion Comments Merge Request', :js do ...@@ -12,5 +12,5 @@ describe 'Discussion Comments Merge Request', :js do
visit project_merge_request_path(project, merge_request) visit project_merge_request_path(project, merge_request)
end end
it_behaves_like 'discussion comments', 'merge request' it_behaves_like 'thread comments', 'merge request'
end end
require 'spec_helper' require 'spec_helper'
describe 'Discussion Comments Snippet', :js do describe 'Thread Comments Snippet', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
let(:snippet) { create(:project_snippet, :private, project: project, author: user) } let(:snippet) { create(:project_snippet, :private, project: project, author: user) }
...@@ -12,5 +12,5 @@ describe 'Discussion Comments Snippet', :js do ...@@ -12,5 +12,5 @@ describe 'Discussion Comments Snippet', :js do
visit project_snippet_path(project, snippet) visit project_snippet_path(project, snippet)
end end
it_behaves_like 'discussion comments', 'snippet' it_behaves_like 'thread comments', 'snippet'
end end
shared_examples 'discussion comments' do |resource_name| shared_examples 'thread comments' do |resource_name|
let(:form_selector) { '.js-main-target-form' } let(:form_selector) { '.js-main-target-form' }
let(:dropdown_selector) { "#{form_selector} .comment-type-dropdown" } let(:dropdown_selector) { "#{form_selector} .comment-type-dropdown" }
let(:toggle_selector) { "#{dropdown_selector} .dropdown-toggle" } let(:toggle_selector) { "#{dropdown_selector} .dropdown-toggle" }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment