Commit 0e48348b authored by Andrejs Cunskis's avatar Andrejs Cunskis Committed by Mark Lapierre

E2E: Update bulk group import via api spec

parent 22cf4a79
......@@ -35,10 +35,7 @@ module QA
end
def fabricate_via_api!
response = post(Runtime::API::Request.new(api_client, api_post_path).url, api_post_body)
@import_id = parse_body(response)[:id]
"#{gitlab_address}/#{full_path}"
resource_web_url(api_post)
end
def api_post_path
......@@ -71,6 +68,18 @@ module QA
parse_body(response)[:status]
end
private
def transform_api_resource(api_resource)
return api_resource if api_resource[:web_url]
# override transformation only for /bulk_imports endpoint which doesn't have web_url in response and
# ignore others so import_id is not overwritten incorrectly
api_resource[:web_url] = "#{gitlab_address}/#{full_path}"
api_resource[:import_id] = api_resource[:id]
api_resource
end
end
end
end
......@@ -78,9 +78,6 @@ module QA
'imports group with subgroups and labels',
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1871'
) do
Page::Group::BulkImport.perform do |import_page|
imported_group
expect { imported_group.import_status }.to(
eventually_eq('finished').within(max_duration: 300, sleep_interval: 2)
)
......@@ -93,7 +90,6 @@ module QA
expect(imported_subgroup.labels).to include(*subgroup.labels)
end
end
end
after do
user.remove_via_api!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment