Sha256: 68e2b9b0db580d9d14136f5446ea6409a8199a70587088a3ea3f4ab14957cb37

Contents?: true

Size: 755 Bytes

Versions: 58

Compression:

Stored size: 755 Bytes

Contents

# frozen_string_literal: true

shared_examples "shows contextual help" do
  before do
    Decidim::ContextualHelpSection.set_content(
      organization,
      manifest_name,
      en: "<p>Some relevant help</p>"
    )
  end

  it "shows the contextual help on the root path on first visit, hides it on subsequent ones" do
    visit index_path

    within ".floating-helper-container" do
      expect(page).to have_content("Some relevant help")
      find(".floating-helper__content-close").click
    end

    visit current_path

    expect(page).to have_no_content("Some relevant help")

    find(".floating-helper__text").click

    within ".floating-helper__content" do
      expect(page).to have_css("p", text: "Some relevant help")
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
decidim-core-0.27.9 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.8 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.7 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.6 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.26.10 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.26.9 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.5 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.26.8 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.4 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.3 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.26.7 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.26.5 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.2 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.1 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.26.4 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.0 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.26.3 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.0.rc2 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.27.0.rc1 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.26.2 lib/decidim/core/test/shared_examples/has_contextual_help.rb