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 | |
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')
3 files changed, 26 insertions, 18 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 diff --git a/spec/features/projects/commit/mini_pipeline_graph_spec.rb b/spec/features/projects/commit/mini_pipeline_graph_spec.rb index 9349f36282d..7bd3bce85d5 100644 --- a/spec/features/projects/commit/mini_pipeline_graph_spec.rb +++ b/spec/features/projects/commit/mini_pipeline_graph_spec.rb @@ -12,6 +12,7 @@ RSpec.describe 'Mini Pipeline Graph in Commit View', :js do ref: project.default_branch, sha: project.commit.sha) end + let(:build) { create(:ci_build, pipeline: pipeline) } it 'display icon with status' do @@ -25,6 +26,8 @@ RSpec.describe 'Mini Pipeline Graph in Commit View', :js do build.run visit project_commit_path(project, project.commit.id) + wait_for_all_requests + expect(page).to have_selector('.mr-widget-pipeline-graph') first('.mini-pipeline-graph-dropdown-toggle').click diff --git a/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb b/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb index 71405cf917d..89ff2f4b26d 100644 --- a/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb +++ b/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb @@ -30,7 +30,7 @@ RSpec.describe 'Project > Commit > View user status' do end end - describe 'status for a diff note on the commit' do + describe 'status for a diff note on the commit', :js do let(:note) { create(:diff_note_on_commit, project: project) } it_behaves_like 'showing user status' do |