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>2022-05-17 15:08:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-17 15:08:06 +0300
commitf0a387b4a5f08d6739894455664b4d3cb1509cc6 (patch)
tree3c5b144fbb894189dfb9a61e47c53c54af4415f4 /qa
parent91c2554bcf93c3c41aa830da4dd7a2d4b7483e2d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/component/blob_content.rb11
-rw-r--r--qa/qa/page/file/form.rb3
-rw-r--r--qa/qa/page/main/login.rb9
3 files changed, 22 insertions, 1 deletions
diff --git a/qa/qa/page/component/blob_content.rb b/qa/qa/page/component/blob_content.rb
index ce743b24dda..c2a1687ccfc 100644
--- a/qa/qa/page/component/blob_content.rb
+++ b/qa/qa/page/component/blob_content.rb
@@ -63,6 +63,17 @@ module QA
end
end
+ def has_normalized_ws_text?(text, wait: Capybara.default_max_wait_time)
+ if has_element?(:blob_viewer_file_content, wait: 1)
+ # The blob viewer renders line numbers and whitespace in a way that doesn't match the source file
+ # This isn't a visual validation test, so we ignore line numbers and whitespace
+ find_element(:blob_viewer_file_content, wait: 0).text.gsub(/^\d+\s|\s*/, '')
+ .start_with?(text.gsub(/\s*/, ''))
+ else
+ has_text?(text.gsub(/\s+/, " "), wait: wait)
+ end
+ end
+
def click_copy_file_contents(file_number = nil)
within_file_by_number(:default_actions_container, file_number) { click_element(:copy_contents_button) }
end
diff --git a/qa/qa/page/file/form.rb b/qa/qa/page/file/form.rb
index a6251f185f9..bb8934db498 100644
--- a/qa/qa/page/file/form.rb
+++ b/qa/qa/page/file/form.rb
@@ -4,8 +4,9 @@ module QA
module Page
module File
class Form < Page::Base
- include Shared::CommitMessage
include Page::Component::DropdownFilter
+ include Page::Component::BlobContent
+ include Shared::CommitMessage
include Shared::CommitButton
include Shared::Editor
diff --git a/qa/qa/page/main/login.rb b/qa/qa/page/main/login.rb
index 30d1895781a..f3ee627c41e 100644
--- a/qa/qa/page/main/login.rb
+++ b/qa/qa/page/main/login.rb
@@ -133,6 +133,14 @@ module QA
has_css?('[name="arkose_labs_token"][value]', visible: false)
end
+ def has_accept_all_cookies_button?
+ has_button?('Accept All Cookies')
+ end
+
+ def click_accept_all_cookies
+ click_button('Accept All Cookies')
+ end
+
def switch_to_sign_in_tab
click_element :sign_in_tab
end
@@ -179,6 +187,7 @@ module QA
fill_element :password_field, user.password
if Runtime::Env.running_on_dot_com?
+ click_accept_all_cookies if has_accept_all_cookies_button?
# Arkose only appears in staging.gitlab.com, gitlab.com, etc...
# Wait until the ArkoseLabs challenge has initialized