Skip to content

Commit

Permalink
faas-env default qa (#1716)
Browse files Browse the repository at this point in the history
* faas-env default qa

* unit test

* remove colsole log

* console.error -> window.lana.log

* altering faasCurrentJS instead faasHostUrl that being exported.

* Added missed part.
  • Loading branch information
seanchoi-dev authored Jan 9, 2024
1 parent c9706d5 commit 09a7e1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions libs/blocks/faas/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down Expand Up @@ -248,7 +248,7 @@ const beforeSubmitCallback = () => {
}),
})
.catch((error) => {
console.error('AA Sandbox Error:', error);
window.lana.log('AA Sandbox Error:', error);
});
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/blocks/faas/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 09a7e1a

Please sign in to comment.