Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
ed9bb8af
Commit
ed9bb8af
authored
Aug 07, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve QA scenarios contexts & descriptions consistency
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
7cd3fbb6
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
673 additions
and
631 deletions
+673
-631
qa/qa/scenario/test/instance.rb
qa/qa/scenario/test/instance.rb
+1
-1
qa/qa/specs/features/api/1_manage/users_spec.rb
qa/qa/specs/features/api/1_manage/users_spec.rb
+10
-16
qa/qa/specs/features/browser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb
...rowser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb
+16
-12
qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb
..._ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb
+12
-8
qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb
...atures/browser_ui/1_manage/project/create_project_spec.rb
+18
-14
qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
...es/browser_ui/1_manage/project/import_github_repo_spec.rb
+79
-75
qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb
...browser_ui/1_manage/project/view_project_activity_spec.rb
+16
-12
qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb
...ecs/features/browser_ui/2_plan/issue/create_issue_spec.rb
+14
-10
qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb
...er_ui/3_create/merge_request/create_merge_request_spec.rb
+31
-27
qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
...reate/merge_request/merge_merge_request_from_fork_spec.rb
+16
-12
qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
...er_ui/3_create/merge_request/rebase_merge_request_spec.rb
+40
-34
qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb
...er_ui/3_create/merge_request/squash_merge_request_spec.rb
+38
-34
qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb
...ecs/features/browser_ui/3_create/repository/clone_spec.rb
+4
-2
qa/qa/specs/features/browser_ui/3_create/repository/create_edit_delete_file_via_web_spec.rb
...create/repository/create_edit_delete_file_via_web_spec.rb
+53
-49
qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
...res/browser_ui/3_create/repository/push_over_http_spec.rb
+4
-2
qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb
...wser_ui/3_create/repository/push_protected_branch_spec.rb
+49
-45
qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb
...wser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb
+37
-33
qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb
..._ui/4_verify/pipeline/create_and_process_pipeline_spec.rb
+67
-82
qa/qa/specs/features/browser_ui/4_verify/secret_variable/add_secret_variable_spec.rb
...r_ui/4_verify/secret_variable/add_secret_variable_spec.rb
+18
-14
qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
...es/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
+16
-12
qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
...er_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
+68
-64
qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
...igure/auto_devops/create_project_with_auto_devops_spec.rb
+52
-48
qa/qa/specs/features/browser_ui/7_configure/mattermost/create_group_with_mattermost_team_spec.rb
...gure/mattermost/create_group_with_mattermost_team_spec.rb
+14
-10
qa/qa/specs/features/login/basic_spec.rb
qa/qa/specs/features/login/basic_spec.rb
+0
-15
No files found.
qa/qa/scenario/test/instance.rb
View file @
ed9bb8af
...
...
@@ -31,7 +31,7 @@ module QA
if
rspec_options
.
any?
rspec_options
else
[
'--
tag'
,
self
.
class
.
focus
.
join
(
','
),
'--
'
,
::
File
.
expand_path
(
'../../specs/features'
,
__dir__
)]
[
'--'
,
::
File
.
expand_path
(
'../../specs/features'
,
__dir__
)]
end
end
end
...
...
qa/qa/specs/features/api/1_manage/users_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'API users'
do
context
:manage
do
describe
'Users API'
do
before
(
:context
)
do
@api_client
=
Runtime
::
API
::
Client
.
new
(
:gitlab
)
end
context
'when authenticated'
do
let
(
:request
)
{
Runtime
::
API
::
Request
.
new
(
@api_client
,
'/users'
)
}
it
'
get list of
users'
do
it
'
GET /
users'
do
get
request
.
url
expect_status
(
200
)
end
it
'
submit request with a valid user
name'
do
it
'
GET /users/:username with a valid user
name'
do
get
request
.
url
,
{
params:
{
username:
Runtime
::
User
.
username
}
}
expect_status
(
200
)
...
...
@@ -22,20 +24,12 @@ module QA
)
end
it
'
submit request with an invalid user
name'
do
it
'
GET /users/:username with an invalid user
name'
do
get
request
.
url
,
{
params:
{
username:
SecureRandom
.
hex
(
10
)
}
}
expect_status
(
200
)
expect
(
json_body
).
to
eq
([])
end
end
it
'submit request with an invalid token'
do
request
=
Runtime
::
API
::
Request
.
new
(
@api_client
,
'/users'
,
private_token:
'invalid'
)
get
request
.
url
expect_status
(
401
)
end
end
end
qa/qa/specs/features/browser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'LDAP user login'
,
:orchestrated
,
:ldap
do
context
:manage
,
:orchestrated
,
:ldap
do
describe
'LDAP login'
do
before
do
Runtime
::
Env
.
user_type
=
'ldap'
end
it
'user logs in
using LDAP credentials'
do
it
'user logs into GitLab
using LDAP credentials'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -16,4 +19,5 @@ module QA
end
end
end
end
end
qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'logging in to Mattermost'
,
:orchestrated
,
:mattermost
do
it
'can use gitlab oauth'
do
context
:manage
,
:orchestrated
,
:mattermost
do
describe
'Mattermost login'
do
it
'user logs into Mattermost using GitLab OAuth'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
do
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -14,4 +17,5 @@ module QA
end
end
end
end
end
qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'create a new project'
,
:smoke
do
context
:manage
,
:smoke
do
describe
'Project creation'
do
it
'user creates a new project'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -19,4 +22,5 @@ module QA
expect
(
page
).
to
have_content
(
'The repository for this project is empty'
)
end
end
end
end
qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'user imports a GitHub repo'
,
:orchestrated
,
:github
do
context
:manage
,
:orchestrated
,
:github
do
describe
'Project import from GitHub'
do
let
(
:imported_project
)
do
Factory
::
Resource
::
ProjectImportedFromGithub
.
fabricate!
do
|
project
|
project
.
name
=
'imported-project'
...
...
@@ -103,4 +106,5 @@ module QA
expect
(
page
).
to
have_content
(
'Welcome to the test-project wiki!'
)
end
end
end
end
qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'activity page'
do
it
'push creates an event in the activity page'
do
context
:manage
do
describe
'Project activity'
do
it
'user creates an event in the activity page upon Git push'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -17,4 +20,5 @@ module QA
expect
(
page
).
to
have_content
(
'pushed new branch master'
)
end
end
end
end
qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'creates issue'
,
:smoke
do
context
:plan
,
:smoke
do
describe
'Issue creation'
do
let
(
:issue_title
)
{
'issue title'
}
it
'user creates
issue'
do
it
'user creates an
issue'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -15,4 +18,5 @@ module QA
expect
(
page
).
to
have_content
(
issue_title
)
end
end
end
end
qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'creates a merge request with milestone'
do
context
:create
do
describe
'Merge request creation'
do
it
'user creates a new merge request'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -29,6 +32,7 @@ module QA
end
end
end
end
describe
'creates a merge request'
,
:smoke
do
it
'user creates a new merge request'
do
...
...
qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'Project fork'
do
it
'can submit merge requests to upstream master'
do
context
:create
do
describe
'Merge request creation from fork'
do
it
'user forks a project, submits a merge request and maintainer merges it'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -18,4 +21,5 @@ module QA
expect
(
page
).
to
have_content
(
'The changes were merged'
)
end
end
end
end
qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'merge request rebase'
do
it
'rebases source branch of merge request'
do
context
:create
do
describe
'Merge request rebasing'
do
it
'user rebases source branch of merge request'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -20,6 +23,8 @@ module QA
push
.
project
=
project
push
.
file_name
=
"other.txt"
push
.
file_content
=
"New file added!"
push
.
branch_name
=
"master"
push
.
new_branch
=
false
end
merge_request
.
visit!
...
...
@@ -36,4 +41,5 @@ module QA
end
end
end
end
end
qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'merge request squash commits'
do
it
'when squash commits is marked before merge'
do
context
:create
do
describe
'Merge request squashing'
do
it
'user squashes commits while merging'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -47,4 +50,5 @@ module QA
end
end
end
end
end
qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'clone code from the repository'
do
context
'with regular account over http
'
do
context
:create
do
describe
'Git clone over HTTP
'
do
let
(
:location
)
do
Page
::
Project
::
Show
.
act
do
choose_repository_clone_http
...
...
qa/qa/specs/features/browser_ui/3_create/repository/create_edit_delete_file_via_web_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'File Functionality'
,
:core
do
it
'lets a user create, edit and delete a file via WebUI'
do
context
:create
,
:core
do
describe
'Files management'
do
it
'user creates, edits and deletes a file via the Web'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -51,4 +54,5 @@ module QA
expect
(
page
).
to
have_no_content
(
file_name
)
end
end
end
end
qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'push code to repository'
do
context
'with regular account over http
'
do
context
:create
do
describe
'Git push over HTTP
'
do
it
'user pushes code to the repository'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'branch protection support'
do
context
:create
do
describe
'Protected branch support'
do
let
(
:branch_name
)
{
'protected-branch'
}
let
(
:commit_message
)
{
'Protected push commit message'
}
let
(
:project
)
do
...
...
@@ -63,4 +66,5 @@ module QA
end
end
end
end
end
qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'Wiki Functionality'
do
context
:create
do
describe
'Wiki management'
do
def
login
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -14,7 +17,7 @@ module QA
login
end
it
'U
ser creates, edits, clones, and pushes to the wiki'
do
it
'u
ser creates, edits, clones, and pushes to the wiki'
do
wiki
=
Factory
::
Resource
::
Wiki
.
fabricate!
do
|
resource
|
resource
.
title
=
'Home'
resource
.
content
=
'# My First Wiki Content'
...
...
@@ -42,4 +45,5 @@ module QA
expect
(
page
).
to
have_content
(
'My Third Wiki Content'
)
end
end
end
end
qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'CI/CD Pipelines'
,
:orchestrated
,
:docker
do
context
:verify
,
:orchestrated
,
:docker
do
describe
'Pipeline creation and processing'
do
let
(
:executor
)
{
"qa-runner-
#{
Time
.
now
.
to_i
}
"
}
after
do
Service
::
Runner
.
new
(
executor
).
remove!
end
it
'user registers a new specific runner'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
Factory
::
Resource
::
Runner
.
fabricate!
do
|
runner
|
runner
.
name
=
executor
end
Page
::
Project
::
Settings
::
CICD
.
perform
do
|
settings
|
sleep
5
# Runner should register within 5 seconds
settings
.
refresh
settings
.
expand_runners_settings
do
|
page
|
expect
(
page
).
to
have_content
(
executor
)
expect
(
page
).
to
have_online_runner
end
end
end
it
'users creates a new pipeline'
do
it
'users creates a pipeline which gets processed'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -99,4 +83,5 @@ module QA
end
end
end
end
end
qa/qa/specs/features/browser_ui/4_verify/secret_variable/add_secret_variable_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'secret variables support'
do
context
:verify
do
describe
'Secret variable support'
do
it
'user adds a secret variable'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -21,4 +24,5 @@ module QA
end
end
end
end
end
qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'deploy keys support'
do
context
:release
do
describe
'Deploy key creation'
do
it
'user adds a deploy key'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -16,4 +19,5 @@ module QA
expect
(
deploy_key
.
fingerprint
).
to
eq
(
key
.
fingerprint
)
end
end
end
end
qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
require
'digest/sha1'
module
QA
describe
'cloning code using a deploy key'
,
:docker
do
context
:release
,
:docker
do
describe
'Git clone using a deploy key'
do
def
login
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -102,4 +105,5 @@ module QA
end
end
end
end
end
qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
require
'pathname'
module
QA
describe
'Auto Devops'
,
:orchestrated
,
:kubernetes
do
context
:configure
,
:orchestrated
,
:kubernetes
do
describe
'Auto DevOps support'
do
after
do
@cluster
&
.
remove!
end
...
...
@@ -61,4 +64,5 @@ module QA
end
end
end
end
end
qa/qa/specs/features/browser_ui/7_configure/mattermost/create_group_with_mattermost_team_spec.rb
View file @
ed9bb8af
# frozen_string_literal: true
module
QA
describe
'create a new group'
,
:orchestrated
,
:mattermost
do
it
'creating a group with a mattermost team'
do
context
:configure
,
:orchestrated
,
:mattermost
do
describe
'Mattermost support'
do
it
'user creates a group with a mattermost team'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
Page
::
Menu
::
Main
.
act
{
go_to_groups
}
...
...
@@ -14,4 +17,5 @@ module QA
end
end
end
end
end
qa/qa/specs/features/login/basic_spec.rb
deleted
100644 → 0
View file @
7cd3fbb6
module
QA
describe
'basic user login'
,
:smoke
do
it
'user logs in using basic credentials'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
# TODO, since `Signed in successfully` message was removed
# this is the only way to tell if user is signed in correctly.
#
Page
::
Menu
::
Main
.
perform
do
|
menu
|
expect
(
menu
).
to
have_personal_area
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment