diff options
Diffstat (limited to 'spec/features/projects/blobs')
-rw-r--r-- | spec/features/projects/blobs/edit_spec.rb | 11 | ||||
-rw-r--r-- | spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/spec/features/projects/blobs/edit_spec.rb b/spec/features/projects/blobs/edit_spec.rb index 5aca994f53e..90d9263b515 100644 --- a/spec/features/projects/blobs/edit_spec.rb +++ b/spec/features/projects/blobs/edit_spec.rb @@ -20,9 +20,14 @@ RSpec.describe 'Editing file blob', :js do sign_in(user) end - def edit_and_commit(commit_changes: true) + def edit_and_commit(commit_changes: true, is_diff: false) wait_for_requests - find('.js-edit-blob').click + + if is_diff + first('.js-diff-more-actions').click + end + + first('.js-edit-blob').click fill_editor(content: 'class NextFeature\\nend\\n') if commit_changes @@ -38,7 +43,7 @@ RSpec.describe 'Editing file blob', :js do context 'from MR diff' do before do visit diffs_project_merge_request_path(project, merge_request) - edit_and_commit + edit_and_commit(is_diff: true) end it 'returns me to the mr' do diff --git a/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb b/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb index 8b43687c71c..023e00a3e02 100644 --- a/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb +++ b/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb @@ -10,7 +10,7 @@ RSpec.describe 'User follows pipeline suggest nudge spec when feature is enabled describe 'viewing the new blob page' do before do - stub_feature_flags(suggest_pipeline: true) + stub_experiment_for_user(suggest_pipeline: true) sign_in(user) end |