Welcome to mirror list, hosted at ThFree Co, Russian Federation.

listbox.rb « fixtures « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8f746f1707a79c177af25fb51823a72ae2a7f07b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'initRedirectListboxBehavior', '(JavaScript fixtures)', type: :helper do
  include JavaScriptFixturesHelpers
  include ListboxHelper

  let(:response) { @tag }

  it 'listbox/redirect_listbox.html' do
    items = [{
      value: 'foo',
      text: 'Foo',
      href: '/foo',
      arbitrary_key: 'foo xyz'
    }, {
      value: 'bar',
      text: 'Bar',
      href: '/bar',
      arbitrary_key: 'bar xyz'
    }, {
      value: 'qux',
      text: 'Qux',
      href: '/qux',
      arbitrary_key: 'qux xyz'
    }]

    @tag = helper.gl_redirect_listbox_tag(items, 'bar',
      class: %w[test-class-1 test-class-2],
      data: { placement: 'right' }
    )
  end
end