Commit 10e886c8 authored by Gilang Gumilar's avatar Gilang Gumilar Committed by Ezekiel Kigbo

Replace bootstrap alerts in app/views/projects/milestones/show.html.haml

parent 95927a8a
...@@ -10,11 +10,15 @@ ...@@ -10,11 +10,15 @@
= render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project = render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project
- if can?(current_user, :read_issue, @project) && @milestone.total_issues_count == 0 - if can?(current_user, :read_issue, @project) && @milestone.total_issues_count == 0
.alert.alert-success.gl-mt-3 .gl-alert.gl-alert-info.gl-mt-3.gl-mb-5{ data: { testid: 'no-issues-alert' } }
%span= _('Assign some issues to this milestone.') = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
.gl-alert-body
%span= _('Assign some issues to this milestone.')
- elsif @milestone.complete? && @milestone.active? - elsif @milestone.complete? && @milestone.active?
.alert.alert-success.gl-mt-3 .gl-alert.gl-alert-success.gl-mt-3.gl-mb-5{ data: { testid: 'all-issues-closed-alert' } }
%span= _('All issues for this milestone are closed. You may close this milestone now.') = sprite_icon('check-circle', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
.gl-alert-body
%span= _('All issues for this milestone are closed. You may close this milestone now.')
= render 'shared/milestones/tabs', milestone: @milestone = render 'shared/milestones/tabs', milestone: @milestone
= render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153 = render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153
---
title: Replace bootstrap alerts in app/views/projects/milestones/show.html.haml
merge_request: 41396
author: Gilang Gumilar
type: changed
...@@ -25,7 +25,7 @@ RSpec.describe 'Milestone' do ...@@ -25,7 +25,7 @@ RSpec.describe 'Milestone' do
find('input[name="commit"]').click find('input[name="commit"]').click
expect(find('.alert-success')).to have_content('Assign some issues to this milestone.') expect(find('[data-testid="no-issues-alert"]')).to have_content('Assign some issues to this milestone.')
expect(page).to have_content('Nov 16, 2016–Dec 16, 2016') expect(page).to have_content('Nov 16, 2016–Dec 16, 2016')
end end
end end
...@@ -37,7 +37,7 @@ RSpec.describe 'Milestone' do ...@@ -37,7 +37,7 @@ RSpec.describe 'Milestone' do
create(:issue, title: "Bugfix1", project: project, milestone: milestone, state: "closed") create(:issue, title: "Bugfix1", project: project, milestone: milestone, state: "closed")
visit project_milestone_path(project, milestone) visit project_milestone_path(project, milestone)
expect(find('.alert-success')).to have_content('All issues for this milestone are closed. You may close this milestone now.') expect(find('[data-testid="all-issues-closed-alert"]')).to have_content('All issues for this milestone are closed. You may close this milestone now.')
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment