summaryrefslogtreecommitdiff
path: root/spec/support/helpers/features/blob_spec_helpers.rb
blob: 8254e1d76bdf2b00b532e485700786d389f74c70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

module Features
  # These helpers help you interact within the blobs page and blobs edit page (Single file editor).
  module BlobSpecHelpers
    include ActionView::Helpers::JavaScriptHelper

    def set_default_button(type)
      evaluate_script("localStorage.setItem('gl-web-ide-button-selected', '#{type}')")
    end

    def unset_default_button
      set_default_button('')
    end
  end
end