Sha256: ee8d1111a16695f9129948e3e803c671814b51fdfb3d81be50f84861eee5c22c

Contents?: true

Size: 791 Bytes

Versions: 9

Compression:

Stored size: 791 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-tip" do
      click_on
    end

    within "#floating-helper-block" do
      expect(page).to have_content("Some relevant help")
      click_on
    end

    visit current_path

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

    within "#floating-helper-tip" do
      click_on
    end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
decidim-core-0.30.0.rc2 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.30.0.rc1 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.29.2 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.29.1 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.29.0 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.29.0.rc4 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.29.0.rc3 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.29.0.rc2 lib/decidim/core/test/shared_examples/has_contextual_help.rb
decidim-core-0.29.0.rc1 lib/decidim/core/test/shared_examples/has_contextual_help.rb