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
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-28 03:09:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-28 03:09:33 +0300
commit56df7f06f1e57d66efcff5d8ad0026252cc91192 (patch)
tree3e0ffb97bf20b9125cb04c18735e0df5f7570b55 /qa
parent579e85eb029c4ee66e8b8cd537a94b9e6cb0e58b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/resource/api_fabricator.rb28
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb2
2 files changed, 16 insertions, 14 deletions
diff --git a/qa/qa/resource/api_fabricator.rb b/qa/qa/resource/api_fabricator.rb
index cac58c599ea..a949e447848 100644
--- a/qa/qa/resource/api_fabricator.rb
+++ b/qa/qa/resource/api_fabricator.rb
@@ -54,11 +54,23 @@ module QA
end
end
- private
-
include Support::Api
attr_writer :api_resource, :api_response
+ def api_put(body = api_put_body)
+ response = put(
+ Runtime::API::Request.new(api_client, api_put_path).url,
+ body)
+
+ unless response.code == HTTP_STATUS_OK
+ raise ResourceFabricationFailedError, "Updating #{self.class.name} using the API failed (#{response.code}) with `#{response}`."
+ end
+
+ process_api_response(parse_body(response))
+ end
+
+ private
+
def resource_web_url(resource)
resource.fetch(:web_url) do
raise ResourceURLMissingError, "API resource for #{self.class.name} does not expose a `web_url` property: `#{resource}`."
@@ -92,18 +104,6 @@ module QA
process_api_response(parse_body(response))
end
- def api_put
- response = put(
- Runtime::API::Request.new(api_client, api_put_path).url,
- api_put_body)
-
- unless response.code == HTTP_STATUS_OK
- raise ResourceFabricationFailedError, "Updating #{self.class.name} using the API failed (#{response.code}) with `#{response}`."
- end
-
- process_api_response(parse_body(response))
- end
-
def api_delete
url = Runtime::API::Request.new(api_client, api_delete_path).url
response = delete(url)
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
index 7d4e6b7efbc..3964ae7eada 100644
--- a/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
@@ -10,6 +10,8 @@ module QA
merge_request.fork_branch = 'feature-branch'
end
+ merge_request.project.api_put(auto_devops_enabled: false)
+
Page::Main::Menu.perform(&:sign_out)
Page::Main::Login.perform(&:sign_in_using_credentials)