debian-mirror-gitlab/spec/support/helpers/features/blob_spec_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
428 B
Ruby
Raw Normal View History

2021-01-03 14:25:43 +05:30
# frozen_string_literal: true
2023-06-20 00:43:36 +05:30
module Features
# These helpers help you interact within the blobs page and blobs edit page (Single file editor).
module BlobSpecHelpers
include ActionView::Helpers::JavaScriptHelper
2021-01-03 14:25:43 +05:30
2023-06-20 00:43:36 +05:30
def set_default_button(type)
evaluate_script("localStorage.setItem('gl-web-ide-button-selected', '#{type}')")
end
2021-01-03 14:25:43 +05:30
2023-06-20 00:43:36 +05:30
def unset_default_button
set_default_button('')
end
2021-01-03 14:25:43 +05:30
end
end