mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:04:02 +08:00
26 lines
770 B
Ruby
26 lines
770 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe "Group members", type: :system do
|
|
let(:group_page) { PageObjects::Pages::Group.new }
|
|
fab!(:admin) { Fabricate(:admin) }
|
|
fab!(:group) { Fabricate(:group) }
|
|
|
|
before { sign_in(admin) }
|
|
|
|
describe "adds a user to the group" do
|
|
it "should show that the user is already in the group" do
|
|
group_page.visit(group).add_users.select_user_and_add(admin)
|
|
|
|
expect(
|
|
group_page.find(".group-members .directory-table__cell--username.group-member .username"),
|
|
).to have_text(admin.username)
|
|
|
|
group_page.add_users.select_user_and_add(admin)
|
|
|
|
expect(page.find(".modal-container #modal-alert")).to have_text(
|
|
"'#{admin.username}' is already a member of this group",
|
|
)
|
|
end
|
|
end
|
|
end
|