Sha256: dbc065c7dae284125fc1ece704233d83796d3cb2e870cfc346fe364160f2affe

Contents?: true

Size: 1.99 KB

Versions: 19

Compression:

Stored size: 1.99 KB

Contents

# frozen_string_literal: true

shared_examples "filterable participatory space users" do
  context "when filtering by invitation sent at" do
    context "when filtering by null" do
      it "returns participatory space users" do
        apply_filter("Invitation sent", "Not sent")

        within ".stack tbody" do
          expect(page).to have_content(invited_user_2.name)
          expect(page).to have_css("tr", count: 1)
        end
      end
    end

    context "when filtering by not null" do
      it "returns participatory space users" do
        apply_filter("Invitation sent", "Sent")

        within ".stack tbody" do
          expect(page).to have_content(invited_user_1.name)
          expect(page).to have_css("tr", count: 1)
        end
      end
    end
  end

  context "when filtering by invitation accepted at" do
    context "when filtering by null" do
      it "returns participatory space users" do
        apply_filter("Invitation accepted", "Not accepted")

        within ".stack tbody" do
          expect(page).to have_content(invited_user_2.name)
          expect(page).to have_css("tr", count: 1)
        end
      end
    end

    context "when filtering by not null" do
      it "returns participatory space users" do
        apply_filter("Invitation accepted", "Accepted")

        within ".stack tbody" do
          expect(page).to have_content(invited_user_1.name)
          expect(page).to have_css("tr", count: 1)
        end
      end
    end
  end
end

shared_examples "searchable participatory space users" do
  context "when searching by name or nickname or email" do
    it "can be searched by name" do
      search_by_text(name)

      within ".stack tbody" do
        expect(page).to have_content(name)
        expect(page).to have_css("tr", count: 1)
      end
    end

    it "can be searched by email" do
      search_by_text(email)

      within ".stack tbody" do
        expect(page).to have_content(email)
        expect(page).to have_css("tr", count: 1)
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
decidim-admin-0.26.10 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.9 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.8 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.7 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.5 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.4 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.3 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.2 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.1 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.0 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.0.rc2 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.26.0.rc1 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.25.2 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.25.1 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.25.0 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.25.0.rc4 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.25.0.rc3 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.25.0.rc2 lib/decidim/admin/test/filters_participatory_space_users_examples.rb
decidim-admin-0.25.0.rc1 lib/decidim/admin/test/filters_participatory_space_users_examples.rb