Commit 030a15cd authored by Tomas Vik's avatar Tomas Vik

Remove unused web_ide_default feature flag

This flag has been introduced over a year ago in
https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/25171
and hasn't been turned on since. This cleanup removes it in favour
of testing different button highlighting.
parent faca8aaf
......@@ -52,13 +52,12 @@ module BlobHelper
edit_button_tag(blob,
common_classes,
_('Edit'),
Feature.enabled?(:web_ide_default) ? ide_edit_path(project, ref, path) : edit_blob_path(project, ref, path, options),
edit_blob_path(project, ref, path, options),
project,
ref)
end
def ide_edit_button(project = @project, ref = @ref, path = @path, blob:)
return if Feature.enabled?(:web_ide_default)
return unless blob
edit_button_tag(blob,
......
......@@ -26,14 +26,10 @@ class DiffFileBaseEntity < Grape::Entity
target_project, target_branch = edit_project_branch_options(merge_request)
if Feature.enabled?(:web_ide_default)
ide_edit_path(target_project, target_branch, diff_file.new_path)
else
options = merge_request.persisted? && merge_request.source_branch_exists? && !merge_request.merged? ? { from_merge_request_iid: merge_request.iid } : {}
project_edit_blob_path(target_project, tree_join(target_branch, diff_file.new_path), options)
end
end
expose :old_path_html do |diff_file|
old_path, _ = mark_inline_diffs(diff_file.old_path, diff_file.new_path)
......
......@@ -20,7 +20,7 @@ RSpec.describe 'a maintainer edits files on a source-branch of an MR from a fork
end
before do
stub_feature_flags(web_ide_default: false, single_mr_diff_view: false)
stub_feature_flags(single_mr_diff_view: false)
target_project.add_maintainer(user)
sign_in(user)
......
......@@ -11,10 +11,6 @@ RSpec.describe 'Editing file blob', :js do
let(:file_path) { project.repository.ls_files(project.repository.root_ref)[1] }
let(:readme_file_path) { 'README.md' }
before do
stub_feature_flags(web_ide_default: false)
end
context 'as a developer' do
let(:user) { create(:user) }
let(:role) { :developer }
......
......@@ -14,8 +14,6 @@ RSpec.describe 'Projects > Files > User creates files', :js do
let(:user) { create(:user) }
before do
stub_feature_flags(web_ide_default: false)
project.add_maintainer(user)
sign_in(user)
end
......
......@@ -11,8 +11,6 @@ RSpec.describe 'Projects > Files > User edits files', :js do
let(:user) { create(:user) }
before do
stub_feature_flags(web_ide_default: false)
sign_in(user)
end
......
......@@ -53,20 +53,12 @@ RSpec.describe BlobHelper do
end
it 'returns a link with the proper route' do
stub_feature_flags(web_ide_default: false)
link = helper.edit_blob_button(project, 'master', 'README.md')
expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/-/edit/master/README.md")
end
it 'returns a link with a Web IDE route' do
link = helper.edit_blob_button(project, 'master', 'README.md')
expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/-/ide/project/#{project.full_path}/edit/master/-/README.md")
end
it 'returns a link with the passed link_opts on the expected route' do
stub_feature_flags(web_ide_default: false)
link = helper.edit_blob_button(project, 'master', 'README.md', link_opts: { mr_id: 10 })
expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/-/edit/master/README.md?mr_id=10")
......
......@@ -40,10 +40,6 @@ RSpec.describe DiffFileBaseEntity do
let(:options) { { request: EntityRequest.new(current_user: create(:user)), merge_request: merge_request } }
let(:params) { {} }
before do
stub_feature_flags(web_ide_default: false)
end
shared_examples 'a diff file edit path to the source branch' do
it do
expect(entity[:edit_path]).to eq(Gitlab::Routing.url_helpers.project_edit_blob_path(project, File.join(merge_request.source_branch, diff_file.new_path), params))
......
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