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
Tatuya Kamada
gitlab-ce
Commits
c380d766
Commit
c380d766
authored
Apr 06, 2017
by
Jose Ivan Vargas Lopez
Committed by
Jose Ivan Vargas
Apr 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed button capitalisation for Projects in views
parent
7592137f
Changes
47
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
216 additions
and
167 deletions
+216
-167
app/helpers/blob_helper.rb
app/helpers/blob_helper.rb
+1
-1
app/views/projects/_find_file_link.html.haml
app/views/projects/_find_file_link.html.haml
+1
-1
app/views/projects/_last_push.html.haml
app/views/projects/_last_push.html.haml
+2
-2
app/views/projects/blob/_header.html.haml
app/views/projects/blob/_header.html.haml
+1
-1
app/views/projects/branches/_branch.html.haml
app/views/projects/branches/_branch.html.haml
+1
-1
app/views/projects/builds/index.html.haml
app/views/projects/builds/index.html.haml
+1
-1
app/views/projects/commit/_commit_box.html.haml
app/views/projects/commit/_commit_box.html.haml
+1
-1
app/views/projects/commits/show.html.haml
app/views/projects/commits/show.html.haml
+3
-3
app/views/projects/compare/_form.html.haml
app/views/projects/compare/_form.html.haml
+2
-2
app/views/projects/forks/error.html.haml
app/views/projects/forks/error.html.haml
+1
-1
app/views/projects/issues/index.html.haml
app/views/projects/issues/index.html.haml
+2
-2
app/views/projects/merge_requests/widget/_merged_buttons.haml
...views/projects/merge_requests/widget/_merged_buttons.haml
+1
-1
app/views/projects/merge_requests/widget/open/_accept.html.haml
...ews/projects/merge_requests/widget/open/_accept.html.haml
+5
-5
app/views/projects/merge_requests/widget/open/_merge_when_pipeline_succeeds.html.haml
...uests/widget/open/_merge_when_pipeline_succeeds.html.haml
+2
-2
app/views/projects/milestones/index.html.haml
app/views/projects/milestones/index.html.haml
+2
-2
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+2
-2
app/views/projects/notes/_edit_form.html.haml
app/views/projects/notes/_edit_form.html.haml
+1
-1
app/views/projects/wikis/_main_links.html.haml
app/views/projects/wikis/_main_links.html.haml
+2
-2
app/views/projects/wikis/_new.html.haml
app/views/projects/wikis/_new.html.haml
+1
-1
app/views/projects/wikis/edit.html.haml
app/views/projects/wikis/edit.html.haml
+2
-2
app/views/shared/labels/_form.html.haml
app/views/shared/labels/_form.html.haml
+1
-1
app/views/shared/web_hooks/_form.html.haml
app/views/shared/web_hooks/_form.html.haml
+1
-1
features/steps/project/builds/summary.rb
features/steps/project/builds/summary.rb
+1
-1
features/steps/project/commits/commits.rb
features/steps/project/commits/commits.rb
+4
-4
features/steps/project/deploy_keys.rb
features/steps/project/deploy_keys.rb
+1
-1
features/steps/project/hooks.rb
features/steps/project/hooks.rb
+2
-2
features/steps/project/issues/issues.rb
features/steps/project/issues/issues.rb
+1
-1
features/steps/project/issues/labels.rb
features/steps/project/issues/labels.rb
+3
-3
features/steps/project/issues/milestones.rb
features/steps/project/issues/milestones.rb
+1
-1
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+4
-4
features/steps/project/merge_requests/acceptance.rb
features/steps/project/merge_requests/acceptance.rb
+3
-3
features/steps/project/merge_requests/revert.rb
features/steps/project/merge_requests/revert.rb
+1
-1
features/steps/project/project_find_file.rb
features/steps/project/project_find_file.rb
+1
-1
features/steps/project/source/browse_files.rb
features/steps/project/source/browse_files.rb
+1
-1
features/steps/project/source/markdown_render.rb
features/steps/project/source/markdown_render.rb
+6
-2
features/steps/project/wiki.rb
features/steps/project/wiki.rb
+18
-10
features/steps/shared/note.rb
features/steps/shared/note.rb
+1
-1
spec/features/merge_requests/check_if_mergeable_with_unresolved_discussions_spec.rb
...ts/check_if_mergeable_with_unresolved_discussions_spec.rb
+4
-4
spec/features/merge_requests/create_new_mr_spec.rb
spec/features/merge_requests/create_new_mr_spec.rb
+1
-1
spec/features/merge_requests/merge_immediately_with_pipeline_spec.rb
...es/merge_requests/merge_immediately_with_pipeline_spec.rb
+1
-1
spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb
...tures/merge_requests/merge_when_pipeline_succeeds_spec.rb
+19
-19
spec/features/merge_requests/only_allow_merge_if_build_succeeds_spec.rb
...merge_requests/only_allow_merge_if_build_succeeds_spec.rb
+12
-12
spec/features/merge_requests/widget_spec.rb
spec/features/merge_requests/widget_spec.rb
+1
-1
spec/features/projects/files/template_type_dropdown_spec.rb
spec/features/projects/files/template_type_dropdown_spec.rb
+1
-1
spec/features/projects/merge_request_button_spec.rb
spec/features/projects/merge_request_button_spec.rb
+12
-12
spec/features/projects/wiki/markdown_preview_spec.rb
spec/features/projects/wiki/markdown_preview_spec.rb
+39
-21
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
+42
-23
No files found.
app/helpers/blob_helper.rb
View file @
c380d766
...
...
@@ -102,7 +102,7 @@ module BlobHelper
if
Gitlab
::
MarkupHelper
.
previewable?
(
filename
)
'Preview'
else
'Preview
C
hanges'
'Preview
c
hanges'
end
end
...
...
app/views/projects/_find_file_link.html.haml
View file @
c380d766
=
link_to
namespace_project_find_file_path
(
@project
.
namespace
,
@project
,
@ref
),
class:
'btn btn-grouped shortcuts-find-file'
,
rel:
'nofollow'
do
=
icon
(
'search'
)
%span
Find
F
ile
%span
Find
f
ile
app/views/projects/_last_push.html.haml
View file @
c380d766
...
...
@@ -14,5 +14,5 @@
#{
time_ago_with_tooltip
(
event
.
created_at
)
}
.pull-right
=
link_to
new_mr_path_from_push_event
(
event
),
title:
"New
Merge R
equest"
,
class:
"btn btn-info btn-sm"
do
Create
Merge R
equest
=
link_to
new_mr_path_from_push_event
(
event
),
title:
"New
merge r
equest"
,
class:
"btn btn-info btn-sm"
do
Create
merge r
equest
app/views/projects/blob/_header.html.haml
View file @
c380d766
...
...
@@ -20,7 +20,7 @@
-# only show normal/blame view links for text files
-
if
blob_text_viewable?
(
blob
)
-
if
current_page?
namespace_project_blame_path
(
@project
.
namespace
,
@project
,
@id
)
=
link_to
'Normal
V
iew'
,
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
@id
),
=
link_to
'Normal
v
iew'
,
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
@id
),
class:
'btn btn-sm'
-
else
=
link_to
'Blame'
,
namespace_project_blame_path
(
@project
.
namespace
,
@project
,
@id
),
...
...
app/views/projects/branches/_branch.html.haml
View file @
c380d766
...
...
@@ -21,7 +21,7 @@
.controls.hidden-xs
<
-
if
merge_project
&&
create_mr_button?
(
@repository
.
root_ref
,
branch
.
name
)
=
link_to
create_mr_path
(
@repository
.
root_ref
,
branch
.
name
),
class:
'btn btn-default'
do
Merge
R
equest
Merge
r
equest
-
if
branch
.
name
!=
@repository
.
root_ref
=
link_to
namespace_project_compare_index_path
(
@project
.
namespace
,
@project
,
from:
@repository
.
root_ref
,
to:
branch
.
name
),
class:
"btn btn-default
#{
'prepend-left-10'
unless
merge_project
}
"
,
method: :post
,
title:
"Compare"
do
...
...
app/views/projects/builds/index.html.haml
View file @
c380d766
...
...
@@ -17,7 +17,7 @@
=
link_to
'Get started with CI/CD Pipelines'
,
help_page_path
(
'ci/quick_start/README'
),
class:
'btn btn-info'
=
link_to
ci_lint_path
,
class:
'btn btn-default'
do
%span
CI
L
int
%span
CI
l
int
.content-list.builds-content-list
=
render
"table"
,
builds:
@builds
,
project:
@project
app/views/projects/commit/_commit_box.html.haml
View file @
c380d766
...
...
@@ -20,7 +20,7 @@
=
icon
(
'comment'
)
=
@notes_count
=
link_to
namespace_project_tree_path
(
@project
.
namespace
,
@project
,
@commit
),
class:
"btn btn-default append-right-10 hidden-xs hidden-sm"
do
Browse
F
iles
Browse
f
iles
.dropdown.inline
%a
.btn.btn-default.dropdown-toggle
{
data:
{
toggle:
"dropdown"
}
}
%span
Options
...
...
app/views/projects/commits/show.html.haml
View file @
c380d766
...
...
@@ -18,16 +18,16 @@
.block-controls.hidden-xs.hidden-sm
-
if
@merge_request
.
present?
.control
=
link_to
"View
Open Merge R
equest"
,
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'btn'
=
link_to
"View
open merge r
equest"
,
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'btn'
-
elsif
create_mr_button?
(
@repository
.
root_ref
,
@ref
)
.control
=
link_to
"Create
Merge R
equest"
,
create_mr_path
(
@repository
.
root_ref
,
@ref
),
class:
'btn btn-success'
=
link_to
"Create
merge r
equest"
,
create_mr_path
(
@repository
.
root_ref
,
@ref
),
class:
'btn btn-success'
.control
=
form_tag
(
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@id
),
method: :get
,
class:
'commits-search-form'
)
do
=
search_field_tag
:search
,
params
[
:search
],
{
placeholder:
'Filter by commit message'
,
id:
'commits-search'
,
class:
'form-control search-text-input input-short'
,
spellcheck:
false
}
.control
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@ref
,
rss_url_options
),
title:
"Commits
F
eed"
,
class:
'btn'
do
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@ref
,
rss_url_options
),
title:
"Commits
f
eed"
,
class:
'btn'
do
=
icon
(
"rss"
)
%div
{
id:
dom_id
(
@project
)
}
...
...
app/views/projects/compare/_form.html.haml
View file @
c380d766
...
...
@@ -21,6 +21,6 @@
=
button_tag
"Compare"
,
class:
"btn btn-create commits-compare-btn"
-
if
@merge_request
.
present?
=
link_to
"View
Open Merge R
equest"
,
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'prepend-left-10 btn'
=
link_to
"View
open merge r
equest"
,
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'prepend-left-10 btn'
-
elsif
create_mr_button?
=
link_to
"Create
Merge R
equest"
,
create_mr_path
,
class:
'prepend-left-10 btn'
=
link_to
"Create
merge r
equest"
,
create_mr_path
,
class:
'prepend-left-10 btn'
app/views/projects/forks/error.html.haml
View file @
c380d766
...
...
@@ -22,4 +22,4 @@
%p
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork"
,
class:
"btn"
do
%i
.fa.fa-code-fork
Try to
F
ork again
Try to
f
ork again
app/views/projects/issues/index.html.haml
View file @
c380d766
...
...
@@ -24,9 +24,9 @@
issue:
{
assignee_id:
issues_finder
.
assignee
.
try
(
:id
),
milestone_id:
issues_finder
.
milestones
.
first
.
try
(
:id
)
}),
class:
"btn btn-new"
,
title:
"New
I
ssue"
,
title:
"New
i
ssue"
,
id:
"new_issue_link"
do
New
I
ssue
New
i
ssue
=
render
'shared/issuable/search_bar'
,
type: :issues
.issues-holder
...
...
app/views/projects/merge_requests/widget/_merged_buttons.haml
View file @
c380d766
...
...
@@ -7,7 +7,7 @@
-
if
can_remove_source_branch
=
link_to
namespace_project_branch_path
(
@merge_request
.
source_project
.
namespace
,
@merge_request
.
source_project
,
@merge_request
.
source_branch
),
remote:
true
,
method: :delete
,
class:
"btn btn-default remove_source_branch"
do
=
icon
(
'trash-o'
)
Remove
Source B
ranch
Remove
source b
ranch
-
if
mr_can_be_reverted
=
revert_commit_link
(
@merge_request
.
merge_commit
,
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
btn_class:
"close"
)
-
if
mr_can_be_cherry_picked
...
...
app/views/projects/merge_requests/widget/open/_accept.html.haml
View file @
c380d766
...
...
@@ -10,24 +10,24 @@
-
if
@pipeline
&&
@pipeline
.
active?
%span
.btn-group
=
button_tag
class:
"btn btn-info js-merge-when-pipeline-succeeds-button merge-when-pipeline-succeeds"
do
Merge
When Pipeline S
ucceeds
Merge
when pipeline s
ucceeds
-
unless
@project
.
only_allow_merge_if_pipeline_succeeds?
=
button_tag
class:
"btn btn-info dropdown-toggle"
,
'data-toggle'
=>
'dropdown'
do
=
icon
(
'caret-down'
)
%span
.sr-only
Select
Merge M
oment
Select
merge m
oment
%ul
.js-merge-dropdown.dropdown-menu.dropdown-menu-right
{
role:
'menu'
}
%li
=
link_to
"#"
,
class:
"merge_when_pipeline_succeeds"
do
=
icon
(
'check fw'
)
Merge
When Pipeline S
ucceeds
Merge
when pipeline s
ucceeds
%li
=
link_to
"#"
,
class:
"accept-merge-request"
do
=
icon
(
'warning fw'
)
Merge
I
mmediately
Merge
i
mmediately
-
else
=
f
.
button
class:
"btn btn-grouped js-merge-button accept-merge-request"
do
Accept
Merge R
equest
Accept
merge r
equest
-
if
@merge_request
.
force_remove_source_branch?
.accept-control
The source branch will be removed.
...
...
app/views/projects/merge_requests/widget/open/_merge_when_pipeline_succeeds.html.haml
View file @
c380d766
...
...
@@ -26,8 +26,8 @@
-
if
remove_source_branch_button
=
link_to
merge_namespace_project_merge_request_path
(
@merge_request
.
target_project
.
namespace
,
@merge_request
.
target_project
,
@merge_request
,
merge_params
(
@merge_request
)),
remote:
true
,
method: :post
,
class:
"btn btn-grouped btn-primary btn-sm remove_source_branch"
do
=
icon
(
'times'
)
Remove
Source Branch When M
erged
Remove
source branch when m
erged
-
if
user_can_cancel_automatic_merge
=
link_to
cancel_merge_when_pipeline_succeeds_namespace_project_merge_request_path
(
@merge_request
.
target_project
.
namespace
,
@merge_request
.
target_project
,
@merge_request
),
remote:
true
,
method: :post
,
class:
"btn btn-grouped btn-sm"
do
Cancel
Automatic M
erge
Cancel
automatic m
erge
app/views/projects/milestones/index.html.haml
View file @
c380d766
...
...
@@ -9,8 +9,8 @@
.nav-controls
=
render
'shared/milestones_sort_dropdown'
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
=
link_to
new_namespace_project_milestone_path
(
@project
.
namespace
,
@project
),
class:
'btn btn-new'
,
title:
'New
M
ilestone'
do
New
M
ilestone
=
link_to
new_namespace_project_milestone_path
(
@project
.
namespace
,
@project
),
class:
'btn btn-new'
,
title:
'New
m
ilestone'
do
New
m
ilestone
.milestones
%ul
.content-list
...
...
app/views/projects/milestones/show.html.haml
View file @
c380d766
...
...
@@ -23,9 +23,9 @@
.milestone-buttons
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
-
if
@milestone
.
active?
=
link_to
'Close
M
ilestone'
,
namespace_project_milestone_path
(
@project
.
namespace
,
@project
,
@milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-close btn-nr btn-grouped"
=
link_to
'Close
m
ilestone'
,
namespace_project_milestone_path
(
@project
.
namespace
,
@project
,
@milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-close btn-nr btn-grouped"
-
else
=
link_to
'Reopen
M
ilestone'
,
namespace_project_milestone_path
(
@project
.
namespace
,
@project
,
@milestone
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-reopen btn-nr btn-grouped"
=
link_to
'Reopen
m
ilestone'
,
namespace_project_milestone_path
(
@project
.
namespace
,
@project
,
@milestone
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-reopen btn-nr btn-grouped"
=
link_to
edit_namespace_project_milestone_path
(
@project
.
namespace
,
@project
,
@milestone
),
class:
"btn btn-grouped btn-nr"
do
Edit
...
...
app/views/projects/notes/_edit_form.html.haml
View file @
c380d766
...
...
@@ -9,6 +9,6 @@
.note-form-actions.clearfix
.settings-message.note-edit-warning.js-edit-warning
Finish editing this message first!
=
submit_tag
'Save
C
omment'
,
class:
'btn btn-nr btn-save js-comment-button'
=
submit_tag
'Save
c
omment'
,
class:
'btn btn-nr btn-save js-comment-button'
%button
.btn.btn-nr.btn-cancel.note-edit-cancel
{
type:
'button'
}
Cancel
app/views/projects/wikis/_main_links.html.haml
View file @
c380d766
-
if
(
@page
&&
@page
.
persisted?
)
-
if
can?
(
current_user
,
:create_wiki
,
@project
)
=
link_to
'#modal-new-wiki'
,
class:
"add-new-wiki btn btn-new"
,
"data-toggle"
=>
"modal"
do
New
P
age
New
p
age
=
link_to
namespace_project_wiki_history_path
(
@project
.
namespace
,
@project
,
@page
),
class:
"btn"
do
Page
H
istory
Page
h
istory
-
if
can?
(
current_user
,
:create_wiki
,
@project
)
&&
@page
.
latest?
=
link_to
namespace_project_wiki_edit_path
(
@project
.
namespace
,
@project
,
@page
),
class:
"btn"
do
Edit
app/views/projects/wikis/_new.html.haml
View file @
c380d766
...
...
@@ -18,4 +18,4 @@
Tip: You can specify the full path for the new file.
We will automatically create any missing directories.
.form-actions
=
button_tag
'Create
P
age'
,
class:
'build-new-wiki btn btn-create'
=
button_tag
'Create
p
age'
,
class:
'build-new-wiki btn btn-create'
app/views/projects/wikis/edit.html.haml
View file @
c380d766
...
...
@@ -22,10 +22,10 @@
.nav-controls
-
if
can?
(
current_user
,
:create_wiki
,
@project
)
=
link_to
'#modal-new-wiki'
,
class:
"add-new-wiki btn btn-new"
,
"data-toggle"
=>
"modal"
do
New
P
age
New
p
age
-
if
@page
.
persisted?
=
link_to
namespace_project_wiki_history_path
(
@project
.
namespace
,
@project
,
@page
),
class:
"btn"
do
Page
H
istory
Page
h
istory
-
if
can?
(
current_user
,
:admin_wiki
,
@project
)
=
link_to
namespace_project_wiki_path
(
@project
.
namespace
,
@project
,
@page
),
data:
{
confirm:
"Are you sure you want to delete this page?"
},
method: :delete
,
class:
"btn btn-danger"
do
Delete
...
...
app/views/shared/labels/_form.html.haml
View file @
c380d766
...
...
@@ -29,5 +29,5 @@
-
if
@label
.
persisted?
=
f
.
submit
'Save changes'
,
class:
'btn btn-save js-save-button'
-
else
=
f
.
submit
'Create
L
abel'
,
class:
'btn btn-create js-save-button'
=
f
.
submit
'Create
l
abel'
,
class:
'btn btn-create js-save-button'
=
link_to
'Cancel'
,
back_path
,
class:
'btn btn-cancel'
app/views/shared/web_hooks/_form.html.haml
View file @
c380d766
...
...
@@ -89,7 +89,7 @@
=
f
.
label
:enable_ssl_verification
do
=
f
.
check_box
:enable_ssl_verification
%strong
Enable SSL verification
=
f
.
submit
"Add
W
ebhook"
,
class:
"btn btn-create"
=
f
.
submit
"Add
w
ebhook"
,
class:
"btn btn-create"
%hr
%h5
.prepend-top-default
Webhooks (
#{
hooks
.
count
}
)
...
...
features/steps/project/builds/summary.rb
View file @
c380d766
...
...
@@ -12,7 +12,7 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
step
'I see button to CI Lint'
do
page
.
within
(
'.nav-controls'
)
do
ci_lint_tool_link
=
page
.
find_link
(
'CI
L
int'
)
ci_lint_tool_link
=
page
.
find_link
(
'CI
l
int'
)
expect
(
ci_lint_tool_link
[
:href
]).
to
eq
ci_lint_path
end
end
...
...
features/steps/project/commits/commits.rb
View file @
c380d766
...
...
@@ -13,7 +13,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end
step
'I click atom feed link'
do
click_link
"Commits
F
eed"
click_link
"Commits
f
eed"
end
step
'I see commits atom feed'
do
...
...
@@ -110,16 +110,16 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end
step
'I see button to create a new merge request'
do
expect
(
page
).
to
have_link
'Create
Merge R
equest'
expect
(
page
).
to
have_link
'Create
merge r
equest'
end
step
'I should not see button to create a new merge request'
do
expect
(
page
).
not_to
have_link
'Create
Merge R
equest'
expect
(
page
).
not_to
have_link
'Create
merge r
equest'
end
step
'I should see button to the merge request'
do
merge_request
=
MergeRequest
.
find_by
(
title:
'Feature'
)
expect
(
page
).
to
have_link
"View
Open Merge R
equest"
,
href:
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
merge_request
)
expect
(
page
).
to
have_link
"View
open merge r
equest"
,
href:
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
merge_request
)
end
step
'I see breadcrumb links'
do
...
...
features/steps/project/deploy_keys.rb
View file @
c380d766
...
...
@@ -26,7 +26,7 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end
step
'I click \'New Deploy Key\''
do
click_link
'New
Deploy K
ey'
click_link
'New
deploy k
ey'
end
step
'I submit new deploy key'
do
...
...
features/steps/project/hooks.rb
View file @
c380d766
...
...
@@ -25,14 +25,14 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
step
'I submit new hook'
do
@url
=
'http://example.org/1'
fill_in
"hook_url"
,
with:
@url
expect
{
click_button
"Add
W
ebhook"
}.
to
change
(
ProjectHook
,
:count
).
by
(
1
)
expect
{
click_button
"Add
w
ebhook"
}.
to
change
(
ProjectHook
,
:count
).
by
(
1
)
end
step
'I submit new hook with SSL verification enabled'
do
@url
=
'http://example.org/2'
fill_in
"hook_url"
,
with:
@url
check
"hook_enable_ssl_verification"
expect
{
click_button
"Add
W
ebhook"
}.
to
change
(
ProjectHook
,
:count
).
by
(
1
)
expect
{
click_button
"Add
w
ebhook"
}.
to
change
(
ProjectHook
,
:count
).
by
(
1
)
end
step
'I should see newly created hook'
do
...
...
features/steps/project/issues/issues.rb
View file @
c380d766
...
...
@@ -61,7 +61,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
expect
(
page
).
to
have_content
"Tweet control"
end
step
'I click link "New
I
ssue"'
do
step
'I click link "New
i
ssue"'
do
page
.
has_link?
(
'New Issue'
)
?
click_link
(
'New Issue'
)
:
click_link
(
'New issue'
)
end
...
...
features/steps/project/issues/labels.rb
View file @
c380d766
...
...
@@ -31,19 +31,19 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
step
'I submit new label \'support\''
do
fill_in
'Title'
,
with:
'support'
fill_in
'Background color'
,
with:
'#F95610'
click_button
'Create
L
abel'
click_button
'Create
l
abel'
end
step
'I submit new label \'bug\''
do
fill_in
'Title'
,
with:
'bug'
fill_in
'Background color'
,
with:
'#F95610'
click_button
'Create
L
abel'
click_button
'Create
l
abel'
end
step
'I submit new label with invalid color'
do
fill_in
'Title'
,
with:
'support'
fill_in
'Background color'
,
with:
'#12'
click_button
'Create
L
abel'
click_button
'Create
l
abel'
end
step
'I should see label label exist error message'
do
...
...
features/steps/project/issues/milestones.rb
View file @
c380d766
...
...
@@ -16,7 +16,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps
end
step
'I click link "New Milestone"'
do
click_link
"New
M
ilestone"
click_link
"New
m
ilestone"
end
step
'I submit new milestone "v2.3"'
do
...
...
features/steps/project/merge_requests.rb
View file @
c380d766
...
...
@@ -300,10 +300,10 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
page
.
within
(
'.current-note-edit-form'
,
visible:
true
)
do
fill_in
'note_note'
,
with:
'Typo, please fix'
click_button
'Save
C
omment'
click_button
'Save
c
omment'
end
expect
(
page
).
not_to
have_button
'Save
C
omment'
,
disabled:
true
,
visible:
true
expect
(
page
).
not_to
have_button
'Save
c
omment'
,
disabled:
true
,
visible:
true
end
end
...
...
@@ -378,7 +378,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step
'merge request is mergeable'
do
expect
(
page
).
to
have_button
'Accept
Merge R
equest'
expect
(
page
).
to
have_button
'Accept
merge r
equest'
end
step
'I modify merge commit message'
do
...
...
@@ -392,7 +392,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step
'I accept this merge request'
do
page
.
within
'.mr-state-widget'
do
click_button
"Accept
Merge R
equest"
click_button
"Accept
merge r
equest"
end
end
...
...
features/steps/project/merge_requests/acceptance.rb
View file @
c380d766
...
...
@@ -15,15 +15,15 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
end
step
'I click on Accept Merge Request'
do
click_button
(
'Accept
Merge R
equest'
)
click_button
(
'Accept
merge r
equest'
)
end
step
'I should see the Remove Source Branch button'
do
expect
(
page
).
to
have_link
(
'Remove
Source B
ranch'
)
expect
(
page
).
to
have_link
(
'Remove
source b
ranch'
)
end
step
'I should not see the Remove Source Branch button'
do
expect
(
page
).
not_to
have_link
(
'Remove
Source B
ranch'
)
expect
(
page
).
not_to
have_link
(
'Remove
source b
ranch'
)
end
step
'There is an open Merge Request'
do
...
...
features/steps/project/merge_requests/revert.rb
View file @
c380d766
...
...
@@ -26,7 +26,7 @@ class Spinach::Features::RevertMergeRequests < Spinach::FeatureSteps
end
step
'I click on Accept Merge Request'
do
click_button
(
'Accept
Merge R
equest'
)
click_button
(
'Accept
merge r
equest'
)
end
step
'I am signed in as a developer of the project'
do
...
...
features/steps/project/project_find_file.rb
View file @
c380d766
...
...
@@ -9,7 +9,7 @@ class Spinach::Features::ProjectFindFile < Spinach::FeatureSteps
end
step
'I click Find File button'
do
click_link
'Find
F
ile'
click_link
'Find
f
ile'
end
step
'I should see "find file" page'
do
...
...
features/steps/project/source/browse_files.rb
View file @
c380d766
...
...
@@ -105,7 +105,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
step
'I click link "Diff"'
do
click_link
'Preview
C
hanges'
click_link
'Preview
c
hanges'
end
step
'I click on "Commit changes"'
do
...
...
features/steps/project/source/markdown_render.rb
View file @
c380d766
...
...
@@ -214,7 +214,9 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step
'I add various links to the wiki page'
do
fill_in
"wiki[content]"
,
with:
"[test](test)
\n
[GitLab API doc](api)
\n
[Rake tasks](raketasks)
\n
"
fill_in
"wiki[message]"
,
with:
"Adding links to wiki"
click_button
"Create page"
page
.
within
'.wiki-form'
do
click_button
"Create page"
end
end
step
'Wiki page should have added links'
do
...
...
@@ -225,7 +227,9 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step
'I add a header to the wiki page'
do
fill_in
"wiki[content]"
,
with:
"# Wiki header
\n
"
fill_in
"wiki[message]"
,
with:
"Add header to wiki"
click_button
"Create page"
page
.
within
'.wiki-form'
do
click_button
"Create page"
end
end
step
'Wiki header should have correct id and link'
do
...
...
features/steps/project/wiki.rb
View file @
c380d766
...
...
@@ -16,12 +16,16 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
step
'I create the Wiki Home page'
do
fill_in
"wiki_content"
,
with:
'[link test](test)'
click_on
"Create page"
page
.
within
'.wiki-form'
do
click_on
"Create page"
end
end
step
'I create the Wiki Home page with no content'
do
fill_in
"wiki_content"
,
with:
''
click_on
"Create page"
page
.
within
'.wiki-form'
do
click_on
"Create page"
end
end
step
'I should see the newly created wiki page'
do
...
...
@@ -29,7 +33,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
expect
(
page
).
to
have_content
"link test"
click_link
"link test"
expect
(
page
).
to
have_content
"Create
P
age"
expect
(
page
).
to
have_content
"Create
p
age"
end
step
'I have an existing Wiki page'
do
...
...
@@ -63,7 +67,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
end
step
'I click the History button'
do
click_on
"History"
click_on
'Page history'
end
step
'I should see both revisions'
do
...
...
@@ -121,15 +125,19 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
step
'I should see the new wiki page form'
do
expect
(
current_path
).
to
match
(
'wikis/image.jpg'
)
expect
(
page
).
to
have_content
(
'New Wiki Page'
)
expect
(
page
).
to
have_content
(
'Create
P
age'
)
expect
(
page
).
to
have_content
(
'Create
p
age'
)
end
step
'I create a New page with paths'
do
click_on
'New
P
age'
click_on
'New
p
age'
fill_in
'Page slug'
,
with:
'one/two/three-test'
click_on
'Create Page'
page
.
within
'#modal-new-wiki'
do
click_on
'Create page'
end
fill_in
"wiki_content"
,
with:
'wiki content'
click_on
"Create page"
page
.
within
'.wiki-form'
do
click_on
"Create page"
end
expect
(
current_path
).
to
include
'one/two/three-test'
end
...
...
@@ -154,11 +162,11 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
step
'I view the page history of a Wiki page that has a path'
do
click_on
'Three'
click_on
'Page
H
istory'
click_on
'Page
h
istory'
end
step
'I click on Page History'
do
click_on
'Page
H
istory'
click_on
'Page
h
istory'
end
step
'I should see the page history'
do
...
...
features/steps/shared/note.rb
View file @
c380d766
...
...
@@ -141,7 +141,7 @@ module SharedNote
page
.
within
(
".current-note-edit-form"
)
do
fill_in
'note[note]'
,
with:
'+1 Awesome!'
click_button
'Save
C
omment'
click_button
'Save
c
omment'
end
end
...
...
spec/features/merge_requests/check_if_mergeable_with_unresolved_discussions_spec.rb
View file @
c380d766
...
...
@@ -19,7 +19,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it
'does not allow to merge'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
not_to
have_button
'Accept
Merge R
equest'
expect
(
page
).
not_to
have_button
'Accept
merge r
equest'
expect
(
page
).
to
have_content
(
'This merge request has unresolved discussions'
)
end
end
...
...
@@ -32,7 +32,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it
'allows MR to be merged'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_button
'Accept
Merge R
equest'
expect
(
page
).
to
have_button
'Accept
merge r
equest'
end
end
end
...
...
@@ -46,7 +46,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it
'does not allow to merge'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_button
'Accept
Merge R
equest'
expect
(
page
).
to
have_button
'Accept
merge r
equest'
end
end
...
...
@@ -58,7 +58,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it
'allows MR to be merged'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_button
'Accept
Merge R
equest'
expect
(
page
).
to
have_button
'Accept
merge r
equest'
end
end
end
...
...
spec/features/merge_requests/create_new_mr_spec.rb
View file @
c380d766
...
...
@@ -26,7 +26,7 @@ feature 'Create New Merge Request', feature: true, js: true do
end
it
'selects the target branch sha when a tag with the same name exists'
do
visit
namespace_project_merge_requests_path
(
project
.
namespace
,
project
)
visit
namespace_project_merge_requests_path
(
project
.
namespace
,
project
)
click_link
'New merge request'
...
...
spec/features/merge_requests/merge_immediately_with_pipeline_spec.rb
View file @
c380d766
...
...
@@ -32,7 +32,7 @@ feature 'Merge immediately', :feature, :js do
page
.
within
'.mr-widget-body'
do
find
(
'.dropdown-toggle'
).
click
click_link
'Merge
I
mmediately'
click_link
'Merge
i
mmediately'
expect
(
find
(
'.js-merge-when-pipeline-succeeds-button'
)).
to
have_content
(
'Merge in progress'
)
...
...
spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb
View file @
c380d766
...
...
@@ -28,25 +28,25 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
visit_merge_request
(
merge_request
)
end
it
'displays the Merge
When Pipeline S
ucceeds button'
do
expect
(
page
).
to
have_button
"Merge
When Pipeline S
ucceeds"
it
'displays the Merge
when pipeline s
ucceeds button'
do
expect
(
page
).
to
have_button
"Merge
when pipeline s
ucceeds"
end
describe
'enabling Merge
When Pipeline S
ucceeds'
do
shared_examples
'Merge
When Pipeline S
ucceeds activator'
do
it
'activates the Merge
When Pipeline S
ucceeds feature'
do
click_button
"Merge
When Pipeline S
ucceeds"
describe
'enabling Merge
when pipeline s
ucceeds'
do
shared_examples
'Merge
when pipeline s
ucceeds activator'
do
it
'activates the Merge
when pipeline s
ucceeds feature'
do
click_button
"Merge
when pipeline s
ucceeds"
expect
(
page
).
to
have_content
"Set by
#{
user
.
name
}
to be merged automatically when the pipeline succeeds."
expect
(
page
).
to
have_content
"The source branch will not be removed."
expect
(
page
).
to
have_link
"Cancel
Automatic M
erge"
expect
(
page
).
to
have_link
"Cancel
automatic m
erge"
visit_merge_request
(
merge_request
)
# Needed to refresh the page
expect
(
page
).
to
have_content
/enabled an automatic merge when the pipeline for \h{8} succeeds/i
end
end
context
"when enabled immediately"
do
it_behaves_like
'Merge
When Pipeline S
ucceeds activator'
it_behaves_like
'Merge
when pipeline s
ucceeds activator'
end
context
'when enabled after pipeline status changed'
do
...
...
@@ -60,16 +60,16 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
expect
(
page
).
to
have_content
"Pipeline #
#{
pipeline
.
id
}
running"
end
it_behaves_like
'Merge
When Pipeline S
ucceeds activator'
it_behaves_like
'Merge
when pipeline s
ucceeds activator'
end
context
'when enabled after it was previously canceled'
do
before
do
click_button
"Merge
When Pipeline S
ucceeds"
click_link
"Cancel
Automatic M
erge"
click_button
"Merge
when pipeline s
ucceeds"
click_link
"Cancel
automatic m
erge"
end
it_behaves_like
'Merge
When Pipeline S
ucceeds activator'
it_behaves_like
'Merge
when pipeline s
ucceeds activator'
end
context
'when it was enabled and then canceled'
do
...
...
@@ -83,10 +83,10 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
end
before
do
click_link
"Cancel
Automatic M
erge"
click_link
"Cancel
automatic m
erge"
end
it_behaves_like
'Merge
When Pipeline S
ucceeds activator'
it_behaves_like
'Merge
when pipeline s
ucceeds activator'
end
end
end
...
...
@@ -110,18 +110,18 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
end
it
'allows to cancel the automatic merge'
do
click_link
"Cancel
Automatic M
erge"
click_link
"Cancel
automatic m
erge"
expect
(
page
).
to
have_button
"Merge
When Pipeline S
ucceeds"
expect
(
page
).
to
have_button
"Merge
when pipeline s
ucceeds"
visit_merge_request
(
merge_request
)
# refresh the page
expect
(
page
).
to
have_content
"canceled the automatic merge"
end
it
"allows the user to remove the source branch"
do
expect
(
page
).
to
have_link
"Remove
Source Branch When M
erged"
expect
(
page
).
to
have_link
"Remove
source branch when m
erged"
click_link
"Remove
Source Branch When M
erged"
click_link
"Remove
source branch when m
erged"
expect
(
page
).
to
have_content
"The source branch will be removed"
end
...
...
@@ -141,7 +141,7 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
it
"does not allow to enable merge when pipeline succeeds"
do
visit_merge_request
(
merge_request
)
expect
(
page
).
not_to
have_link
'Merge
When Pipeline S
ucceeds'
expect
(
page
).
not_to
have_link
'Merge
when pipeline s
ucceeds'
end
end
...
...
spec/features/merge_requests/only_allow_merge_if_build_succeeds_spec.rb
View file @
c380d766
...
...
@@ -14,7 +14,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it
'allows MR to be merged'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_button
'Accept
Merge R
equest'
expect
(
page
).
to
have_button
'Accept
merge r
equest'
end
end
...
...
@@ -38,8 +38,8 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it
'does not allow to merge immediately'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_button
'Merge
When Pipeline S
ucceeds'
expect
(
page
).
not_to
have_button
'Select
Merge M
oment'
expect
(
page
).
to
have_button
'Merge
when pipeline s
ucceeds'
expect
(
page
).
not_to
have_button
'Select
merge m
oment'
end
end
...
...
@@ -49,7 +49,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it
'does not allow MR to be merged'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
not_to
have_button
'Accept
Merge R
equest'
expect
(
page
).
not_to
have_button
'Accept
merge r
equest'
expect
(
page
).
to
have_content
(
'Please retry the job or push a new commit to fix the failure.'
)
end
end
...
...
@@ -60,7 +60,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it
'does not allow MR to be merged'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
not_to
have_button
'Accept
Merge R
equest'
expect
(
page
).
not_to
have_button
'Accept
merge r
equest'
expect
(
page
).
to
have_content
(
'Please retry the job or push a new commit to fix the failure.'
)
end
end
...
...
@@ -71,7 +71,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it
'allows MR to be merged'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_button
'Accept
Merge R
equest'
expect
(
page
).
to
have_button
'Accept
merge r
equest'
end
end
...
...
@@ -81,7 +81,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it
'allows MR to be merged'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_button
'Accept
Merge R
equest'
expect
(
page
).
to
have_button
'Accept
merge r
equest'
end
end
end
...
...
@@ -97,10 +97,10 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it
'allows MR to be merged immediately'
,
js:
true
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_button
'Merge
When Pipeline S
ucceeds'
expect
(
page
).
to
have_button
'Merge
when pipeline s
ucceeds'
click_button
'Select
Merge M
oment'
expect
(
page
).
to
have_content
'Merge
I
mmediately'
click_button
'Select
merge m
oment'
expect
(
page
).
to
have_content
'Merge
i
mmediately'
end
end
...
...
@@ -110,7 +110,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it
'allows MR to be merged'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_button
'Accept
Merge R
equest'
expect
(
page
).
to
have_button
'Accept
merge r
equest'
end
end
...
...
@@ -120,7 +120,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it
'allows MR to be merged'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_button
'Accept
Merge R
equest'
expect
(
page
).
to
have_button
'Accept
merge r
equest'
end
end
end
...
...
spec/features/merge_requests/widget_spec.rb
View file @
c380d766
...
...
@@ -145,7 +145,7 @@ describe 'Merge request', :feature, :js do
before
do
allow_any_instance_of
(
Repository
).
to
receive
(
:merge
).
and_return
(
false
)
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
click_button
'Accept
Merge R
equest'
click_button
'Accept
merge r
equest'
wait_for_ajax
end
...
...
spec/features/projects/files/template_type_dropdown_spec.rb
View file @
c380d766
...
...
@@ -48,7 +48,7 @@ feature 'Template type dropdown selector', js: true do
context
'user previews changes'
do
before
do
click_link
'Preview
C
hanges'
click_link
'Preview
c
hanges'
end
scenario
'type selector is hidden and shown correctly'
do
...
...
spec/features/projects/merge_request_button_spec.rb
View file @
c380d766
require
'spec_helper'
feature
'Merge Request button'
,
feature:
true
do
shared_examples
'Merge
R
equest button only shown when allowed'
do
shared_examples
'Merge
r
equest button only shown when allowed'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:forked_project
)
{
create
(
:project
,
:public
,
forked_from_project:
project
)
}
context
'not logged in'
do
it
'does not show Create
Merge R
equest button'
do
it
'does not show Create
merge r
equest button'
do
visit
url
within
(
"#content-body"
)
do
...
...
@@ -22,7 +22,7 @@ feature 'Merge Request button', feature: true do
project
.
team
<<
[
user
,
:developer
]
end
it
'shows Create
Merge R
equest button'
do
it
'shows Create
merge r
equest button'
do
href
=
new_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request:
{
source_branch:
'feature'
,
...
...
@@ -40,7 +40,7 @@ feature 'Merge Request button', feature: true do
project
.
project_feature
.
update!
(
merge_requests_access_level:
ProjectFeature
::
DISABLED
)
end
it
'does not show Create
Merge R
equest button'
do
it
'does not show Create
merge r
equest button'
do
visit
url
within
(
"#content-body"
)
do
...
...
@@ -55,7 +55,7 @@ feature 'Merge Request button', feature: true do
login_as
(
user
)
end
it
'does not show Create
Merge R
equest button'
do
it
'does not show Create
merge r
equest button'
do
visit
url
within
(
"#content-body"
)
do
...
...
@@ -66,7 +66,7 @@ feature 'Merge Request button', feature: true do
context
'on own fork of project'
do
let
(
:user
)
{
forked_project
.
owner
}
it
'shows Create
Merge R
equest button'
do
it
'shows Create
merge r
equest button'
do
href
=
new_namespace_project_merge_request_path
(
forked_project
.
namespace
,
forked_project
,
merge_request:
{
source_branch:
'feature'
,
...
...
@@ -83,24 +83,24 @@ feature 'Merge Request button', feature: true do
end
context
'on branches page'
do
it_behaves_like
'Merge
R
equest button only shown when allowed'
do
let
(
:label
)
{
'Merge
R
equest'
}
it_behaves_like
'Merge
r
equest button only shown when allowed'
do
let
(
:label
)
{
'Merge
r
equest'
}
let
(
:url
)
{
namespace_project_branches_path
(
project
.
namespace
,
project
)
}
let
(
:fork_url
)
{
namespace_project_branches_path
(
forked_project
.
namespace
,
forked_project
)
}
end
end
context
'on compare page'
do
it_behaves_like
'Merge
R
equest button only shown when allowed'
do
let
(
:label
)
{
'Create
Merge R
equest'
}
it_behaves_like
'Merge
r
equest button only shown when allowed'
do
let
(
:label
)
{
'Create
merge r
equest'
}
let
(
:url
)
{
namespace_project_compare_path
(
project
.
namespace
,
project
,
from:
'master'
,
to:
'feature'
)
}
let
(
:fork_url
)
{
namespace_project_compare_path
(
forked_project
.
namespace
,
forked_project
,
from:
'master'
,
to:
'feature'
)
}
end
end
context
'on commits page'
do
it_behaves_like
'Merge
R
equest button only shown when allowed'
do
let
(
:label
)
{
'Create
Merge R
equest'
}
it_behaves_like
'Merge
r
equest button only shown when allowed'
do
let
(
:label
)
{
'Create
merge r
equest'
}
let
(
:url
)
{
namespace_project_commits_path
(
project
.
namespace
,
project
,
'feature'
)
}
let
(
:fork_url
)
{
namespace_project_commits_path
(
forked_project
.
namespace
,
forked_project
,
'feature'
)
}
end
...
...
spec/features/projects/wiki/markdown_preview_spec.rb
View file @
c380d766
...
...
@@ -24,12 +24,16 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t
context
"while creating a new wiki page"
do
context
"when there are no spaces or hyphens in the page name"
do
it
"rewrites relative links as expected"
do
click_link
'New Page'
fill_in
:new_wiki_path
,
with:
'a/b/c/d'
click_button
'Create Page'
click_link
'New page'
page
.
within
'#modal-new-wiki'
do
fill_in
:new_wiki_path
,
with:
'a/b/c/d'
click_button
'Create page'
end
fill_in
:wiki_content
,
with:
wiki_content
click_on
"Preview"
page
.
within
'.wiki-form'
do
fill_in
:wiki_content
,
with:
wiki_content
click_on
"Preview"
end
expect
(
page
).
to
have_content
(
"regular link"
)
...
...
@@ -42,12 +46,16 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t
context
"when there are spaces in the page name"
do
it
"rewrites relative links as expected"
do
click_link
'New Page'
fill_in
:new_wiki_path
,
with:
'a page/b page/c page/d page'
click_button
'Create Page'
click_link
'New page'
page
.
within
'#modal-new-wiki'
do
fill_in
:new_wiki_path
,
with:
'a page/b page/c page/d page'
click_button
'Create page'
end
fill_in
:wiki_content
,
with:
wiki_content
click_on
"Preview"
page
.
within
'.wiki-form'
do
fill_in
:wiki_content
,
with:
wiki_content
click_on
"Preview"
end
expect
(
page
).
to
have_content
(
"regular link"
)
...
...
@@ -60,12 +68,16 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t
context
"when there are hyphens in the page name"
do
it
"rewrites relative links as expected"
do
click_link
'New Page'
fill_in
:new_wiki_path
,
with:
'a-page/b-page/c-page/d-page'
click_button
'Create Page'
fill_in
:wiki_content
,
with:
wiki_content
click_on
"Preview"
click_link
'New page'
page
.
within
'#modal-new-wiki'
do
fill_in
:new_wiki_path
,
with:
'a-page/b-page/c-page/d-page'
click_button
'Create page'
end
page
.
within
'.wiki-form'
do
fill_in
:wiki_content
,
with:
wiki_content
click_on
"Preview"
end
expect
(
page
).
to
have_content
(
"regular link"
)
...
...
@@ -79,11 +91,17 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t
context
"while editing a wiki page"
do
def
create_wiki_page
(
path
)
click_link
'New Page'
fill_in
:new_wiki_path
,
with:
path
click_button
'Create Page'
fill_in
:wiki_content
,
with:
'content'
click_on
"Create page"
click_link
'New page'
page
.
within
'#modal-new-wiki'
do
fill_in
:new_wiki_path
,
with:
path
click_button
'Create page'
end
page
.
within
'.wiki-form'
do
fill_in
:wiki_content
,
with:
'content'
click_on
"Create page"
end
end
context
"when there are no spaces or hyphens in the page name"
do
...
...
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
View file @
c380d766
...
...
@@ -21,8 +21,9 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
scenario
'directly from the wiki home page'
do
fill_in
:wiki_content
,
with:
'My awesome wiki!'
click_button
'Create page'
page
.
within
'.wiki-form'
do
click_button
'Create page'
end
expect
(
page
).
to
have_content
(
'Home'
)
expect
(
page
).
to
have_content
(
"Last edited by
#{
user
.
name
}
"
)
expect
(
page
).
to
have_content
(
'My awesome wiki!'
)
...
...
@@ -36,16 +37,20 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
context
'via the "new wiki page" page'
do
scenario
'when the wiki page has a single word name'
,
js:
true
do
click_link
'New
P
age'
click_link
'New
p
age'
fill_in
:new_wiki_path
,
with:
'foo'
click_button
'Create Page'
page
.
within
'#modal-new-wiki'
do
fill_in
:new_wiki_path
,
with:
'foo'
click_button
'Create page'
end
# Commit message field should have correct value.
expect
(
page
).
to
have_field
(
'wiki[message]'
,
with:
'Create foo'
)
fill_in
:wiki_content
,
with:
'My awesome wiki!'
click_button
'Create page'
page
.
within
'.wiki-form'
do
fill_in
:wiki_content
,
with:
'My awesome wiki!'
click_button
'Create page'
end
expect
(
page
).
to
have_content
(
'Foo'
)
expect
(
page
).
to
have_content
(
"Last edited by
#{
user
.
name
}
"
)
...
...
@@ -53,16 +58,20 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
end
scenario
'when the wiki page has spaces in the name'
,
js:
true
do
click_link
'New
P
age'
click_link
'New
p
age'
fill_in
:new_wiki_path
,
with:
'Spaces in the name'
click_button
'Create Page'
page
.
within
'#modal-new-wiki'
do
fill_in
:new_wiki_path
,
with:
'Spaces in the name'
click_button
'Create page'
end
# Commit message field should have correct value.
expect
(
page
).
to
have_field
(
'wiki[message]'
,
with:
'Create spaces in the name'
)
fill_in
:wiki_content
,
with:
'My awesome wiki!'
click_button
'Create page'
page
.
within
'.wiki-form'
do
fill_in
:wiki_content
,
with:
'My awesome wiki!'
click_button
'Create page'
end
expect
(
page
).
to
have_content
(
'Spaces in the name'
)
expect
(
page
).
to
have_content
(
"Last edited by
#{
user
.
name
}
"
)
...
...
@@ -70,16 +79,20 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
end
scenario
'when the wiki page has hyphens in the name'
,
js:
true
do
click_link
'New
P
age'
click_link
'New
p
age'
fill_in
:new_wiki_path
,
with:
'hyphens-in-the-name'
click_button
'Create Page'
page
.
within
'#modal-new-wiki'
do
fill_in
:new_wiki_path
,
with:
'hyphens-in-the-name'
click_button
'Create page'
end
# Commit message field should have correct value.
expect
(
page
).
to
have_field
(
'wiki[message]'
,
with:
'Create hyphens in the name'
)
fill_in
:wiki_content
,
with:
'My awesome wiki!'
click_button
'Create page'
page
.
within
'.wiki-form'
do
fill_in
:wiki_content
,
with:
'My awesome wiki!'
click_button
'Create page'
end
expect
(
page
).
to
have_content
(
'Hyphens in the name'
)
expect
(
page
).
to
have_content
(
"Last edited by
#{
user
.
name
}
"
)
...
...
@@ -99,7 +112,9 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
scenario
'directly from the wiki home page'
do
fill_in
:wiki_content
,
with:
'My awesome wiki!'
click_button
'Create page'
page
.
within
'.wiki-form'
do
click_button
'Create page'
end
expect
(
page
).
to
have_content
(
'Home'
)
expect
(
page
).
to
have_content
(
"Last edited by
#{
user
.
name
}
"
)
...
...
@@ -113,16 +128,20 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
end
scenario
'via the "new wiki page" page'
,
js:
true
do
click_link
'New
P
age'
click_link
'New
p
age'
fill_in
:new_wiki_path
,
with:
'foo'
click_button
'Create Page'
page
.
within
'#modal-new-wiki'
do
fill_in
:new_wiki_path
,
with:
'foo'
click_button
'Create page'
end
# Commit message field should have correct value.
expect
(
page
).
to
have_field
(
'wiki[message]'
,
with:
'Create foo'
)
fill_in
:wiki_content
,
with:
'My awesome wiki!'
click_button
'Create page'
page
.
within
'.wiki-form'
do
fill_in
:wiki_content
,
with:
'My awesome wiki!'
click_button
'Create page'
end
expect
(
page
).
to
have_content
(
'Foo'
)
expect
(
page
).
to
have_content
(
"Last edited by
#{
user
.
name
}
"
)
...
...
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