Sha256: 298cd4a08617af117cad8cc48dce62a377aebb4803927b75dfb0b9c8e3682911

Contents?: true

Size: 1.08 KB

Versions: 61

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

require "spec_helper"

shared_examples_for "space cell changes button text CTA" do
  describe "within the card footer" do
    context "when it has no components" do
      it "renders 'More info' in the CTA button text" do
        expect(subject).to have_selector(".card__footer--spaces .card__button", text: "More info")
      end
    end

    context "when it has a component" do
      context "and it is not published" do
        let!(:component) { create(:component, :unpublished, manifest_name: "dummy", participatory_space: model) }

        it "renders 'More info' in the CTA button text" do
          expect(subject).to have_selector(".card__footer--spaces .card__button", text: "More info")
        end
      end

      context "and it is published" do
        let!(:component) { create(:component, :published, manifest_name: "dummy", participatory_space: model) }

        it "renders 'Take part' in the CTA button text" do
          expect(subject).to have_selector(".card__footer--spaces .card__button", text: "Take part")
        end
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
decidim-core-0.28.5 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.28.4 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.27.9 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.28.3 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.27.8 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.28.2 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.27.7 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.28.1 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.27.6 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.26.10 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.26.9 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.28.0 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.27.5 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.28.0.rc5 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.28.0.rc4 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.26.8 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.27.4 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.27.3 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.26.7 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb
decidim-core-0.26.5 lib/decidim/core/test/shared_examples/space_cell_changes_button_text_cta.rb