diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/features/projects/commit/diff_notes_spec.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/features/projects/commit/diff_notes_spec.rb')
-rw-r--r-- | spec/features/projects/commit/diff_notes_spec.rb | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/spec/features/projects/commit/diff_notes_spec.rb b/spec/features/projects/commit/diff_notes_spec.rb index ff86047d812..6cebff1cc9a 100644 --- a/spec/features/projects/commit/diff_notes_spec.rb +++ b/spec/features/projects/commit/diff_notes_spec.rb @@ -8,30 +8,35 @@ RSpec.describe 'Commit diff', :js do let(:user) { create(:user) } let(:project) { create(:project, :public, :repository) } - before do - project.add_maintainer(user) - sign_in user + using RSpec::Parameterized::TableSyntax + + where(:view, :async_diff_file_loading) do + 'inline' | true + 'inline' | false + 'parallel' | true + 'parallel' | false end - %w(inline parallel).each do |view| - context "#{view} view" do - before do - visit project_commit_path(project, sample_commit.id, view: view) - end + with_them do + before do + stub_feature_flags(async_commit_diff_files: async_diff_file_loading) + project.add_maintainer(user) + sign_in user + visit project_commit_path(project, sample_commit.id, view: view) + end - it "adds comment to diff" do - diff_line_num = first('.diff-line-num.new') + it "adds comment to diff" do + diff_line_num = first('.diff-line-num.new') - diff_line_num.hover - diff_line_num.find('.js-add-diff-note-button').click + diff_line_num.hover + diff_line_num.find('.js-add-diff-note-button').click - page.within(first('.diff-viewer')) do - find('.js-note-text').set 'test comment' + page.within(first('.diff-viewer')) do + find('.js-note-text').set 'test comment' - click_button 'Comment' + click_button 'Comment' - expect(page).to have_content('test comment') - end + expect(page).to have_content('test comment') end end end |