From 619d0b6922a6cf95d291fbbf5fa3d09e772a1ea8 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 26 Feb 2020 18:09:24 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/support/helpers/wiki_helpers.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/support/helpers') 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, -- cgit v1.2.1