summaryrefslogtreecommitdiff
path: root/qa/qa/page/component/design_management.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 15:40:28 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 15:40:28 +0000
commitb595cb0c1dec83de5bdee18284abe86614bed33b (patch)
tree8c3d4540f193c5ff98019352f554e921b3a41a72 /qa/qa/page/component/design_management.rb
parent2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff)
downloadgitlab-ce-b595cb0c1dec83de5bdee18284abe86614bed33b.tar.gz
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'qa/qa/page/component/design_management.rb')
-rw-r--r--qa/qa/page/component/design_management.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/qa/qa/page/component/design_management.rb b/qa/qa/page/component/design_management.rb
index 73ba5713bda..90c86688882 100644
--- a/qa/qa/page/component/design_management.rb
+++ b/qa/qa/page/component/design_management.rb
@@ -54,8 +54,9 @@ module QA
# We'll check for the annotation in a test, but here we'll at least
# wait for the "Save comment" button to disappear
saved = has_no_element?(:save_comment_button)
+ return if saved
- raise RSpec::Expectations::ExpectationNotMetError, %q(There was a problem while adding the annotation) unless saved
+ raise RSpec::Expectations::ExpectationNotMetError, %q(There was a problem while adding the annotation)
end
def add_design(design_file_path)
@@ -69,15 +70,11 @@ module QA
filename = ::File.basename(design_file_path)
- found = wait_until(reload: false, sleep_interval: 1) do
+ wait_until(reload: false, sleep_interval: 1, message: "Design upload") do
image = find_element(:design_image, filename: filename)
- has_element?(:design_file_name, text: filename) &&
- image["complete"] &&
- image["naturalWidth"].to_i > 0
+ has_element?(:design_file_name, text: filename) && image["complete"] && image["naturalWidth"].to_i > 0
end
-
- raise ElementNotFound, %Q(Attempted to attach design "#{filename}" but it did not appear) unless found
end
def update_design(filename)