diff options
Diffstat (limited to 'spec/features/groups/import_export/connect_instance_spec.rb')
-rw-r--r-- | spec/features/groups/import_export/connect_instance_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/features/groups/import_export/connect_instance_spec.rb b/spec/features/groups/import_export/connect_instance_spec.rb index 563c8f429f8..cf893e444c4 100644 --- a/spec/features/groups/import_export/connect_instance_spec.rb +++ b/spec/features/groups/import_export/connect_instance_spec.rb @@ -24,6 +24,7 @@ RSpec.describe 'Import/Export - Connect to another instance', :js do pat = 'demo-pat' stub_path = 'stub-group' total = 37 + stub_request(:get, "%{url}/api/v4/groups?page=1&per_page=20&top_level_only=true&min_access_level=50&search=" % { url: source_url }).to_return( body: [{ id: 2595438, @@ -32,7 +33,7 @@ RSpec.describe 'Import/Export - Connect to another instance', :js do path: stub_path, full_name: 'Stub', full_path: stub_path - }].to_json, + }].to_json, headers: { 'Content-Type' => 'application/json', 'X-Next-Page' => 2, @@ -43,6 +44,10 @@ RSpec.describe 'Import/Export - Connect to another instance', :js do } ) + allow_next_instance_of(BulkImports::Clients::HTTP) do |client| + allow(client).to receive(:validate_instance_version!).and_return(true) + end + expect(page).to have_content 'Import groups from another instance of GitLab' expect(page).to have_content 'Not all related objects are migrated' @@ -53,6 +58,10 @@ RSpec.describe 'Import/Export - Connect to another instance', :js do expect(page).to have_content 'Showing 1-1 of %{total} groups from %{url}' % { url: source_url, total: total } expect(page).to have_content stub_path + + visit '/' + + wait_for_all_requests end end |