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
4fc53067
Commit
4fc53067
authored
Oct 26, 2018
by
blackst0ne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
e40f8f27
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
16 deletions
+17
-16
config/routes/project.rb
config/routes/project.rb
+1
-1
spec/features/dashboard/projects_spec.rb
spec/features/dashboard/projects_spec.rb
+5
-3
spec/features/projects/files/user_creates_directory_spec.rb
spec/features/projects/files/user_creates_directory_spec.rb
+2
-3
spec/features/projects/files/user_creates_files_spec.rb
spec/features/projects/files/user_creates_files_spec.rb
+2
-2
spec/features/projects/files/user_deletes_files_spec.rb
spec/features/projects/files/user_deletes_files_spec.rb
+1
-1
spec/features/projects/files/user_edits_files_spec.rb
spec/features/projects/files/user_edits_files_spec.rb
+3
-3
spec/features/projects/files/user_replaces_files_spec.rb
spec/features/projects/files/user_replaces_files_spec.rb
+1
-1
spec/features/projects/files/user_uploads_files_spec.rb
spec/features/projects/files/user_uploads_files_spec.rb
+2
-2
No files found.
config/routes/project.rb
View file @
4fc53067
...
@@ -163,7 +163,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
...
@@ -163,7 +163,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
get
:diff_for_path
get
:diff_for_path
get
:branch_from
get
:branch_from
get
:branch_to
get
:branch_to
get
'
(:merge_request_source_branch)
'
,
action: :new
get
''
,
action: :new
end
end
end
end
...
...
spec/features/dashboard/projects_spec.rb
View file @
4fc53067
...
@@ -147,10 +147,12 @@ describe 'Dashboard Projects' do
...
@@ -147,10 +147,12 @@ describe 'Dashboard Projects' do
end
end
context
'last push widget'
,
:use_clean_rails_memory_store_caching
do
context
'last push widget'
,
:use_clean_rails_memory_store_caching
do
let
(
:ref
)
{
"feature"
}
before
do
before
do
event
=
create
(
:push_event
,
project:
project
,
author:
user
)
event
=
create
(
:push_event
,
project:
project
,
author:
user
)
create
(
:push_event_payload
,
event:
event
,
ref:
'feature'
,
action: :created
)
create
(
:push_event_payload
,
event:
event
,
ref:
ref
,
action: :created
)
Users
::
LastPushEventService
.
new
(
user
).
cache_last_push_event
(
event
)
Users
::
LastPushEventService
.
new
(
user
).
cache_last_push_event
(
event
)
...
@@ -165,9 +167,9 @@ describe 'Dashboard Projects' do
...
@@ -165,9 +167,9 @@ describe 'Dashboard Projects' do
end
end
expect
(
page
).
to
have_selector
(
'.merge-request-form'
)
expect
(
page
).
to
have_selector
(
'.merge-request-form'
)
expect
(
current_path
).
to
eq
project_new_merge_request_path
(
project
)
expect
(
current_path
).
to
eq
project_new_merge_request_path
(
project
,
merge_request_source_branch:
ref
)
expect
(
find
(
'#merge_request_target_project_id'
,
visible:
false
).
value
).
to
eq
project
.
id
.
to_s
expect
(
find
(
'#merge_request_target_project_id'
,
visible:
false
).
value
).
to
eq
project
.
id
.
to_s
expect
(
find
(
'input#merge_request_source_branch'
,
visible:
false
).
value
).
to
eq
'feature'
expect
(
find
(
'input#merge_request_source_branch'
,
visible:
false
).
value
).
to
eq
ref
expect
(
find
(
'input#merge_request_target_branch'
,
visible:
false
).
value
).
to
eq
'master'
expect
(
find
(
'input#merge_request_target_branch'
,
visible:
false
).
value
).
to
eq
'master'
end
end
end
end
...
...
spec/features/projects/files/user_creates_directory_spec.rb
View file @
4fc53067
...
@@ -57,7 +57,7 @@ describe 'Projects > Files > User creates a directory', :js do
...
@@ -57,7 +57,7 @@ describe 'Projects > Files > User creates a directory', :js do
expect
(
page
).
to
have_content
(
'From new-feature into master'
)
expect
(
page
).
to
have_content
(
'From new-feature into master'
)
expect
(
page
).
to
have_content
(
'Add new directory'
)
expect
(
page
).
to
have_content
(
'Add new directory'
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
project
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
project
,
merge_request_source_branch:
"new-feature"
))
end
end
end
end
...
@@ -80,8 +80,7 @@ describe 'Projects > Files > User creates a directory', :js do
...
@@ -80,8 +80,7 @@ describe 'Projects > Files > User creates a directory', :js do
click_button
(
'Create directory'
)
click_button
(
'Create directory'
)
fork
=
user
.
fork_of
(
project2
.
reload
)
fork
=
user
.
fork_of
(
project2
.
reload
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
,
merge_request_source_branch:
"patch-1"
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
))
end
end
end
end
end
end
spec/features/projects/files/user_creates_files_spec.rb
View file @
4fc53067
...
@@ -144,7 +144,7 @@ describe 'Projects > Files > User creates files' do
...
@@ -144,7 +144,7 @@ describe 'Projects > Files > User creates files' do
fill_in
(
:branch_name
,
with:
'new_branch_name'
,
visible:
true
)
fill_in
(
:branch_name
,
with:
'new_branch_name'
,
visible:
true
)
click_button
(
'Commit changes'
)
click_button
(
'Commit changes'
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
project
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
project
,
merge_request_source_branch:
"new_branch_name"
))
click_link
(
'Changes'
)
click_link
(
'Changes'
)
...
@@ -182,7 +182,7 @@ describe 'Projects > Files > User creates files' do
...
@@ -182,7 +182,7 @@ describe 'Projects > Files > User creates files' do
fork
=
user
.
fork_of
(
project2
.
reload
)
fork
=
user
.
fork_of
(
project2
.
reload
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
,
merge_request_source_branch:
"patch-1"
))
expect
(
page
).
to
have_content
(
'New commit message'
)
expect
(
page
).
to
have_content
(
'New commit message'
)
end
end
end
end
...
...
spec/features/projects/files/user_deletes_files_spec.rb
View file @
4fc53067
...
@@ -63,7 +63,7 @@ describe 'Projects > Files > User deletes files', :js do
...
@@ -63,7 +63,7 @@ describe 'Projects > Files > User deletes files', :js do
fork
=
user
.
fork_of
(
project2
.
reload
)
fork
=
user
.
fork_of
(
project2
.
reload
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
,
merge_request_source_branch:
"patch-1"
))
expect
(
page
).
to
have_content
(
'New commit message'
)
expect
(
page
).
to
have_content
(
'New commit message'
)
end
end
end
end
...
...
spec/features/projects/files/user_edits_files_spec.rb
View file @
4fc53067
...
@@ -86,7 +86,7 @@ describe 'Projects > Files > User edits files', :js do
...
@@ -86,7 +86,7 @@ describe 'Projects > Files > User edits files', :js do
fill_in
(
:branch_name
,
with:
'new_branch_name'
,
visible:
true
)
fill_in
(
:branch_name
,
with:
'new_branch_name'
,
visible:
true
)
click_button
(
'Commit changes'
)
click_button
(
'Commit changes'
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
project
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
project
,
merge_request_source_branch:
"new_branch_name"
))
click_link
(
'Changes'
)
click_link
(
'Changes'
)
...
@@ -155,7 +155,7 @@ describe 'Projects > Files > User edits files', :js do
...
@@ -155,7 +155,7 @@ describe 'Projects > Files > User edits files', :js do
fork
=
user
.
fork_of
(
project2
.
reload
)
fork
=
user
.
fork_of
(
project2
.
reload
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
,
merge_request_source_branch:
"patch-1"
))
wait_for_requests
wait_for_requests
...
@@ -183,7 +183,7 @@ describe 'Projects > Files > User edits files', :js do
...
@@ -183,7 +183,7 @@ describe 'Projects > Files > User edits files', :js do
fork
=
user
.
fork_of
(
project2
)
fork
=
user
.
fork_of
(
project2
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
,
merge_request_source_branch:
"patch-1"
))
wait_for_requests
wait_for_requests
...
...
spec/features/projects/files/user_replaces_files_spec.rb
View file @
4fc53067
...
@@ -78,7 +78,7 @@ describe 'Projects > Files > User replaces files', :js do
...
@@ -78,7 +78,7 @@ describe 'Projects > Files > User replaces files', :js do
fork
=
user
.
fork_of
(
project2
.
reload
)
fork
=
user
.
fork_of
(
project2
.
reload
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
,
merge_request_source_branch:
"undefined"
))
click_link
(
'Changes'
)
click_link
(
'Changes'
)
...
...
spec/features/projects/files/user_uploads_files_spec.rb
View file @
4fc53067
...
@@ -36,7 +36,7 @@ describe 'Projects > Files > User uploads files' do
...
@@ -36,7 +36,7 @@ describe 'Projects > Files > User uploads files' do
click_button
(
'Upload file'
)
click_button
(
'Upload file'
)
expect
(
page
).
to
have_content
(
'New commit message'
)
expect
(
page
).
to
have_content
(
'New commit message'
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
project
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
project
,
merge_request_source_branch:
"new_branch_name"
))
click_link
(
'Changes'
)
click_link
(
'Changes'
)
find
(
"a[data-action='diffs']"
,
text:
'Changes'
).
click
find
(
"a[data-action='diffs']"
,
text:
'Changes'
).
click
...
@@ -92,7 +92,7 @@ describe 'Projects > Files > User uploads files' do
...
@@ -92,7 +92,7 @@ describe 'Projects > Files > User uploads files' do
fork
=
user
.
fork_of
(
project2
.
reload
)
fork
=
user
.
fork_of
(
project2
.
reload
)
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
))
expect
(
current_path
).
to
eq
(
project_new_merge_request_path
(
fork
,
merge_request_source_branch:
"undefined"
))
find
(
"a[data-action='diffs']"
,
text:
'Changes'
).
click
find
(
"a[data-action='diffs']"
,
text:
'Changes'
).
click
...
...
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