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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
5b49bb20
Commit
5b49bb20
authored
10 years ago
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issueable context update and fix tests
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
e45e6ba2
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
20 deletions
+16
-20
app/assets/javascripts/issue.js.coffee
app/assets/javascripts/issue.js.coffee
+2
-2
app/assets/javascripts/merge_request.js.coffee
app/assets/javascripts/merge_request.js.coffee
+2
-2
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+1
-1
app/views/projects/issues/update.js.haml
app/views/projects/issues/update.js.haml
+1
-1
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+1
-1
app/views/projects/merge_requests/update.js.haml
app/views/projects/merge_requests/update.js.haml
+1
-1
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+3
-7
features/steps/shared/active_tab.rb
features/steps/shared/active_tab.rb
+4
-4
features/steps/shared/issuable.rb
features/steps/shared/issuable.rb
+1
-1
No files found.
app/assets/javascripts/issue.js.coffee
View file @
5b49bb20
class
@
Issue
class
@
Issue
constructor
:
->
constructor
:
->
$
(
'.edit-issue.inline-update input[type="submit"]'
).
hide
()
$
(
'.edit-issue.inline-update input[type="submit"]'
).
hide
()
$
(
".
issue-box
.inline-update"
).
on
"change"
,
"select"
,
->
$
(
".
context
.inline-update"
).
on
"change"
,
"select"
,
->
$
(
this
).
submit
()
$
(
this
).
submit
()
$
(
".
issue-box
.inline-update"
).
on
"change"
,
"#issue_assignee_id"
,
->
$
(
".
context
.inline-update"
).
on
"change"
,
"#issue_assignee_id"
,
->
$
(
this
).
submit
()
$
(
this
).
submit
()
if
$
(
"a.btn-close"
).
length
if
$
(
"a.btn-close"
).
length
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/merge_request.js.coffee
View file @
5b49bb20
...
@@ -26,9 +26,9 @@ class @MergeRequest
...
@@ -26,9 +26,9 @@ class @MergeRequest
initContextWidget
:
->
initContextWidget
:
->
$
(
'.edit-merge_request.inline-update input[type="submit"]'
).
hide
()
$
(
'.edit-merge_request.inline-update input[type="submit"]'
).
hide
()
$
(
".
issue-box
.inline-update"
).
on
"change"
,
"select"
,
->
$
(
".
context
.inline-update"
).
on
"change"
,
"select"
,
->
$
(
this
).
submit
()
$
(
this
).
submit
()
$
(
".
issue-box
.inline-update"
).
on
"change"
,
"#merge_request_assignee_id"
,
->
$
(
".
context
.inline-update"
).
on
"change"
,
"#merge_request_assignee_id"
,
->
$
(
this
).
submit
()
$
(
this
).
submit
()
initMergeWidget
:
->
initMergeWidget
:
->
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/issues/show.html.haml
View file @
5b49bb20
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
-
else
-
else
=
link_to
'Close'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :close
},
status_only:
true
),
method: :put
,
class:
"btn btn-block btn-close"
,
title:
"Close Issue"
=
link_to
'Close'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :close
},
status_only:
true
),
method: :put
,
class:
"btn btn-block btn-close"
,
title:
"Close Issue"
=
link_to
edit_project_issue_path
(
@project
,
@issue
),
class:
"btn btn-block"
do
=
link_to
edit_project_issue_path
(
@project
,
@issue
),
class:
"btn btn-block
issuable-edit
"
do
%i
.fa.fa-pencil-square-o
%i
.fa.fa-pencil-square-o
Edit
Edit
.clearfix
.clearfix
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/issues/update.js.haml
View file @
5b49bb20
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
:plain
:plain
$("##{dom_id(@issue)}").fadeOut();
$("##{dom_id(@issue)}").fadeOut();
-
elsif
params
[
:issue_context
]
-
elsif
params
[
:issue_context
]
$('.
issue-box .
context').effect('highlight');
$('.context').effect('highlight');
-
if
@issue
.
milestone
-
if
@issue
.
milestone
$('.milestone-nav-link').replaceWith("
<span
class=
'milestone-nav-link'
>
|
<span
class=
'light'
>
Milestone
</span>
#{
escape_javascript
(
link_to
@issue
.
milestone
.
title
,
project_milestone_path
(
@issue
.
project
,
@issue
.
milestone
))
}
</span>
")
$('.milestone-nav-link').replaceWith("
<span
class=
'milestone-nav-link'
>
|
<span
class=
'light'
>
Milestone
</span>
#{
escape_javascript
(
link_to
@issue
.
milestone
.
title
,
project_milestone_path
(
@issue
.
project
,
@issue
.
milestone
))
}
</span>
")
-
else
-
else
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/merge_requests/_show.html.haml
View file @
5b49bb20
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
%li
=
link_to
"Email Patches"
,
project_merge_request_path
(
@project
,
@merge_request
,
format: :patch
)
%li
=
link_to
"Email Patches"
,
project_merge_request_path
(
@project
,
@merge_request
,
format: :patch
)
%li
=
link_to
"Plain Diff"
,
project_merge_request_path
(
@project
,
@merge_request
,
format: :diff
)
%li
=
link_to
"Plain Diff"
,
project_merge_request_path
(
@project
,
@merge_request
,
format: :diff
)
=
link_to
'Close'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-block btn-close"
,
title:
"Close merge request"
=
link_to
'Close'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-block btn-close"
,
title:
"Close merge request"
=
link_to
edit_project_merge_request_path
(
@project
,
@merge_request
),
class:
"btn btn-block
"
,
id
:
"edit_merge_request"
do
=
link_to
edit_project_merge_request_path
(
@project
,
@merge_request
),
class:
"btn btn-block
issuable-edit"
,
id:
"edit_merge_request"
do
%i
.fa.fa-pencil-square-o
%i
.fa.fa-pencil-square-o
Edit
Edit
-
if
@merge_request
.
closed?
-
if
@merge_request
.
closed?
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/merge_requests/update.js.haml
View file @
5b49bb20
-
if
params
[
:merge_request_context
]
-
if
params
[
:merge_request_context
]
$('.
issue-box .
context').effect('highlight');
$('.context').effect('highlight');
This diff is collapsed.
Click to expand it.
features/steps/project/merge_requests.rb
View file @
5b49bb20
...
@@ -57,9 +57,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
...
@@ -57,9 +57,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
step
'I click link "Close"'
do
step
'I click link "Close"'
do
within
'.page-title'
do
first
(
:css
,
'.close-mr-link'
).
click
click_link
"Close"
end
end
end
step
'I submit new merge request "Wiki Feature"'
do
step
'I submit new merge request "Wiki Feature"'
do
...
@@ -181,13 +179,11 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
...
@@ -181,13 +179,11 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
step
'I click link "Reopen"'
do
step
'I click link "Reopen"'
do
within
'.page-title'
do
first
(
:css
,
'.reopen-mr-link'
).
click
click_link
"Reopen"
end
end
end
step
'I should see reopened merge request "Bug NS-04"'
do
step
'I should see reopened merge request "Bug NS-04"'
do
within
'.
state-label
'
do
within
'.
issue-box
'
do
page
.
should
have_content
"Open"
page
.
should
have_content
"Open"
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
features/steps/shared/active_tab.rb
View file @
5b49bb20
...
@@ -2,7 +2,7 @@ module SharedActiveTab
...
@@ -2,7 +2,7 @@ module SharedActiveTab
include
Spinach
::
DSL
include
Spinach
::
DSL
def
ensure_active_main_tab
(
content
)
def
ensure_active_main_tab
(
content
)
find
(
'.
sidebar-wrapper
li.active'
).
should
have_content
(
content
)
find
(
'.
nav-sidebar >
li.active'
).
should
have_content
(
content
)
end
end
def
ensure_active_sub_tab
(
content
)
def
ensure_active_sub_tab
(
content
)
...
@@ -10,11 +10,11 @@ module SharedActiveTab
...
@@ -10,11 +10,11 @@ module SharedActiveTab
end
end
def
ensure_active_sub_nav
(
content
)
def
ensure_active_sub_nav
(
content
)
find
(
'
div.content ul.nav-stacked-menu
li.active'
).
should
have_content
(
content
)
find
(
'
.sidebar-subnav >
li.active'
).
should
have_content
(
content
)
end
end
step
'no other main tabs should be active'
do
step
'no other main tabs should be active'
do
page
.
should
have_selector
(
'.
sidebar-wrapper
li.active'
,
count:
1
)
page
.
should
have_selector
(
'.
nav-sidebar >
li.active'
,
count:
1
)
end
end
step
'no other sub tabs should be active'
do
step
'no other sub tabs should be active'
do
...
@@ -22,7 +22,7 @@ module SharedActiveTab
...
@@ -22,7 +22,7 @@ module SharedActiveTab
end
end
step
'no other sub navs should be active'
do
step
'no other sub navs should be active'
do
page
.
should
have_selector
(
'
div.content ul.nav-stacked-menu
li.active'
,
count:
1
)
page
.
should
have_selector
(
'
.sidebar-subnav >
li.active'
,
count:
1
)
end
end
step
'the active main tab should be Home'
do
step
'the active main tab should be Home'
do
...
...
This diff is collapsed.
Click to expand it.
features/steps/shared/issuable.rb
View file @
5b49bb20
...
@@ -2,7 +2,7 @@ module SharedIssuable
...
@@ -2,7 +2,7 @@ module SharedIssuable
include
Spinach
::
DSL
include
Spinach
::
DSL
def
edit_issuable
def
edit_issuable
find
(
'.issue-btn-group'
).
click_link
'Edit'
find
(
:css
,
'.issuable-edit'
).
click
end
end
step
'I click link "Edit" for the merge request'
do
step
'I click link "Edit" for the merge request'
do
...
...
This diff is collapsed.
Click to expand it.
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