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
e5b90202
Commit
e5b90202
authored
Jan 18, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
828a0bb5
3b04de86
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
19 deletions
+64
-19
doc/development/fe_guide/vuex.md
doc/development/fe_guide/vuex.md
+2
-2
qa/qa/resource/base.rb
qa/qa/resource/base.rb
+1
-11
qa/qa/resource/fork.rb
qa/qa/resource/fork.rb
+9
-0
qa/qa/resource/merge_request_from_fork.rb
qa/qa/resource/merge_request_from_fork.rb
+1
-1
qa/qa/resource/project.rb
qa/qa/resource/project.rb
+11
-1
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
+4
-4
qa/spec/resource/base_spec.rb
qa/spec/resource/base_spec.rb
+36
-0
No files found.
doc/development/fe_guide/vuex.md
View file @
e5b90202
...
...
@@ -120,8 +120,8 @@ create:
1.
An action
`receiveSomethingError`
, to handle the error callback
1.
An action
`fetchSomething`
to make the request.
1.
In case your application does more than a
`GET`
request you can use these as examples:
-
`P
U
T`
:
`createSomething`
-
`P
OS
T`
:
`updateSomething`
-
`P
OS
T`
:
`createSomething`
-
`P
U
T`
:
`updateSomething`
-
`DELETE`
:
`deleteSomething`
The component MUST only dispatch the
`fetchNamespace`
action. Actions namespaced with
`request`
or
`receive`
should not be called from the component
...
...
qa/qa/resource/base.rb
View file @
e5b90202
...
...
@@ -116,23 +116,13 @@ module QA
end
private_class_method
:evaluator
def
self
.
dynamic_attributes
const_get
(
:DynamicAttributes
)
rescue
NameError
mod
=
const_set
(
:DynamicAttributes
,
Module
.
new
)
include
mod
mod
end
class
DSL
def
initialize
(
base
)
@base
=
base
end
def
attribute
(
name
,
&
block
)
@base
.
dynamic_attributes
.
module_eval
do
@base
.
module_eval
do
attr_writer
(
name
)
define_method
(
name
)
do
...
...
qa/qa/resource/fork.rb
View file @
e5b90202
...
...
@@ -3,6 +3,13 @@
module
QA
module
Resource
class
Fork
<
Base
attribute
:project
do
Resource
::
Project
.
fabricate!
do
|
resource
|
resource
.
name
=
push
.
project
.
name
resource
.
path_with_namespace
=
"
#{
user
.
name
}
/
#{
push
.
project
.
name
}
"
end
end
attribute
:push
do
Repository
::
ProjectPush
.
fabricate!
end
...
...
@@ -37,6 +44,8 @@ module QA
Page
::
Layout
::
Banner
.
perform
do
|
page
|
page
.
has_notice?
(
'The project was successfully forked.'
)
end
populate
(
:project
)
end
end
end
...
...
qa/qa/resource/merge_request_from_fork.rb
View file @
e5b90202
...
...
@@ -11,7 +11,7 @@ module QA
attribute
:push
do
Repository
::
ProjectPush
.
fabricate!
do
|
resource
|
resource
.
project
=
fork
resource
.
project
=
fork
.
project
resource
.
branch_name
=
fork_branch
resource
.
file_name
=
'file2.txt'
resource
.
user
=
fork
.
user
...
...
qa/qa/resource/project.rb
View file @
e5b90202
...
...
@@ -12,6 +12,10 @@ module QA
Group
.
fabricate!
end
attribute
:path_with_namespace
do
"
#{
group
.
sandbox
.
path
}
/
#{
group
.
path
}
/
#{
name
}
"
if
group
end
attribute
:repository_ssh_location
do
Page
::
Project
::
Show
.
perform
do
|
page
|
page
.
repository_clone_ssh_location
...
...
@@ -46,8 +50,14 @@ module QA
end
end
def
fabricate_via_api!
resource_web_url
(
api_get
)
rescue
ResourceNotFoundError
super
end
def
api_get_path
"/projects/
#{
name
}
"
"/projects/
#{
CGI
.
escape
(
path_with_namespace
)
}
"
end
def
api_post_path
...
...
qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
View file @
e5b90202
...
...
@@ -5,18 +5,18 @@ module QA
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
}
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
merge_request
=
Resource
::
MergeRequestFromFork
.
fabricate!
do
|
merge_request
|
merge_request
.
fork_branch
=
'feature-branch'
end
Page
::
Main
::
Menu
.
perform
{
|
main
|
main
.
sign_out
}
Page
::
Main
::
Login
.
perform
{
|
login
|
login
.
sign_in_using_credentials
}
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
merge_request
.
visit!
Page
::
MergeRequest
::
Show
.
perform
{
|
show
|
show
.
merge!
}
Page
::
MergeRequest
::
Show
.
perform
(
&
:merge!
)
expect
(
page
).
to
have_content
(
'The changes were merged'
)
end
...
...
qa/spec/resource/base_spec.rb
View file @
e5b90202
...
...
@@ -213,6 +213,42 @@ describe QA::Resource::Base do
.
to
raise_error
(
described_class
::
NoValueError
,
"No value was computed for no_block of
#{
resource
.
class
.
name
}
."
)
end
end
context
'when multiple resources have the same attribute name'
do
let
(
:base
)
do
Class
.
new
(
QA
::
Resource
::
Base
)
do
def
fabricate!
'any'
end
def
self
.
current_url
'http://stub'
end
end
end
let
(
:first_resource
)
do
Class
.
new
(
base
)
do
attribute
:test
do
'first block'
end
end
end
let
(
:second_resource
)
do
Class
.
new
(
base
)
do
attribute
:test
do
'second block'
end
end
end
it
'has unique attribute values'
do
first_result
=
first_resource
.
fabricate!
(
resource:
first_resource
.
new
)
second_result
=
second_resource
.
fabricate!
(
resource:
second_resource
.
new
)
expect
(
first_result
.
test
).
to
eq
'first block'
expect
(
second_result
.
test
).
to
eq
'second block'
end
end
end
describe
'#web_url'
do
...
...
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