diff --git a/app/javascript/packs/apiap_wizard_backend_api.js b/app/javascript/packs/apiap_wizard_backend_api.js index 083f3c3c32..3c98bac873 100644 --- a/app/javascript/packs/apiap_wizard_backend_api.js +++ b/app/javascript/packs/apiap_wizard_backend_api.js @@ -16,13 +16,3 @@ document.addEventListener('DOMContentLoaded', () => { window.analytics.trackLink(useExampleLink, 'Clicked Example API Link') }) - -/* Left TODO: - var test_path = $('#proxy_config_test_path'); - - var backend = $('#proxy_config_backend').change(function updateTestPath() { - test_path.val(backend.val() == example_api ? '/some-path' : null); - }); - - backend.trigger('change'); -*/ diff --git a/features/provider/onboarding/wizard.feature b/features/provider/onboarding/wizard.feature index 143613817f..fca1320af0 100644 --- a/features/provider/onboarding/wizard.feature +++ b/features/provider/onboarding/wizard.feature @@ -21,14 +21,13 @@ Feature: Onboarding Wizard Given a provider signs up and activates his account And I have rolling updates "api_as_product" enabled When user starts the onboarding wizard + And goes to Add a Backend page + And adds the echo Backend And goes to Add a Product page And adds the echo Product - # Will fail because of https://issues.jboss.org/browse/THREESCALE-3687 - # And goes to Add a Backend page - # And adds the echo Backend - # And goes to Connect page - # And adds adds a path - # And goes to the request page - # And sends the test request - # And goes to what's next - # Then goes to API page + And goes to Connect page + And adds a path + And goes to the request page + And sends the test request + And goes to what's next + Then goes to API page diff --git a/features/step_definitions/onboarding/apiap_wizard_steps.rb b/features/step_definitions/onboarding/apiap_wizard_steps.rb index 6aee933b91..f3f5d1a425 100644 --- a/features/step_definitions/onboarding/apiap_wizard_steps.rb +++ b/features/step_definitions/onboarding/apiap_wizard_steps.rb @@ -13,52 +13,42 @@ end end -And(/^adds adds a path$/) do - within backend_form do +And(/^adds a path$/) do + within connect_form do fill_in 'Path', with: '' end end -And(/^goes to Add a Product page$/) do +And(/^goes to Add a Backend page$/) do click_on 'Got it! Lets add my API' - page.should have_content 'Add a Product' # This works + page.should have_content 'Add your API(s)' end -And(/^goes to Add a Backend page$/) do - within product_form do - click_on 'Add this Product' # This does not work +And(/^goes to Add a Product page$/) do + within backend_form do + click_on 'Add this Backend' end - page.should have_content 'Add a Backend' + page.should have_content 'Design a Product' end And(/^goes to Connect page$/) do - within backend_form do - click_on 'Add this Backend' + within product_form do + click_on 'Add this Product' end - page.should have_content 'Connect Backend and Product' + page.should have_content 'Use your Backend in your Product' end And(/^goes to the request page$/) do within connect_form do - click_on 'Connect to this Path' + click_on 'Add the Backend to the Product' end page.should have_content 'Good. Next, make a test GET request' end -# And(/^sends the test request$/) do -# stub_request(:get, %r{//test.proxy/deploy/}).to_return(status: 200) -# stub_request(:get, /staging.apicast.dev/).to_return(status: 200, body: response = 'Hey! successful request') - -# click_on 'Send request' - -# page.should have_content 'Congratulations, you are running on 3scale :-)' - -# end - def product_form find('#product_form') end @@ -70,13 +60,3 @@ def backend_form def connect_form find('#connect_form') end - -# And(/^goes to what's next$/) do -# click_on "Cool, what's next?" -# page.should have_content "What's next?" -# end - -# Then(/^goes to API page$/) do -# click_on 'Got it! Take me to my API on 3scale' -# page.should have_content 'Configure APIcast' -# end diff --git a/features/step_definitions/onboarding/wizard_steps.rb.rb b/features/step_definitions/onboarding/wizard_steps.rb.rb index f50c261ed5..b643967fba 100644 --- a/features/step_definitions/onboarding/wizard_steps.rb.rb +++ b/features/step_definitions/onboarding/wizard_steps.rb.rb @@ -6,7 +6,7 @@ click_on 'Got it! Lets add my API' within api_form do - fill_in 'Name', with: 'Echo API' + fill_in 'Name', with: api_name fill_in 'Base URL', with: 'https://echo-api.3scale.net' click_on 'Add this API' @@ -27,6 +27,10 @@ def api_form find('#api_form') end +def api_name + 'Echo API' +end + And(/^goes to what's next$/) do click_on "Cool, what's next?" page.should have_content "What's next?" @@ -34,5 +38,6 @@ def api_form Then(/^goes to API page$/) do click_on 'Got it! Take me to my API on 3scale' - page.should have_content 'Configure APIcast' + page.should have_content 'Overview' + page.should have_content api_name end