Skip to content

Commit

Permalink
Updating the API URLs with regex exp.
Browse files Browse the repository at this point in the history
  • Loading branch information
avneet-raj committed Nov 6, 2023
1 parent 57fe9f4 commit 5bb431b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe( 'Get Started Site Type Secondary', function () {
.then(($element) => {
const dataSlugText = $element.attr('data-slug');
if(num>=2){
cy.wait(4000);
cy.wait(5000);
}
EventsAPI('secondary_type', dataSlugText, APIList.site_secondary);
num+=1;
Expand Down
14 changes: 7 additions & 7 deletions tests/cypress/integration/wp-module-support/EventsApi.cy.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export const APIList = {
'get_started_experience' : 'http://localhost:8882/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=wp-setup&_locale=user',
'get_started_experience_ecomm' : 'http://localhost:8882/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=ecommerce&_locale=user',
'top_priority' : 'http://localhost:8882/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=wp-setup&_locale=user',
'site_primary' : 'http://localhost:8882/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=wp-setup&_locale=user',
'site_primary_ecomm' : 'http://localhost:8882/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=ecommerce&_locale=user',
'site_secondary' : 'http://localhost:8882/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=wp-setup&_locale=user',
'site_secondary_ecomm' : 'http://localhost:8882/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=ecommerce&_locale=user'
'get_started_experience' : '/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=wp-setup&_locale=user',
'get_started_experience_ecomm' : '/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=ecommerce&_locale=user',
'top_priority' : '/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=wp-setup&_locale=user',
'site_primary' : '/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=wp-setup&_locale=user',
'site_primary_ecomm' : '/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=ecommerce&_locale=user',
'site_secondary' : '/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=wp-setup&_locale=user',
'site_secondary_ecomm' : '/index.php?rest_route=%2Fnewfold-onboarding%2Fv1%2Fevents%2Fbatch&flow=ecommerce&_locale=user'
}

export const EventsAPI = ( events_name, card_val, api_name ) => {
Expand Down

0 comments on commit 5bb431b

Please sign in to comment.