diff --git a/libs/blocks/faas/utils.js b/libs/blocks/faas/utils.js index 94a9ef96f0..6299609c2b 100644 --- a/libs/blocks/faas/utils.js +++ b/libs/blocks/faas/utils.js @@ -26,12 +26,12 @@ export const getFaasHostSubDomain = (environment) => { if (faasEnv === 'qa') { return 'qa.'; } - return 'dev.'; + return 'qa.'; }; const base = miloLibs || codeRoot; export const faasHostUrl = `https://${getFaasHostSubDomain()}apps.enterprise.adobe.com`; -const faasCurrentJS = `${faasHostUrl}/faas/service/jquery.faas-current.js`; +const faasCurrentJS = base.includes('localhost') ? `${base}/deps/jquery.faas-current.js` : `${faasHostUrl}/faas/service/jquery.faas-current.js`; export const loadFaasFiles = () => { loadStyle(`${base}/blocks/faas/faas.css`); return Promise.all([ @@ -248,7 +248,7 @@ const beforeSubmitCallback = () => { }), }) .catch((error) => { - console.error('AA Sandbox Error:', error); + window.lana.log('AA Sandbox Error:', error); }); } }; diff --git a/test/blocks/faas/utils.test.js b/test/blocks/faas/utils.test.js index e790e39ff5..08f53d973c 100644 --- a/test/blocks/faas/utils.test.js +++ b/test/blocks/faas/utils.test.js @@ -89,7 +89,7 @@ describe('Faas', () => { expect(getFaasHostSubDomain('stage')).to.equal('staging.'); expect(getFaasHostSubDomain('dev')).to.equal('dev.'); expect(getFaasHostSubDomain('qa')).to.equal('qa.'); - expect(getFaasHostSubDomain()).to.equal('dev.'); + expect(getFaasHostSubDomain()).to.equal('qa.'); }); it('localizes the destination url', () => {