Merge branch 'sh-add-object-storage-qa' into 'master'
Add basic QA test for testing attachment uploads Closes #49957 See merge request gitlab-org/gitlab-ce!21300
This commit is contained in:
commit
dad32f9ce6
3 changed files with 43 additions and 1 deletions
1
qa/qa.rb
1
qa/qa.rb
|
@ -94,6 +94,7 @@ module QA
|
|||
autoload :LDAP, 'qa/scenario/test/integration/ldap'
|
||||
autoload :Kubernetes, 'qa/scenario/test/integration/kubernetes'
|
||||
autoload :Mattermost, 'qa/scenario/test/integration/mattermost'
|
||||
autoload :ObjectStorage, 'qa/scenario/test/integration/object_storage'
|
||||
end
|
||||
|
||||
module Sanity
|
||||
|
|
13
qa/qa/scenario/test/integration/object_storage.rb
Normal file
13
qa/qa/scenario/test/integration/object_storage.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module QA
|
||||
module Scenario
|
||||
module Test
|
||||
module Integration
|
||||
class ObjectStorage < Test::Instance
|
||||
tags :object_storage
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -5,18 +5,46 @@ module QA
|
|||
describe 'Issue creation' do
|
||||
let(:issue_title) { 'issue title' }
|
||||
|
||||
it 'user creates an issue' do
|
||||
def create_issue
|
||||
Runtime::Browser.visit(:gitlab, Page::Main::Login)
|
||||
Page::Main::Login.act { sign_in_using_credentials }
|
||||
|
||||
Factory::Resource::Issue.fabricate! do |issue|
|
||||
issue.title = issue_title
|
||||
end
|
||||
end
|
||||
|
||||
it 'user creates an issue' do
|
||||
create_issue
|
||||
|
||||
Page::Menu::Side.act { click_issues }
|
||||
|
||||
expect(page).to have_content(issue_title)
|
||||
end
|
||||
|
||||
context 'when using attachments in comments', :object_storage do
|
||||
let(:file_to_attach) do
|
||||
File.absolute_path(File.join('spec', 'fixtures', 'banana_sample.gif'))
|
||||
end
|
||||
|
||||
it 'user comments on an issue with an attachment' do
|
||||
create_issue
|
||||
|
||||
Page::Project::Issue::Show.perform do |show|
|
||||
show.comment('See attached banana for scale', attachment: file_to_attach)
|
||||
|
||||
show.refresh
|
||||
|
||||
image_url = find('a[href$="banana_sample.gif"]')[:href]
|
||||
|
||||
found = show.wait(reload: false) do
|
||||
show.asset_exists?(image_url)
|
||||
end
|
||||
|
||||
expect(found).to be_truthy
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue