Commit 43197387 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'dd-qa-ambiguous-pageobject-cleanup-1' into 'master'

Refactor ambiguous page-object names

See merge request gitlab-org/gitlab!20392
parents e36c32c4 5d43c09d
...@@ -86,13 +86,13 @@ module QA ...@@ -86,13 +86,13 @@ module QA
project.visit! project.visit!
Page::Project::Menu.perform(&:go_to_members_settings) Page::Project::Menu.perform(&:go_to_members_settings)
Page::Project::Settings::Members.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName Page::Project::Settings::Members.perform do |members|
page.invite_group(@group.path) members.invite_group(@group.path)
end end
Page::Project::Menu.perform(&:go_to_members_settings) Page::Project::Menu.perform(&:go_to_members_settings)
Page::Project::Settings::Members.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName Page::Project::Settings::Members.perform do |members|
page.remove_group(@group.path) members.remove_group(@group.path)
end end
@group.visit! @group.visit!
......
...@@ -68,10 +68,10 @@ module QA ...@@ -68,10 +68,10 @@ module QA
Page::Group::Menu.perform(&:go_to_ldap_sync_settings) Page::Group::Menu.perform(&:go_to_ldap_sync_settings)
EE::Page::Group::Settings::LDAPSync.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName EE::Page::Group::Settings::LDAPSync.perform do |settings|
page.set_sync_method('LDAP Group cn') settings.set_sync_method('LDAP Group cn')
page.set_group_cn('Engineering') settings.set_group_cn('Engineering')
page.click_add_sync_button settings.click_add_sync_button
end end
Page::Group::Menu.perform(&:click_group_members_item) Page::Group::Menu.perform(&:click_group_members_item)
...@@ -118,9 +118,9 @@ module QA ...@@ -118,9 +118,9 @@ module QA
Page::Group::Menu.perform(&:go_to_ldap_sync_settings) Page::Group::Menu.perform(&:go_to_ldap_sync_settings)
EE::Page::Group::Settings::LDAPSync.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName EE::Page::Group::Settings::LDAPSync.perform do |settings|
page.set_user_filter('(&(objectClass=person)(cn=HR*))') settings.set_user_filter('(&(objectClass=person)(cn=HR*))')
page.click_add_sync_button settings.click_add_sync_button
end end
Page::Group::Menu.perform(&:click_group_members_item) Page::Group::Menu.perform(&:click_group_members_item)
...@@ -171,10 +171,10 @@ module QA ...@@ -171,10 +171,10 @@ module QA
end end
def verify_users_synced(expected_users) def verify_users_synced(expected_users)
EE::Page::Group::Members.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName EE::Page::Group::Members.perform do |members|
page.click_sync_now members.click_sync_now
users_synchronised = page.retry_until(reload: true) do users_synchronised = members.retry_until(reload: true) do
expected_users.map { |user| page.has_content?(user) }.all? expected_users.map { |user| members.has_content?(user) }.all?
end end
expect(users_synchronised).to be_truthy expect(users_synchronised).to be_truthy
end end
......
...@@ -40,8 +40,8 @@ module QA ...@@ -40,8 +40,8 @@ module QA
@project.visit! @project.visit!
Page::Project::Menu.perform(&:go_to_members_settings) Page::Project::Menu.perform(&:go_to_members_settings)
Page::Project::Settings::Members.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName Page::Project::Settings::Members.perform do |members|
page.add_member(user.username) members.add_member(user.username)
end end
end end
......
...@@ -115,8 +115,8 @@ module QA ...@@ -115,8 +115,8 @@ module QA
it 'displays security reports in the group security dashboard' do it 'displays security reports in the group security dashboard' do
Page::Main::Menu.perform(&:go_to_groups) Page::Main::Menu.perform(&:go_to_groups)
Page::Dashboard::Groups.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName Page::Dashboard::Groups.perform do |groups|
page.click_group @project.group.path groups.click_group @project.group.path
end end
Page::Group::Menu.perform(&:click_group_security_link) Page::Group::Menu.perform(&:click_group_security_link)
...@@ -144,8 +144,8 @@ module QA ...@@ -144,8 +144,8 @@ module QA
it 'displays the Dependency List' do it 'displays the Dependency List' do
Page::Project::Menu.perform(&:click_on_dependency_list) Page::Project::Menu.perform(&:click_on_dependency_list)
EE::Page::Project::Secure::DependencyList.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName EE::Page::Project::Secure::DependencyList.perform do |dependency_list|
expect(page).to have_dependency_count_of number_of_dependencies_in_fixture expect(dependency_list).to have_dependency_count_of number_of_dependencies_in_fixture
end end
end end
end end
......
...@@ -32,9 +32,9 @@ module QA ...@@ -32,9 +32,9 @@ module QA
token_name = 'api-test-token' token_name = 'api-test-token'
Page::Profile::PersonalAccessTokens.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName Page::Profile::PersonalAccessTokens.perform do |tokens_page|
while page.has_token_row_for_name?(token_name) while tokens_page.has_token_row_for_name?(token_name)
page.revoke_first_token_with_name(token_name) tokens_page.revoke_first_token_with_name(token_name)
print "\e[32m.\e[0m" print "\e[32m.\e[0m"
end end
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