diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-20 11:43:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-20 11:43:17 +0000 |
commit | dfc94207fec2d84314b1a5410cface22e8b369bd (patch) | |
tree | c54022f61ced104305889a64de080998a0dc773b /spec/features/merge_request | |
parent | b874efeff674f6bf0355d5d242ecf81c6f7155df (diff) | |
download | gitlab-ce-15.11.0-rc42.tar.gz |
Add latest changes from gitlab-org/gitlab@15-11-stable-eev15.11.0-rc42
Diffstat (limited to 'spec/features/merge_request')
14 files changed, 347 insertions, 35 deletions
diff --git a/spec/features/merge_request/maintainer_edits_fork_spec.rb b/spec/features/merge_request/maintainer_edits_fork_spec.rb index b8dc3af8a6a..c9aa22e396b 100644 --- a/spec/features/merge_request/maintainer_edits_fork_spec.rb +++ b/spec/features/merge_request/maintainer_edits_fork_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' RSpec.describe 'a maintainer edits files on a source-branch of an MR from a fork', :js, :sidekiq_might_not_need_inline, feature_category: :code_review_workflow do - include Spec::Support::Helpers::Features::SourceEditorSpecHelpers + include Features::SourceEditorSpecHelpers include ProjectForksHelper let(:user) { create(:user, username: 'the-maintainer') } let(:target_project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_request/user_accepts_merge_request_spec.rb b/spec/features/merge_request/user_accepts_merge_request_spec.rb index 8ff0c294b24..e3989a8a192 100644 --- a/spec/features/merge_request/user_accepts_merge_request_spec.rb +++ b/spec/features/merge_request/user_accepts_merge_request_spec.rb @@ -16,7 +16,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli it 'when merge method is set to merge commit' do visit(merge_request_path(merge_request)) - click_button('Merge') + click_merge_button puts merge_request.short_merged_commit_sha @@ -31,7 +31,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli visit(merge_request_path(merge_request)) - click_button('Merge') + click_merge_button expect(page).to have_content("Changes merged into #{merge_request.target_branch} with #{merge_request.short_merged_commit_sha}") end @@ -41,7 +41,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli visit(merge_request_path(merge_request)) - click_button('Merge') + click_merge_button expect(page).to have_content("Changes merged into #{merge_request.target_branch} with #{merge_request.short_merged_commit_sha}") end @@ -55,7 +55,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli it 'accepts a merge request' do check('Delete source branch') - click_button('Merge') + click_merge_button expect(page).to have_content('Changes merged into') expect(page).not_to have_selector('.js-remove-branch-button') @@ -72,7 +72,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli end it 'accepts a merge request' do - click_button('Merge') + click_merge_button expect(page).to have_content('Changes merged into') expect(page).to have_selector('.js-remove-branch-button') @@ -90,7 +90,7 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli it 'accepts a merge request' do check('Delete source branch') - click_button('Merge') + click_merge_button expect(page).to have_content('Changes merged into') expect(page).not_to have_selector('.js-remove-branch-button') @@ -112,9 +112,15 @@ RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inli find('[data-testid="widget_edit_commit_message"]').click fill_in('merge-message-edit', with: 'wow such merge') - click_button('Merge') + click_merge_button expect(page).to have_selector('.gl-badge', text: 'Merged') end end + + def click_merge_button + page.within('.mr-state-widget') do + click_button 'Merge' + end + end end diff --git a/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb b/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb index becbf0ccfa7..faef4f6f517 100644 --- a/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb +++ b/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'Merge request > User edits assignees sidebar', :js, feature_category: :code_review_workflow do - include Spec::Support::Helpers::Features::InviteMembersModalHelper + include Features::InviteMembersModalHelpers let(:project) { create(:project, :public, :repository) } let(:protected_branch) { create(:protected_branch, :maintainers_can_push, name: 'master', project: project) } diff --git a/spec/features/merge_request/user_edits_merge_request_spec.rb b/spec/features/merge_request/user_edits_merge_request_spec.rb index 839081d00dc..584a17ae33d 100644 --- a/spec/features/merge_request/user_edits_merge_request_spec.rb +++ b/spec/features/merge_request/user_edits_merge_request_spec.rb @@ -108,4 +108,6 @@ RSpec.describe 'User edits a merge request', :js, feature_category: :code_review end end end + + it_behaves_like 'edits content using the content editor' end diff --git a/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb b/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb index cdc00017ab3..19b5ad0fa84 100644 --- a/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb +++ b/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb @@ -13,11 +13,29 @@ RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js, fea context 'project does not have CI enabled' do it 'allows MR to be merged' do + stub_feature_flags(auto_merge_labels_mr_widget: false) + visit project_merge_request_path(project, merge_request) wait_for_requests - expect(page).to have_button 'Merge' + page.within('.mr-state-widget') do + expect(page).to have_button 'Merge' + end + end + end + + context 'project does not have CI enabled and auto_merge_labels_mr_widget on' do + it 'allows MR to be merged' do + stub_feature_flags(auto_merge_labels_mr_widget: true) + + visit project_merge_request_path(project, merge_request) + + wait_for_requests + + page.within('.mr-state-widget') do + expect(page).to have_button 'Merge' + end end end @@ -33,6 +51,8 @@ RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js, fea context 'when merge requests can only be merged if the pipeline succeeds' do before do project.update_attribute(:only_allow_merge_if_pipeline_succeeds, true) + + stub_feature_flags(auto_merge_labels_mr_widget: false) end context 'when CI is running' do @@ -56,7 +76,78 @@ RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js, fea wait_for_requests - expect(page).not_to have_button('Merge') + expect(page).not_to have_button('Merge', exact: true) + expect(page).to have_content('Merge blocked: pipeline must succeed. Push a commit that fixes the failure or learn about other solutions.') + end + end + + context 'when CI canceled' do + let(:status) { :canceled } + + it 'does not allow MR to be merged' do + visit project_merge_request_path(project, merge_request) + + wait_for_requests + + expect(page).not_to have_button('Merge', exact: true) + expect(page).to have_content('Merge blocked: pipeline must succeed. Push a commit that fixes the failure or learn about other solutions.') + end + end + + context 'when CI succeeded' do + let(:status) { :success } + + it 'allows MR to be merged' do + visit project_merge_request_path(project, merge_request) + + wait_for_requests + + expect(page).to have_button('Merge', exact: true) + end + end + + context 'when CI skipped' do + let(:status) { :skipped } + + it 'does not allow MR to be merged' do + visit project_merge_request_path(project, merge_request) + + wait_for_requests + + expect(page).not_to have_button('Merge', exact: true) + end + end + end + + context 'when merge requests can only be merged if the pipeline succeeds with auto_merge_labels_mr_widget on' do + before do + project.update_attribute(:only_allow_merge_if_pipeline_succeeds, true) + + stub_feature_flags(auto_merge_labels_mr_widget: true) + end + + context 'when CI is running' do + let(:status) { :running } + + it 'does not allow to merge immediately' do + visit project_merge_request_path(project, merge_request) + + wait_for_requests + + expect(page).to have_button 'Set to auto-merge' + expect(page).not_to have_button '.js-merge-moment' + end + end + + context 'when CI failed' do + let(:status) { :failed } + + it 'does not allow MR to be merged' do + visit project_merge_request_path(project, merge_request) + + wait_for_requests + + expect(page).not_to have_button('Merge', exact: true) expect(page).to have_content('Merge blocked: pipeline must succeed. Push a commit that fixes the failure or learn about other solutions.') end end @@ -69,7 +160,7 @@ RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js, fea wait_for_requests - expect(page).not_to have_button 'Merge' + expect(page).not_to have_button('Merge', exact: true) expect(page).to have_content('Merge blocked: pipeline must succeed. Push a commit that fixes the failure or learn about other solutions.') end end @@ -82,7 +173,7 @@ RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js, fea wait_for_requests - expect(page).to have_button 'Merge' + expect(page).to have_button('Merge', exact: true) end end @@ -94,7 +185,7 @@ RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js, fea wait_for_requests - expect(page).not_to have_button 'Merge' + expect(page).not_to have_button('Merge', exact: true) end end end @@ -102,6 +193,8 @@ RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js, fea context 'when merge requests can be merged when the build failed' do before do project.update_attribute(:only_allow_merge_if_pipeline_succeeds, false) + + stub_feature_flags(auto_merge_labels_mr_widget: false) end context 'when CI is running' do @@ -126,8 +219,59 @@ RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js, fea visit project_merge_request_path(project, merge_request) wait_for_requests + page.within('.mr-state-widget') do + expect(page).to have_button 'Merge' + end + end + end - expect(page).to have_button 'Merge' + context 'when CI succeeded' do + let(:status) { :success } + + it 'allows MR to be merged' do + visit project_merge_request_path(project, merge_request) + + wait_for_requests + + page.within('.mr-state-widget') do + expect(page).to have_button 'Merge' + end + end + end + end + + context 'when merge requests can be merged when the build failed with auto_merge_labels_mr_widget on' do + before do + project.update_attribute(:only_allow_merge_if_pipeline_succeeds, false) + + stub_feature_flags(auto_merge_labels_mr_widget: true) + end + + context 'when CI is running' do + let(:status) { :running } + + it 'allows MR to be merged immediately' do + visit project_merge_request_path(project, merge_request) + + wait_for_requests + + expect(page).to have_button 'Set to auto-merge' + + page.find('.js-merge-moment').click + expect(page).to have_content 'Merge immediately' + end + end + + context 'when CI failed' do + let(:status) { :failed } + + it 'allows MR to be merged' do + visit project_merge_request_path(project, merge_request) + + wait_for_requests + page.within('.mr-state-widget') do + expect(page).to have_button 'Merge' + end end end @@ -139,7 +283,9 @@ RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js, fea wait_for_requests - expect(page).to have_button 'Merge' + page.within('.mr-state-widget') do + expect(page).to have_button 'Merge' + end end end end diff --git a/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb b/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb index 6d2c8f15a82..28a994545bd 100644 --- a/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb +++ b/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb @@ -26,6 +26,8 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js, featur context 'when there is active pipeline for merge request' do before do create(:ci_build, pipeline: pipeline) + stub_feature_flags(auto_merge_labels_mr_widget: false) + sign_in(user) visit project_merge_request_path(project, merge_request) end @@ -98,6 +100,69 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js, featur end end + context 'when there is active pipeline for merge request with auto_merge_labels_mr_widget on' do + before do + create(:ci_build, pipeline: pipeline) + stub_feature_flags(auto_merge_labels_mr_widget: true) + + sign_in(user) + visit project_merge_request_path(project, merge_request) + end + + describe 'enabling Merge when pipeline succeeds' do + shared_examples 'Set to auto-merge activator' do + it 'activates the Merge when pipeline succeeds feature' do + click_button "Set to auto-merge" + + expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds" + expect(page).to have_content "Source branch will not be deleted" + expect(page).to have_selector ".js-cancel-auto-merge" + visit project_merge_request_path(project, merge_request) # Needed to refresh the page + expect(page).to have_content /enabled an automatic merge when the pipeline for \h{8} succeeds/i + end + end + + context "when enabled immediately" do + it_behaves_like 'Set to auto-merge activator' + end + + context 'when enabled after it was previously canceled' do + before do + click_button "Set to auto-merge" + + wait_for_requests + + click_button "Cancel auto-merge" + + wait_for_requests + + expect(page).to have_content 'Set to auto-merge' + end + + it_behaves_like 'Set to auto-merge activator' + end + + context 'when it was enabled and then canceled' do + let(:merge_request) do + create(:merge_request_with_diffs, + :merge_when_pipeline_succeeds, + source_project: project, + title: 'Bug NS-04', + author: user, + merge_user: user) + end + + before do + merge_request.merge_params['force_remove_source_branch'] = '0' + merge_request.save! + click_button "Cancel auto-merge" + end + + it_behaves_like 'Set to auto-merge activator' + end + end + end + context 'when merge when pipeline succeeds is enabled' do let(:merge_request) do create(:merge_request_with_diffs, :simple, :merge_when_pipeline_succeeds, @@ -112,6 +177,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js, featur end before do + stub_feature_flags(auto_merge_labels_mr_widget: false) sign_in user visit project_merge_request_path(project, merge_request) end @@ -177,11 +243,53 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js, featur end end + context 'when merge when pipeline succeeds is enabled and auto_merge_labels_mr_widget on' do + let(:merge_request) do + create(:merge_request_with_diffs, :simple, :merge_when_pipeline_succeeds, + source_project: project, + author: user, + merge_user: user, + title: 'MepMep') + end + + let!(:build) do + create(:ci_build, pipeline: pipeline) + end + + before do + stub_feature_flags(auto_merge_labels_mr_widget: true) + sign_in user + visit project_merge_request_path(project, merge_request) + end + + it 'allows to cancel the automatic merge' do + click_button "Cancel auto-merge" + + expect(page).to have_button "Set to auto-merge" + + refresh + + expect(page).to have_content "canceled the automatic merge" + end + end + context 'when pipeline is not active' do it 'does not allow to enable merge when pipeline succeeds' do + stub_feature_flags(auto_merge_labels_mr_widget: false) + visit project_merge_request_path(project, merge_request) expect(page).not_to have_link 'Merge when pipeline succeeds' end end + + context 'when pipeline is not active and auto_merge_labels_mr_widget on' do + it 'does not allow to enable merge when pipeline succeeds' do + stub_feature_flags(auto_merge_labels_mr_widget: true) + + visit project_merge_request_path(project, merge_request) + + expect(page).not_to have_link 'Set to auto-merge' + end + end end diff --git a/spec/features/merge_request/user_resolves_conflicts_spec.rb b/spec/features/merge_request/user_resolves_conflicts_spec.rb index 7b1afd786f7..0f283f1194f 100644 --- a/spec/features/merge_request/user_resolves_conflicts_spec.rb +++ b/spec/features/merge_request/user_resolves_conflicts_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'Merge request > User resolves conflicts', :js, feature_category: :code_review_workflow do - include Spec::Support::Helpers::Features::SourceEditorSpecHelpers + include Features::SourceEditorSpecHelpers let(:project) { create(:project, :repository) } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_reverts_merge_request_spec.rb b/spec/features/merge_request/user_reverts_merge_request_spec.rb index e09a4569caf..da48a31abbd 100644 --- a/spec/features/merge_request/user_reverts_merge_request_spec.rb +++ b/spec/features/merge_request/user_reverts_merge_request_spec.rb @@ -13,7 +13,9 @@ RSpec.describe 'User reverts a merge request', :js, feature_category: :code_revi visit(merge_request_path(merge_request)) - click_button('Merge') + page.within('.mr-state-widget') do + click_button 'Merge' + end wait_for_requests diff --git a/spec/features/merge_request/user_sees_diff_spec.rb b/spec/features/merge_request/user_sees_diff_spec.rb index 12fdcf4859e..3fb3ef12fcc 100644 --- a/spec/features/merge_request/user_sees_diff_spec.rb +++ b/spec/features/merge_request/user_sees_diff_spec.rb @@ -60,7 +60,7 @@ RSpec.describe 'Merge request > User sees diff', :js, feature_category: :code_re visit diffs_project_merge_request_path(project, merge_request) page.within('.gl-alert') do - expect(page).to have_text("Too many changes to show. To preserve performance only 3 of 3+ files are displayed. Plain diff Email patch") + expect(page).to have_text("Some changes are not shown. For a faster browsing experience, only 3 of 3+ files are shown. Download one of the files below to see all changes. Plain diff Patches") end end end diff --git a/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb b/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb index b83580565e4..476be5ab599 100644 --- a/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb +++ b/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb @@ -21,7 +21,7 @@ feature_category: :code_review_workflow do context 'with unresolved threads' do it 'does not allow to merge' do - expect(page).not_to have_button 'Merge' + expect(page).not_to have_button('Merge', exact: true) expect(page).to have_content('all threads must be resolved') end end @@ -33,7 +33,7 @@ feature_category: :code_review_workflow do end it 'allows MR to be merged' do - expect(page).to have_button 'Merge' + expect(page).to have_button('Merge', exact: true) end end end @@ -46,7 +46,7 @@ feature_category: :code_review_workflow do context 'with unresolved threads' do it 'does not allow to merge' do - expect(page).to have_button 'Merge' + expect(page).to have_button('Merge', exact: true) end end @@ -57,7 +57,7 @@ feature_category: :code_review_workflow do end it 'allows MR to be merged' do - expect(page).to have_button 'Merge' + expect(page).to have_button('Merge', exact: true) end end end diff --git a/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb b/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb index 458746f0854..7d024103943 100644 --- a/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb +++ b/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb @@ -56,6 +56,8 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', end before do + stub_feature_flags(auto_merge_labels_mr_widget: false) + visit project_merge_request_path(project, merge_request) page.within('.merge-request-tabs') do @@ -185,6 +187,48 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', end end + context 'when a user created a merge request in the parent project with auto_merge_labels_mr_widget on' do + before do + stub_feature_flags(auto_merge_labels_mr_widget: true) + + visit project_merge_request_path(project, merge_request) + + page.within('.merge-request-tabs') do + click_link('Pipelines') + end + end + + context 'when a user merges a merge request in the parent project', :sidekiq_might_not_need_inline do + before do + click_link 'Overview' + click_button 'Set to auto-merge' + + wait_for_requests + end + + context 'when detached merge request pipeline is pending' do + it 'waits the head pipeline' do + expect(page).to have_content('to be merged automatically when the pipeline succeeds') + expect(page).to have_button('Cancel auto-merge') + end + end + + context 'when branch pipeline succeeds' do + before do + click_link 'Overview' + push_pipeline.reload.succeed! + + wait_for_requests + end + + it 'waits the head pipeline' do + expect(page).to have_content('to be merged automatically when the pipeline succeeds') + expect(page).to have_button('Cancel auto-merge') + end + end + end + end + context 'when there are no `merge_requests` keyword in .gitlab-ci.yml' do let(:config) do { @@ -244,6 +288,8 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', before do forked_project.add_maintainer(user2) + stub_feature_flags(auto_merge_labels_mr_widget: false) + visit project_merge_request_path(project, merge_request) page.within('.merge-request-tabs') do diff --git a/spec/features/merge_request/user_sees_merge_widget_spec.rb b/spec/features/merge_request/user_sees_merge_widget_spec.rb index acf2893b513..eb293fbbd20 100644 --- a/spec/features/merge_request/user_sees_merge_widget_spec.rb +++ b/spec/features/merge_request/user_sees_merge_widget_spec.rb @@ -396,7 +396,9 @@ RSpec.describe 'Merge request > User sees merge widget', :js, feature_category: end it 'updates the MR widget', :sidekiq_might_not_need_inline do - click_button 'Merge' + page.within('.mr-state-widget') do + click_button 'Merge' + end expect(page).to have_content('An error occurred while merging') end @@ -452,7 +454,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js, feature_category: wait_for_requests - expect(page).not_to have_button('Merge') + expect(page).not_to have_button('Merge', exact: true) expect(page).to have_content('Merging!') end end diff --git a/spec/features/merge_request/user_uses_quick_actions_spec.rb b/spec/features/merge_request/user_uses_quick_actions_spec.rb index 1a88918da65..1ec86948065 100644 --- a/spec/features/merge_request/user_uses_quick_actions_spec.rb +++ b/spec/features/merge_request/user_uses_quick_actions_spec.rb @@ -9,7 +9,7 @@ require 'spec_helper' # for each existing quick action unless they test something not tested by existing tests. RSpec.describe 'Merge request > User uses quick actions', :js, :use_clean_rails_redis_caching, feature_category: :code_review_workflow do - include Spec::Support::Helpers::Features::NotesHelpers + include Features::NotesHelpers let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_views_open_merge_request_spec.rb b/spec/features/merge_request/user_views_open_merge_request_spec.rb index afa57cb0f8f..095607b61fb 100644 --- a/spec/features/merge_request/user_views_open_merge_request_spec.rb +++ b/spec/features/merge_request/user_views_open_merge_request_spec.rb @@ -56,25 +56,25 @@ RSpec.describe 'User views an open merge request', feature_category: :code_revie end it 'renders empty description preview' do - find('.gfm-form').fill_in(:merge_request_description, with: '') + fill_in(:merge_request_description, with: '') - page.within('.gfm-form') do - click_button('Preview') + page.within('.js-vue-markdown-field') do + click_link('Preview') - expect(find('.js-md-preview')).to have_content('Nothing to preview.') + expect(find('.js-vue-md-preview')).to have_content('Nothing to preview.') end end it 'renders description preview' do - find('.gfm-form').fill_in(:merge_request_description, with: ':+1: Nice') + fill_in(:merge_request_description, with: ':+1: Nice') - page.within('.gfm-form') do - click_button('Preview') + page.within('.js-vue-markdown-field') do + click_link('Preview') - expect(find('.js-md-preview')).to have_css('gl-emoji') + expect(find('.js-vue-md-preview')).to have_css('gl-emoji') end - expect(find('.gfm-form')).to have_css('.js-md-preview').and have_button('Write') + expect(find('.js-vue-markdown-field')).to have_css('.js-vue-md-preview').and have_link('Write') expect(find('#merge_request_description', visible: false)).not_to be_visible end end |