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
3a3f0bf4
Commit
3a3f0bf4
authored
Apr 27, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change build icons into buttons; update tests
parent
fc20639c
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
25 deletions
+22
-25
app/assets/stylesheets/framework/buttons.scss
app/assets/stylesheets/framework/buttons.scss
+2
-1
app/assets/stylesheets/pages/builds.scss
app/assets/stylesheets/pages/builds.scss
+0
-4
app/views/admin/builds/_build.html.haml
app/views/admin/builds/_build.html.haml
+3
-3
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+3
-3
features/project/merge_requests.feature
features/project/merge_requests.feature
+4
-4
features/steps/dashboard/todos.rb
features/steps/dashboard/todos.rb
+4
-4
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+5
-5
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+1
-1
No files found.
app/assets/stylesheets/framework/buttons.scss
View file @
3a3f0bf4
...
...
@@ -252,7 +252,8 @@
background
:
linear-gradient
(
180deg
,
$white-light
25%
,
$gray-light
100%
);
}
.btn-refresh
{
.btn-build
{
margin-left
:
10px
;
i
{
color
:
$gl-icon-color
;
}
...
...
app/assets/stylesheets/pages/builds.scss
View file @
3a3f0bf4
...
...
@@ -91,8 +91,4 @@ table.builds {
color
:
$gl-dark-link-color
;
}
}
.btn-refresh
{
margin-left
:
10px
;
}
}
app/views/admin/builds/_build.html.haml
View file @
3a3f0bf4
...
...
@@ -61,12 +61,12 @@
%td
.pull-right
-
if
can?
(
current_user
,
:read_build
,
project
)
&&
build
.
artifacts?
=
link_to
download_namespace_project_build_artifacts_path
(
build
.
project
.
namespace
,
build
.
project
,
build
),
title:
'Download artifacts'
do
=
link_to
download_namespace_project_build_artifacts_path
(
build
.
project
.
namespace
,
build
.
project
,
build
),
title:
'Download artifacts'
,
class:
'btn btn-build'
do
%i
.fa.fa-download
-
if
can?
(
current_user
,
:update_build
,
build
.
project
)
-
if
build
.
active?
=
link_to
cancel_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Cancel'
do
=
link_to
cancel_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Cancel'
,
class:
'btn btn-build'
do
%i
.fa.fa-remove.cred
-
elsif
defined?
(
allow_retry
)
&&
allow_retry
&&
build
.
retryable?
=
link_to
retry_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Retry'
,
class:
'btn btn-
refresh
'
do
=
link_to
retry_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Retry'
,
class:
'btn btn-
build
'
do
%i
.fa.fa-refresh
app/views/projects/ci/builds/_build.html.haml
View file @
3a3f0bf4
...
...
@@ -69,12 +69,12 @@
%td
.pull-right
-
if
can?
(
current_user
,
:read_build
,
build
)
&&
build
.
artifacts?
=
link_to
download_namespace_project_build_artifacts_path
(
build
.
project
.
namespace
,
build
.
project
,
build
),
title:
'Download artifacts'
do
=
link_to
download_namespace_project_build_artifacts_path
(
build
.
project
.
namespace
,
build
.
project
,
build
),
title:
'Download artifacts'
,
class:
'btn btn-build'
do
%i
.fa.fa-download
-
if
can?
(
current_user
,
:update_build
,
build
)
-
if
build
.
active?
=
link_to
cancel_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Cancel'
do
=
link_to
cancel_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Cancel'
,
class:
'btn btn-build'
do
%i
.fa.fa-remove.cred
-
elsif
defined?
(
allow_retry
)
&&
allow_retry
&&
build
.
retryable?
=
link_to
retry_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Retry'
,
class:
'btn btn-
refresh
'
do
=
link_to
retry_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Retry'
,
class:
'btn btn-
build
'
do
%i
.fa.fa-refresh
features/project/merge_requests.feature
View file @
3a3f0bf4
...
...
@@ -135,7 +135,7 @@ Feature: Project Merge Requests
And
I leave a comment like
"Line is wrong"
on diff
And
I switch to the merge request's comments tab
Then
I should see a discussion has started on diff
And
I should see a badge of
"
1
"
next to the discussion link
And
I should see a badge of
"
(1)
"
next to the discussion link
@javascript
Scenario
:
I
see a new comment on merge request diff from another user in the discussion tab
...
...
@@ -143,7 +143,7 @@ Feature: Project Merge Requests
And
I visit merge request page
"Bug NS-05"
And
user
"John Doe"
leaves a comment like
"Line is wrong"
on diff
Then
I should see a discussion by user
"John Doe"
has started on diff
And
I should see a badge of
"
1
"
next to the discussion link
And
I should see a badge of
"
(1)
"
next to the discussion link
@javascript
Scenario
:
I
edit a comment on a merge request diff
...
...
@@ -161,11 +161,11 @@ Feature: Project Merge Requests
And
I visit merge request page
"Bug NS-05"
And
I click on the Changes tab
And
I leave a comment like
"Line is wrong"
on diff
And
I should see a badge of
"
1
"
next to the discussion link
And
I should see a badge of
"
(1)
"
next to the discussion link
And
I delete the comment
"Line is wrong"
on diff
And
I click on the Discussion tab
Then
I should not see any discussion
And
I should see a badge of
"
0
"
next to the discussion link
And
I should see a badge of
"
(0)
"
next to the discussion link
@javascript
Scenario
:
I
comment on a line of a commit in merge request
...
...
features/steps/dashboard/todos.rb
View file @
3a3f0bf4
...
...
@@ -27,8 +27,8 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
step
'I should see todos assigned to me'
do
page
.
within
(
'.nav-sidebar'
)
{
expect
(
page
).
to
have_content
'Todos 4'
}
expect
(
page
).
to
have_content
'To do
4
'
expect
(
page
).
to
have_content
'Done
0
'
expect
(
page
).
to
have_content
'To do
(4)
'
expect
(
page
).
to
have_content
'Done
(0)
'
expect
(
page
).
to
have_link
project
.
name_with_namespace
should_see_todo
(
1
,
"John Doe assigned you merge request
#{
merge_request
.
to_reference
}
"
,
merge_request
.
title
)
...
...
@@ -43,8 +43,8 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
end
page
.
within
(
'.nav-sidebar'
)
{
expect
(
page
).
to
have_content
'Todos 3'
}
expect
(
page
).
to
have_content
'To do
3
'
expect
(
page
).
to
have_content
'Done
1
'
expect
(
page
).
to
have_content
'To do
(3)
'
expect
(
page
).
to
have_content
'Done
(1)
'
should_not_see_todo
"John Doe assigned you merge request
#{
merge_request
.
to_reference
}
"
end
...
...
features/steps/project/merge_requests.rb
View file @
3a3f0bf4
...
...
@@ -344,12 +344,12 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
step
'I should see a badge of "
1
" next to the discussion link'
do
expect_discussion_badge_to_have_counter
(
"
1
"
)
step
'I should see a badge of "
(1)
" next to the discussion link'
do
expect_discussion_badge_to_have_counter
(
"
(1)
"
)
end
step
'I should see a badge of "
0
" next to the discussion link'
do
expect_discussion_badge_to_have_counter
(
"
0
"
)
step
'I should see a badge of "
(0)
" next to the discussion link'
do
expect_discussion_badge_to_have_counter
(
"
(0)
"
)
end
step
'I should see a discussion has started on commit diff'
do
...
...
@@ -572,7 +572,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
def
expect_discussion_badge_to_have_counter
(
value
)
page
.
within
(
".notes-tab
.badge
"
)
do
page
.
within
(
".notes-tab
span
"
)
do
page
.
should
have_content
value
end
end
...
...
spec/features/notes_on_merge_requests_spec.rb
View file @
3a3f0bf4
...
...
@@ -151,7 +151,7 @@ describe 'Comments', feature: true do
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
expect
(
merge_request
.
mr_and_commit_notes
.
count
).
to
eq
2
expect
(
find
(
'.notes-tab span
.badge'
).
text
).
to
eq
"1
"
expect
(
find
(
'.notes-tab span
'
).
text
).
to
eq
"(1)
"
end
end
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