Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-25 09:12:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-25 09:12:46 +0300
commit8d2c267efcdb6adbf69ce60d84ad7a73b18a5eb6 (patch)
tree73a25e3d9c5441e4ce70ae82f6d0697a1872d7d6 /qa
parent2a6724602aebe899c405c84d1b309558c25b18f7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/component/blob_content.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/qa/qa/page/component/blob_content.rb b/qa/qa/page/component/blob_content.rb
index 92763195c74..4d36a6dcefe 100644
--- a/qa/qa/page/component/blob_content.rb
+++ b/qa/qa/page/component/blob_content.rb
@@ -74,8 +74,11 @@ module QA
end
def within_file_by_number(element, file_number)
- method = file_number ? 'within_element_by_index' : 'within_element'
- send(method, element, file_number) { yield }
+ if file_number
+ within_element_by_index(element, file_number - 1) { yield }
+ else
+ within_element(element) { yield }
+ end
end
end
end