Sha256: def23d642128f39a8b4545f98da14d34fbd00d54d1395c1a098d9e1899ac641c

Contents?: true

Size: 1.34 KB

Versions: 25

Compression:

Stored size: 1.34 KB

Contents

describe Card::Set::Abstract::Filter do
  subject do
    search_card = Card.new type: "Search"
    search_card.format.filter_form a: { input_field: "<input id='a'/>", label: "A" },
                                   b: { input_field: "<select id='b'/>", label: "B" },
                                   c: { input_field: "<select id='c'/>", label: "C",
                                        active: true }
  end

  specify "#filter_form" do
    is_expected.to have_tag "._filter-widget" do
      with_tag "div._filter-input-field-prototypes" do
        with_tag "div._filter-input-field.a" do
          with_tag "input#a"
        end
        with_tag "div._filter-input-field.b" do
          with_tag "select#b"
        end
        with_tag "div._filter-input-field.c" do
          without_tag "select"
        end
      end

      with_tag "div._filter-container" do
        with_tag "div.input-group" do
          with_tag "span._selected-category", text: /C/
          with_tag "select#c"
        end
      end

      with_tag "div.dropdown._add-filter-dropdown" do
        with_tag "a.dropdown-item", with: { "data-category": "a" }
        with_tag "a.dropdown-item", with: { "data-category": "b" }
        with_tag "a.dropdown-item", with: { "data-category": "c",
                                            style: "display: none;" }
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
card-1.97.0.1 mod/search/spec/set/abstract/filter_spec.rb
card-1.97.0 mod/search/spec/set/abstract/filter_spec.rb
card-1.96.8 mod/search/spec/set/abstract/filter_spec.rb
card-1.96.7 mod/search/spec/set/abstract/filter_spec.rb
card-1.96.6 mod/search/spec/set/abstract/filter_spec.rb
card-1.96.5 mod/search/spec/set/abstract/filter_spec.rb
card-1.96.4 mod/search/spec/set/abstract/filter_spec.rb
card-1.96.3 mod/search/spec/set/abstract/filter_spec.rb
card-1.96.2 mod/search/spec/set/abstract/filter_spec.rb
card-1.96.1 mod/search/spec/set/abstract/filter_spec.rb
card-1.96.0 mod/search/spec/set/abstract/filter_spec.rb
card-1.95.3 mod/search/spec/set/abstract/filter_spec.rb
card-1.95.2 mod/search/spec/set/abstract/filter_spec.rb
card-1.95.1 mod/search/spec/set/abstract/filter_spec.rb
card-1.95.0 mod/search/spec/set/abstract/filter_spec.rb
card-1.94.1 mod/search/spec/set/abstract/filter_spec.rb
card-1.94.0 mod/search/spec/set/abstract/filter_spec.rb
card-1.93.13 mod/search/spec/set/abstract/filter_spec.rb
card-1.93.12 mod/search/spec/set/abstract/filter_spec.rb
card-1.93.11 mod/search/spec/set/abstract/filter_spec.rb