Sha256: 5f124266ca290c52ed6557032fe7249738e0e886fa5fefea1a06cd7e0301fd26

Contents?: true

Size: 775 Bytes

Versions: 14

Compression:

Stored size: 775 Bytes

Contents

# frozen_string_literal: true

shared_examples "searchable results" do
  let(:organization) { create(:organization) }

  before do
    switch_to_host(organization.host)
    visit decidim.root_path
  end

  context "when searching for indexed searchables" do
    before do
      expect(searchables).not_to be_empty
      expect(term).not_to be_empty

      fill_in "term", with: term
      find("input#term").native.send_keys :enter
    end

    it "contains these searchables" do
      expect(page).to have_current_path decidim.search_path, ignore_query: true
      expect(page).to have_content(/results for the search: "#{term}"/i)
      expect(page).to have_selector(".filters__section")
      expect(page.find("#results-count").text.to_i).to be_positive
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
decidim-core-0.15.2 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.15.1 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.15.0 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.14.4 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.14.3 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.14.2 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.14.1 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.13.1 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.12.2 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.13.0 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.12.1 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.13.0.pre1 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.12.0 lib/decidim/core/test/shared_examples/searchable_results_examples.rb
decidim-core-0.12.0.pre lib/decidim/core/test/shared_examples/searchable_results_examples.rb