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
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/wiki_helpers.rb')
-rw-r--r--spec/support/helpers/wiki_helpers.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/helpers/wiki_helpers.rb b/spec/support/helpers/wiki_helpers.rb
index 06cea728b42..86eb1793707 100644
--- a/spec/support/helpers/wiki_helpers.rb
+++ b/spec/support/helpers/wiki_helpers.rb
@@ -3,6 +3,11 @@
module WikiHelpers
extend self
+ def wait_for_svg_to_be_loaded(example = nil)
+ # Ensure the SVG is loaded first before clicking the button
+ find('.svg-content .js-lazy-loaded') if example.nil? || example.metadata.key?(:js)
+ end
+
def upload_file_to_wiki(project, user, file_name)
opts = {
file_name: file_name,