Commit d666310d authored by Tiffany Rea's avatar Tiffany Rea Committed by Mark Lapierre

Refactor Page::Component invite member modal actions

parent a11ba6a9
......@@ -40,18 +40,20 @@ module QA
click_element :invite_a_group_button
end
def add_member(username, access_level = Resource::Members::AccessLevel::DEVELOPER)
def add_member(username, access_level = 'Developer')
open_invite_members_modal
within_element(:invite_members_modal_content) do
fill_element :access_level_dropdown, with: access_level
fill_element :members_token_select_input, username
Support::WaitForRequests.wait_for_requests
click_button username
# Guest option is selected by default, skipping these steps if desired option is 'Guest'
unless access_level == 'Guest'
click_element :access_level_dropdown
click_button access_level
end
click_element :invite_button
end
......
......@@ -92,7 +92,7 @@ module QA
group.visit!
Page::Group::Menu.perform(&:click_group_members_item)
Page::Group::Members.perform do |members_page|
members_page.add_member(user.username)
members_page.add_member(user.username, 'Guest')
members_page.update_access_level(user.username, "Developer")
members_page.remove_member(user.username)
end
......
......@@ -44,7 +44,7 @@ module QA
Page::Project::Menu.perform(&:click_members)
Page::Project::Members.perform do |members|
members.add_member(user.username)
members.add_member(user.username, 'Guest')
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment