Commit f9b83b39 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch...

Merge branch '233681-replace-bootstrap-alerts-in-app/views/projects/milestones/show.html.haml' into 'master'

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

Closes #233681

See merge request gitlab-org/gitlab!41396
parents 35b06498 10e886c8
......@@ -10,10 +10,14 @@
= render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project
- 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' } }
= 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?
.alert.alert-success.gl-mt-3
.gl-alert.gl-alert-success.gl-mt-3.gl-mb-5{ data: { testid: 'all-issues-closed-alert' } }
= 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
......
---
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
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')
end
end
......@@ -37,7 +37,7 @@ RSpec.describe 'Milestone' do
create(:issue, title: "Bugfix1", project: project, milestone: milestone, state: "closed")
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
......
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