Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab FOSS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab FOSS
Commits
00aa4d4c
Commit
00aa4d4c
authored
6 years ago
by
Stan Hu
Browse files
Options
Downloads
Patches
Plain Diff
Add basic QA test for testing attachment uploads
parent
00baed8c
No related branches found
No related tags found
Loading
Pipeline
#28293176
passed with warnings
6 years ago
Stage: build
Stage: prepare
Stage: test
Stage: post-cleanup
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
qa/qa.rb
+1
-0
1 addition, 0 deletions
qa/qa.rb
qa/qa/scenario/test/integration/object_storage.rb
+13
-0
13 additions, 0 deletions
qa/qa/scenario/test/integration/object_storage.rb
qa/qa/specs/features/project/create_issue_spec.rb
+28
-1
28 additions, 1 deletion
qa/qa/specs/features/project/create_issue_spec.rb
with
42 additions
and
1 deletion
qa/qa.rb
+
1
−
0
View file @
00aa4d4c
...
@@ -91,6 +91,7 @@ module Integration
...
@@ -91,6 +91,7 @@ module Integration
autoload
:LDAP
,
'qa/scenario/test/integration/ldap'
autoload
:LDAP
,
'qa/scenario/test/integration/ldap'
autoload
:Kubernetes
,
'qa/scenario/test/integration/kubernetes'
autoload
:Kubernetes
,
'qa/scenario/test/integration/kubernetes'
autoload
:Mattermost
,
'qa/scenario/test/integration/mattermost'
autoload
:Mattermost
,
'qa/scenario/test/integration/mattermost'
autoload
:ObjectStorage
,
'qa/scenario/test/integration/object_storage'
end
end
module
Sanity
module
Sanity
...
...
This diff is collapsed.
Click to expand it.
qa/qa/scenario/test/integration/object_storage.rb
0 → 100644
+
13
−
0
View file @
00aa4d4c
# frozen_string_literal: true
module
QA
module
Scenario
module
Test
module
Integration
class
ObjectStorage
<
Test
::
Instance
tags
:object_storage
end
end
end
end
end
This diff is collapsed.
Click to expand it.
qa/qa/specs/features/project/create_issue_spec.rb
+
28
−
1
View file @
00aa4d4c
...
@@ -2,17 +2,44 @@ module QA
...
@@ -2,17 +2,44 @@ module QA
describe
'creates issue'
,
:core
do
describe
'creates issue'
,
:core
do
let
(
:issue_title
)
{
'issue title'
}
let
(
:issue_title
)
{
'issue title'
}
it
'user
create
s
issue
'
do
def
create
_
issue
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
Factory
::
Resource
::
Issue
.
fabricate!
do
|
issue
|
Factory
::
Resource
::
Issue
.
fabricate!
do
|
issue
|
issue
.
title
=
issue_title
issue
.
title
=
issue_title
end
end
end
it
'user creates issue'
do
create_issue
Page
::
Menu
::
Side
.
act
{
click_issues
}
Page
::
Menu
::
Side
.
act
{
click_issues
}
expect
(
page
).
to
have_content
(
issue_title
)
expect
(
page
).
to
have_content
(
issue_title
)
end
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
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment