summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
Diffstat (limited to 'qa')
-rw-r--r--qa/qa.rb1
-rw-r--r--qa/qa/scenario/test/integration/object_storage.rb13
-rw-r--r--qa/qa/specs/features/project/create_issue_spec.rb29
3 files changed, 42 insertions, 1 deletions
diff --git a/qa/qa.rb b/qa/qa.rb
index 4b927067449..90461b16dd4 100644
--- a/qa/qa.rb
+++ b/qa/qa.rb
@@ -93,6 +93,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
diff --git a/qa/qa/scenario/test/integration/object_storage.rb b/qa/qa/scenario/test/integration/object_storage.rb
new file mode 100644
index 00000000000..874789db20d
--- /dev/null
+++ b/qa/qa/scenario/test/integration/object_storage.rb
@@ -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
diff --git a/qa/qa/specs/features/project/create_issue_spec.rb b/qa/qa/specs/features/project/create_issue_spec.rb
index 793e7db87cb..eee7d01a4c8 100644
--- a/qa/qa/specs/features/project/create_issue_spec.rb
+++ b/qa/qa/specs/features/project/create_issue_spec.rb
@@ -2,17 +2,44 @@ module QA
describe 'creates issue', :smoke do
let(:issue_title) { 'issue title' }
- it 'user creates 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 issue' do
+ create_issue
Page::Menu::Side.act { click_issues }
expect(page).to have_content(issue_title)
end
+
+ describe 'with attachments', :object_storage do
+ let(:file_to_attach) { File.absolute_path(File.join('spec', 'fixtures', 'banana_sample.gif')) }
+
+ 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)
+ end
+
+ image_url = find('a[href$="banana_sample.gif"]')[:href]
+
+ Page::Project::Issue::Show.perform do |show|
+ # Wait for attachment to upload
+ found = show.wait(reload: false) do
+ show.asset_exists?(image_url)
+ end
+
+ expect(found).to be_truthy
+ end
+ end
+ end
end
end