diff options
-rw-r--r-- | app/assets/stylesheets/framework/buttons.scss | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/builds.scss | 4 | ||||
-rw-r--r-- | app/views/admin/builds/_build.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/ci/builds/_build.html.haml | 6 | ||||
-rw-r--r-- | features/project/merge_requests.feature | 8 | ||||
-rw-r--r-- | features/steps/dashboard/todos.rb | 8 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 10 | ||||
-rw-r--r-- | spec/features/notes_on_merge_requests_spec.rb | 2 |
8 files changed, 22 insertions, 25 deletions
diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index 1f2f9f7754c..eaf85bb17ca 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -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; } diff --git a/app/assets/stylesheets/pages/builds.scss b/app/assets/stylesheets/pages/builds.scss index 3340cee9643..aa41565f812 100644 --- a/app/assets/stylesheets/pages/builds.scss +++ b/app/assets/stylesheets/pages/builds.scss @@ -91,8 +91,4 @@ table.builds { color: $gl-dark-link-color; } } - - .btn-refresh { - margin-left: 10px; - } } diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml index 2b99f360d6f..967151bc33b 100644 --- a/app/views/admin/builds/_build.html.haml +++ b/app/views/admin/builds/_build.html.haml @@ -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 diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 1b382e48365..8e95f040273 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -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 diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature index ecda4ea8240..aec590f7d9e 100644 --- a/features/project/merge_requests.feature +++ b/features/project/merge_requests.feature @@ -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 diff --git a/features/steps/dashboard/todos.rb b/features/steps/dashboard/todos.rb index 2b23df6764b..da380250cd7 100644 --- a/features/steps/dashboard/todos.rb +++ b/features/steps/dashboard/todos.rb @@ -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 diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 3b1a00f628a..463235742fb 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -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 diff --git a/spec/features/notes_on_merge_requests_spec.rb b/spec/features/notes_on_merge_requests_spec.rb index 389812ff7e1..0aef4cba238 100644 --- a/spec/features/notes_on_merge_requests_spec.rb +++ b/spec/features/notes_on_merge_requests_spec.rb @@ -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 |