Skip to content

Commit

Permalink
Merge pull request #10486 from krauselukas/move_incident_actions
Browse files Browse the repository at this point in the history
Remove 'Create Maintenance Incident' from sidebar
  • Loading branch information
vpereira committed Nov 27, 2020
2 parents 982b5f1 + 9db601d commit 1daa4ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
@@ -1,12 +1,5 @@
- @pagetitle = 'Maintenance Incidents'

- if policy(@project).create? && feature_enabled?(:responsive_ux)
- content_for :actions do
%li.nav-item
= link_to(project_maintenance_incidents_path(@project.name), method: :post, title: 'Create Maintenance Incident', class: 'nav-link') do
%i.fas.fa-lg.mr-2.fa-plus-circle
%span.nav-item-name Create Incident

.card.mb-3
= render partial: 'webui/project/tabs', locals: { project: @project }
.card-body
Expand All @@ -31,13 +24,11 @@
%th
Release Targets
%tbody
- if policy(@project).create? && !feature_enabled?(:responsive_ux)
- if policy(@project).create?
.pt-4
%ul.list-inline
%li.list-inline-item
= link_to(project_maintenance_incidents_path(@project.name), method: :post, class: 'nav-link') do
%i.fas.fa-plus-circle.text-primary
Create Maintenance Incident
= link_to(project_maintenance_incidents_path(@project.name), method: :post) do
%i.fas.fa-plus-circle.text-primary
Create Maintenance Incident

- content_for :ready_function do
:plain
Expand Down
8 changes: 2 additions & 6 deletions src/api/spec/features/beta/webui/projects_spec.rb
Expand Up @@ -148,12 +148,8 @@

visit project_show_path(maintenance_project)
click_link('Incidents')
if mobile?
within('#bottom-navigation-area') { click_link('Actions') }
within('#bottom-navigation-area') { click_link('Create Incident') }
else
click_link('Create Incident')
end
page.execute_script('window.scrollBy(0,50)')
click_link('Create Maintenance Incident')
expect(page).to have_css('#flash', text: "Created maintenance incident project #{project.name}:maintenance_project:0")

# We can not create this via the Bootstrap UI, except by adding plain XML to the meta editor
Expand Down

0 comments on commit 1daa4ad

Please sign in to comment.