Sha256: a7c798c5e0a75ac8fe020e582c9750b86bff23db079cb196bc79827460d2bb35

Contents?: true

Size: 1.13 KB

Versions: 12

Compression:

Stored size: 1.13 KB

Contents

RSpec.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-a" do
          with_tag "input#a"
        end
        with_tag "div._filter-input-b" do
          with_tag "select#b"
        end
        with_tag "div._filter-input-c" do
          with_tag "select#c"
        end
      end

      with_tag "div._filter-container"

      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", "data-active": "true" }
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
card-1.100.0 mod/search/spec/set/abstract/filter_spec.rb
card-1.99.6 mod/search/spec/set/abstract/filter_spec.rb
card-1.99.5 mod/search/spec/set/abstract/filter_spec.rb
card-1.99.4 mod/search/spec/set/abstract/filter_spec.rb
card-1.99.3 mod/search/spec/set/abstract/filter_spec.rb
card-1.99.2 mod/search/spec/set/abstract/filter_spec.rb
card-1.99.1 mod/search/spec/set/abstract/filter_spec.rb
card-1.99.0 mod/search/spec/set/abstract/filter_spec.rb
card-1.98.3 mod/search/spec/set/abstract/filter_spec.rb
card-1.98.2 mod/search/spec/set/abstract/filter_spec.rb
card-1.98.1 mod/search/spec/set/abstract/filter_spec.rb
card-1.98.0 mod/search/spec/set/abstract/filter_spec.rb