summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-17 06:06:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-17 06:06:26 +0000
commit42b933efc3384386c1991daca1a6d58160f70176 (patch)
tree31c59c87b26efd7a51b7230ddab894131dc2e0f7 /qa
parent3d67f14ecb37274f1c269c0d50b61615788c7f16 (diff)
downloadgitlab-ce-42b933efc3384386c1991daca1a6d58160f70176.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/project/settings/mirroring_repositories.rb10
-rw-r--r--qa/qa/resource/repository/project_push.rb4
2 files changed, 8 insertions, 6 deletions
diff --git a/qa/qa/page/project/settings/mirroring_repositories.rb b/qa/qa/page/project/settings/mirroring_repositories.rb
index e3afaceda80..441235afca8 100644
--- a/qa/qa/page/project/settings/mirroring_repositories.rb
+++ b/qa/qa/page/project/settings/mirroring_repositories.rb
@@ -13,8 +13,8 @@ module QA
view 'app/views/projects/mirrors/_mirror_repos.html.haml' do
element :mirror_repository_url_input
element :mirror_repository_button
- element :mirror_repository_url
- element :mirror_last_update_at
+ element :mirror_repository_url_cell
+ element :mirror_last_update_at_cell
element :mirrored_repository_row
end
@@ -64,21 +64,21 @@ module QA
wait(interval: 1) do
within_element_by_index(:mirrored_repository_row, row_index) do
- last_update = find_element(:mirror_last_update_at, wait: 0)
+ last_update = find_element(:mirror_last_update_at_cell, wait: 0)
last_update.has_text?('just now') || last_update.has_text?('seconds')
end
end
# Fail early if the page still shows that there has been no update
within_element_by_index(:mirrored_repository_row, row_index) do
- find_element(:mirror_last_update_at, wait: 0).assert_no_text('Never')
+ find_element(:mirror_last_update_at_cell, wait: 0).assert_no_text('Never')
end
end
private
def find_repository_row_index(target_url)
- all_elements(:mirror_repository_url).index do |url|
+ all_elements(:mirror_repository_url_cell).index do |url|
# The url might be a sanitized url but the target_url won't be so
# we compare just the paths instead of the full url
URI.parse(url.text).path == target_url.path
diff --git a/qa/qa/resource/repository/project_push.rb b/qa/qa/resource/repository/project_push.rb
index c84ade3a140..f79bb035c46 100644
--- a/qa/qa/resource/repository/project_push.rb
+++ b/qa/qa/resource/repository/project_push.rb
@@ -4,11 +4,12 @@ module QA
module Resource
module Repository
class ProjectPush < Repository::Push
+ attr_accessor :project_name
attr_writer :wait_for_push
attribute :project do
Project.fabricate! do |resource|
- resource.name = 'project-with-code'
+ resource.name = project_name
resource.description = 'Project with repository'
end
end
@@ -19,6 +20,7 @@ module QA
@commit_message = "This is a test commit"
@branch_name = 'master'
@new_branch = true
+ @project_name = 'project-with-code'
@wait_for_push = true
end