From 5312c9d15bcad63215164c80e3db974812ea0c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Hal=C3=A1sz?= Date: Thu, 2 Jul 2020 16:13:05 +0200 Subject: [PATCH] Replace old angular ansible tower form with a react based DDF --- app/views/automation_manager/_form.html.haml | 7 +++++-- spec/controllers/automation_manager_controller_spec.rb | 8 -------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/app/views/automation_manager/_form.html.haml b/app/views/automation_manager/_form.html.haml index bb7271e8b75..6331bcb036f 100644 --- a/app/views/automation_manager/_form.html.haml +++ b/app/views/automation_manager/_form.html.haml @@ -1,2 +1,5 @@ -= render :partial => 'configuration_manager/shared_form', :locals => {:url => "/automation_manager", :model => "automationManagerModel"} - +- if @ems + -# FIXME: the redirect URL cannot be determined due to the explorer screen, but after a de-explorerization it should be possible to fix + = react('ProviderForm', :providerId => @ems.id.to_s, :redirect => automation_manager_path, :kind => 'automation', :title => ui_lookup(:model => 'ManageIQ::Providers::AutomationManager')) +- else + = react('ProviderForm', :redirect => automation_manager_path, :kind => 'automation', :title => ui_lookup(:model => 'ManageIQ::Providers::AutomationManager')) diff --git a/spec/controllers/automation_manager_controller_spec.rb b/spec/controllers/automation_manager_controller_spec.rb index fdb36490cd8..d10e2f37c21 100644 --- a/spec/controllers/automation_manager_controller_spec.rb +++ b/spec/controllers/automation_manager_controller_spec.rb @@ -134,14 +134,6 @@ expect(right_cell_text).to eq("Edit Provider") end - it "should display the zone field" do - new_zone = FactoryBot.create(:zone) - controller.instance_variable_set(:@provider, automation_provider1) - post :edit, :params => { :id => @automation_manager1.id } - expect(response.status).to eq(200) - expect(response.body).to include("option value=\\\"#{new_zone.name}\\\"") - end - it "should save the zone field" do new_zone = FactoryBot.create(:zone) controller.instance_variable_set(:@provider, automation_provider1)