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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
dedacada
Commit
dedacada
authored
Nov 16, 2018
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using existing users
parent
d786cf32
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
3 deletions
+41
-3
qa/qa/runtime/env.rb
qa/qa/runtime/env.rb
+16
-0
qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
...es/browser_ui/1_manage/project/add_project_member_spec.rb
+12
-1
qa/qa/specs/features/browser_ui/3_create/repository/ee_code_owners_spec.rb
...res/browser_ui/3_create/repository/ee_code_owners_spec.rb
+13
-2
No files found.
qa/qa/runtime/env.rb
View file @
dedacada
...
...
@@ -77,6 +77,22 @@ module QA
ENV
[
'GITLAB_FORKER_PASSWORD'
]
end
def
gitlab_qa_username_1
ENV
[
'GITLAB_QA_USERNAME_1'
]
end
def
gitlab_qa_password_1
ENV
[
'GITLAB_QA_PASSWORD_1'
]
end
def
gitlab_qa_username_2
ENV
[
'GITLAB_QA_USERNAME_2'
]
end
def
gitlab_qa_password_2
ENV
[
'GITLAB_QA_PASSWORD_2'
]
end
def
ldap_username
ENV
[
'GITLAB_LDAP_USERNAME'
]
end
...
...
qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
View file @
dedacada
...
...
@@ -7,7 +7,7 @@ module QA
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
user
=
Resource
::
User
.
fabricate!
user
=
create_or_use_existing_user
(
Runtime
::
Env
.
gitlab_qa_username_1
,
Runtime
::
Env
.
gitlab_qa_password_1
)
project
=
Resource
::
Project
.
fabricate!
do
|
resource
|
resource
.
name
=
'add-member-project'
...
...
@@ -21,6 +21,17 @@ module QA
expect
(
page
).
to
have_content
(
"
#{
user
.
name
}
@
#{
user
.
username
}
Given access"
)
end
def
create_or_use_existing_user
(
username
,
password
)
if
Runtime
::
Env
.
signup_disabled?
Resource
::
User
.
new
.
tap
do
|
user
|
user
.
username
=
username
user
.
password
=
password
end
else
Resource
::
User
.
fabricate!
end
end
end
end
end
qa/qa/specs/features/browser_ui/3_create/repository/ee_code_owners_spec.rb
View file @
dedacada
...
...
@@ -21,8 +21,8 @@ module QA
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
@user
=
Resource
::
User
.
fabricate!
@user2
=
Resource
::
User
.
fabricate!
@user
=
create_or_use_existing_user
(
Runtime
::
Env
.
gitlab_qa_username_1
,
Runtime
::
Env
.
gitlab_qa_password_1
)
@user2
=
create_or_use_existing_user
(
Runtime
::
Env
.
gitlab_qa_username_2
,
Runtime
::
Env
.
gitlab_qa_password_2
)
@project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
.
name
=
"codeowners"
...
...
@@ -73,6 +73,17 @@ module QA
expect
(
page
).
to
have_content
(
@user2
.
name
)
expect
(
page
).
not_to
have_content
(
@user
.
name
)
end
def
create_or_use_existing_user
(
username
,
password
)
if
Runtime
::
Env
.
signup_disabled?
Resource
::
User
.
new
.
tap
do
|
user
|
user
.
username
=
username
user
.
password
=
password
end
else
Resource
::
User
.
fabricate!
end
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