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
1c66d576
Commit
1c66d576
authored
Apr 23, 2020
by
Nailia Iskhakova
Committed by
Sanad Liaquat
Apr 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quarantine specs to unblock deploy
Tests fail after update to sequence of steps
parent
5b91a85c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
53 deletions
+36
-53
qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
...es/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
+15
-24
qa/qa/specs/features/ee/browser_ui/3_create/repository/code_owners_spec.rb
...res/ee/browser_ui/3_create/repository/code_owners_spec.rb
+21
-29
No files found.
qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
View file @
1c66d576
...
...
@@ -3,42 +3,33 @@
module
QA
context
'Plan'
,
:reliable
do
describe
'check xss occurence in @mentions in issues'
,
:requires_admin
do
let
(
:user
)
do
Resource
::
User
.
fabricate_via_api!
do
|
user
|
user
.
name
=
"eve <img src=x onerror=alert(2)<img src=x onerror=alert(1)>"
user
.
password
=
"test1234"
end
end
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'xss-test-for-mentions-project'
project
.
add_member
(
user
)
end
end
let
(
:issue
)
do
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
issue
.
project
=
project
end
end
before
do
it
'mentions a user in a comment'
do
QA
::
Runtime
::
Env
.
personal_access_token
=
QA
::
Runtime
::
Env
.
admin_personal_access_token
unless
QA
::
Runtime
::
Env
.
personal_access_token
Flow
::
Login
.
sign_in_as_admin
end
user
=
Resource
::
User
.
fabricate_via_api!
do
|
user
|
user
.
name
=
"eve <img src=x onerror=alert(2)<img src=x onerror=alert(1)>"
user
.
password
=
"test1234"
end
QA
::
Runtime
::
Env
.
personal_access_token
=
nil
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
)
if
Page
::
Main
::
Menu
.
perform
{
|
p
|
p
.
has_personal_area?
(
wait:
0
)
}
Flow
::
Login
.
sign_in
end
it
'mentions a user in a comment'
do
issue
.
visit!
project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'xss-test-for-mentions-project'
end
Flow
::
Project
.
add_member
(
project:
project
,
username:
user
.
username
)
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
issue
.
project
=
project
end
.
visit!
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show
|
show
.
select_all_activities_filter
...
...
qa/qa/specs/features/ee/browser_ui/3_create/repository/code_owners_spec.rb
View file @
1c66d576
...
...
@@ -16,38 +16,30 @@ module QA
]
end
let
(
:user
)
do
Resource
::
User
.
fabricate_or_use
do
|
user
|
user
.
name
=
Runtime
::
Env
.
gitlab_qa_username_1
user
.
password
=
Runtime
::
Env
.
gitlab_qa_password_1
end
end
before
do
# Add two new users to a project as members
Flow
::
Login
.
sign_in
let
(
:user2
)
do
Resource
::
User
.
fabricate_or_use
do
|
user2
|
user2
.
name
=
Runtime
::
Env
.
gitlab_qa_username_2
user2
.
password
=
Runtime
::
Env
.
gitlab_qa_password_2
end
end
@user
=
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_username_1
,
Runtime
::
Env
.
gitlab_qa_password_1
)
@user2
=
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_username_2
,
Runtime
::
Env
.
gitlab_qa_password_2
)
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
@project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
"codeowners"
end
end
@project
.
visit!
before
do
project
.
add_member
(
user
)
project
.
add_member
(
user2
)
Page
::
Project
::
Menu
.
perform
(
&
:go_to_members_settings
)
Page
::
Project
::
Settings
::
Members
.
perform
do
|
members_page
|
members_page
.
add_member
(
@user
.
username
)
members_page
.
add_member
(
@user2
.
username
)
end
end
it
'displays owners specified in CODEOWNERS file'
do
Flow
::
Login
.
sign_in
project
.
visit!
codeowners_file_content
=
<<-
CONTENT
* @
#{
user2
.
username
}
*.txt @
#{
user
.
username
}
* @
#{
@
user2
.
username
}
*.txt @
#{
@
user
.
username
}
CONTENT
files
<<
{
name:
'CODEOWNERS'
,
...
...
@@ -56,27 +48,27 @@ module QA
# Push CODEOWNERS and test files to the project
Resource
::
Repository
::
ProjectPush
.
fabricate!
do
|
push
|
push
.
project
=
project
push
.
project
=
@
project
push
.
files
=
files
push
.
commit_message
=
'Add CODEOWNERS and test files'
end
project
.
visit!
@
project
.
visit!
# Check the files and code owners
Page
::
Project
::
Show
.
perform
do
|
project_page
|
project_page
.
click_file
'file.txt'
end
expect
(
page
).
to
have_content
(
user
.
name
)
expect
(
page
).
not_to
have_content
(
user2
.
name
)
expect
(
page
).
to
have_content
(
@
user
.
name
)
expect
(
page
).
not_to
have_content
(
@
user2
.
name
)
project
.
visit!
@
project
.
visit!
Page
::
Project
::
Show
.
perform
do
|
project_page
|
project_page
.
click_file
'README.md'
end
expect
(
page
).
to
have_content
(
user2
.
name
)
expect
(
page
).
not_to
have_content
(
user
.
name
)
expect
(
page
).
to
have_content
(
@
user2
.
name
)
expect
(
page
).
not_to
have_content
(
@
user
.
name
)
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