Commit 42aed943 authored by Tomislav Nikic's avatar Tomislav Nikic

Remove test from quarantine

Removing test from quarantine by deleting the tag.
Updated to use api for merge request creation.
Added api path to mr resource with project push.
parent 5de45557
......@@ -5,7 +5,8 @@ require 'securerandom'
module QA
module Resource
class MergeRequest < Base
attr_accessor :title,
attr_accessor :id,
:title,
:description,
:source_branch,
:target_branch,
......@@ -71,6 +72,28 @@ module QA
page.create_merge_request
end
end
def fabricate_via_api!
populate(:target, :source)
super
end
def api_get_path
"/projects/#{project.id}/merge_requests/#{id}"
end
def api_post_path
"/projects/#{project.id}/merge_requests"
end
def api_post_body
{
description: @description,
source_branch: @source_branch,
target_branch: @target_branch,
title: @title
}
end
end
end
end
# frozen_string_literal: true
module QA
# https://gitlab.com/gitlab-org/quality/staging/issues/55
context 'Create', :quarantine do
context 'Create' do
describe 'Download merge request patch and diff' do
before(:context) do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
@merge_request = Resource::MergeRequest.fabricate! do |merge_request|
project = Resource::Project.fabricate_via_api! do |project|
project.name = 'project'
end
@merge_request = Resource::MergeRequest.fabricate_via_api! do |merge_request|
merge_request.project = project
merge_request.title = 'This is a merge request'
merge_request.description = 'For downloading patches and diffs'
merge_request.description = '... for downloading patches and diffs'
end
end
it 'user views merge request email patches' do
it 'views the merge request email patches' do
@merge_request.visit!
Page::MergeRequest::Show.perform(&:view_email_patches)
......@@ -23,7 +27,7 @@ module QA
expect(page).to have_content('diff --git a/added_file.txt b/added_file.txt')
end
it 'user views merge request plain diff' do
it 'views the merge request plain diff' do
@merge_request.visit!
Page::MergeRequest::Show.perform(&:view_plain_diff)
......
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