diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 21:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 21:09:24 +0300 |
commit | 619d0b6922a6cf95d291fbbf5fa3d09e772a1ea8 (patch) | |
tree | fb8f8e036cec1b32166206bb5102af6c5dca8cfe /spec/support | |
parent | 17ab40ca089e1aef61a83f77ab6df62a72f6ce06 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
5 files changed, 11 insertions, 6 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, diff --git a/spec/support/import_export/common_util.rb b/spec/support/import_export/common_util.rb index 912a8e0a2ab..9281937e4ba 100644 --- a/spec/support/import_export/common_util.rb +++ b/spec/support/import_export/common_util.rb @@ -34,13 +34,13 @@ module ImportExport end def get_project_restorer(project, import_path) - Gitlab::ImportExport::ProjectTreeRestorer.new( + Gitlab::ImportExport::Project::TreeRestorer.new( user: project.creator, shared: get_shared_env(path: import_path), project: project ) end def get_project_saver(project, export_path) - Gitlab::ImportExport::ProjectTreeSaver.new( + Gitlab::ImportExport::Project::TreeSaver.new( project: project, current_user: project.creator, shared: get_shared_env(path: export_path) ) end diff --git a/spec/support/import_export/configuration_helper.rb b/spec/support/import_export/configuration_helper.rb index 27819b5201a..4fe619225bb 100644 --- a/spec/support/import_export/configuration_helper.rb +++ b/spec/support/import_export/configuration_helper.rb @@ -36,8 +36,8 @@ module ConfigurationHelper end def relation_class_for_name(relation_name) - relation_name = Gitlab::ImportExport::ProjectRelationFactory.overrides[relation_name.to_sym] || relation_name - Gitlab::ImportExport::ProjectRelationFactory.relation_class(relation_name) + relation_name = Gitlab::ImportExport::Project::RelationFactory.overrides[relation_name.to_sym] || relation_name + Gitlab::ImportExport::Project::RelationFactory.relation_class(relation_name) end def parsed_attributes(relation_name, attributes, config: Gitlab::ImportExport.config_file) diff --git a/spec/support/shared_examples/features/wiki_file_attachments_shared_examples.rb b/spec/support/shared_examples/features/wiki_file_attachments_shared_examples.rb index 36d91d323b5..867290fb2d6 100644 --- a/spec/support/shared_examples/features/wiki_file_attachments_shared_examples.rb +++ b/spec/support/shared_examples/features/wiki_file_attachments_shared_examples.rb @@ -42,7 +42,7 @@ RSpec.shared_examples 'wiki file attachments' do end end - context 'uploading is complete', :quarantine do + context 'uploading is complete' do it 'shows "Attach a file" button on uploading complete' do attach_with_dropzone wait_for_requests diff --git a/spec/support/shared_examples/lib/gitlab/import_export/project_tree_restorer_shared_examples.rb b/spec/support/shared_examples/lib/gitlab/import_export/project_tree_restorer_shared_examples.rb index 968423176f1..14af98285fc 100644 --- a/spec/support/shared_examples/lib/gitlab/import_export/project_tree_restorer_shared_examples.rb +++ b/spec/support/shared_examples/lib/gitlab/import_export/project_tree_restorer_shared_examples.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Shared examples for ProjectTreeRestorer (shared to allow the testing +# Shared examples for Project::TreeRestorer (shared to allow the testing # of EE-specific features) RSpec.shared_examples 'restores project successfully' do |**results| it 'restores the project' do |