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
Boxiang Sun
gitlab-ce
Commits
e415855c
Commit
e415855c
authored
Dec 06, 2017
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if user is in project page before performing a push
parent
77c9632e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
qa/qa/scenario/gitlab/repository/push.rb
qa/qa/scenario/gitlab/repository/push.rb
+7
-0
No files found.
qa/qa/scenario/gitlab/repository/push.rb
View file @
e415855c
...
...
@@ -5,6 +5,9 @@ module QA
module
Gitlab
module
Repository
class
Push
<
Scenario
::
Template
PAGE_REGEX_CHECK
=
%r{
\/
#{
Runtime
::
Namespace
.
sandbox_name
}
\/
qa-test[^
\/
]+
\/
{1}[^
\/
]+
\z
}
.
freeze
attr_writer
:file_name
,
:file_content
,
:commit_message
,
...
...
@@ -20,6 +23,10 @@ module QA
def
perform
Git
::
Repository
.
perform
do
|
repository
|
repository
.
location
=
Page
::
Project
::
Show
.
act
do
unless
PAGE_REGEX_CHECK
.
match
(
current_path
)
raise
"To perform this scenario the current page should be project show."
end
choose_repository_clone_http
repository_location
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