Sha256: 92667217b28599d97bf0e07007693615d2a5694192fe1f05a9b921364851abd8

Contents?: true

Size: 1.12 KB

Versions: 8

Compression:

Stored size: 1.12 KB

Contents

# -*- coding: utf-8 -*-
# frozen_string_literal: true

require "spec_helper"

describe "Admin manage user groups", type: :feature do
  include_context "participatory process admin"
  let!(:user_groups) { create_list(:user_group, 10, users: [create(:user, organization: organization)]) }

  before do
    switch_to_host(organization.host)
    login_as user, scope: :user
    visit decidim_admin.user_groups_path
  end

  let(:user_group) { user_groups.first }

  it "verifies a user group" do
    within "tr[data-user-group-id=\"#{user_group.id}\"]" do
      page.find(".action-icon--verify", match: :first).click
    end

    expect(page).to have_content("verified successfully")

    within "tr[data-user-group-id=\"#{user_group.id}\"]" do
      expect(page).to have_content("Verified")
    end
  end

  it "reject a user group" do
    within "tr[data-user-group-id=\"#{user_group.id}\"]" do
      page.find(".action-icon--reject", match: :first).click
    end

    expect(page).to have_content("rejected successfully")

    within "tr[data-user-group-id=\"#{user_group.id}\"]" do
      expect(page).to have_content("Rejected")
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-0.4.3 decidim-admin/spec/features/admin_manages_user_groups_spec.rb
decidim-0.4.2 decidim-admin/spec/features/admin_manages_user_groups_spec.rb
decidim-0.4.1 decidim-admin/spec/features/admin_manages_user_groups_spec.rb
decidim-0.4.0 decidim-admin/spec/features/admin_manages_user_groups_spec.rb
decidim-0.3.2 decidim-admin/spec/features/admin_manages_user_groups_spec.rb
decidim-0.3.1 decidim-admin/spec/features/admin_manages_user_groups_spec.rb
decidim-0.3.0 decidim-admin/spec/features/admin_manages_user_groups_spec.rb
decidim-0.2.0 decidim-admin/spec/features/admin_manages_user_groups_spec.rb