-
Notifications
You must be signed in to change notification settings - Fork 9
[Release] Stage to Main #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
}, | ||
}; | ||
} catch (error) { | ||
console.error('Error reading coverage file:', error.message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement.
const coverageFile = path.join(__dirname, '..', 'coverage', 'lcov.info'); | ||
|
||
if (!fs.existsSync(coverageFile)) { | ||
console.error('❌ Coverage file not found. Run tests with coverage first.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement.
|
||
const coverage = parseLcovFile(coverageFile); | ||
|
||
console.log('📊 Coverage Report:'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement.
const coverage = parseLcovFile(coverageFile); | ||
|
||
console.log('📊 Coverage Report:'); | ||
console.log(` Lines: ${coverage.lines.hit}/${coverage.lines.total} (${coverage.lines.percentage.toFixed(2)}%)`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement.
|
||
console.log('📊 Coverage Report:'); | ||
console.log(` Lines: ${coverage.lines.hit}/${coverage.lines.total} (${coverage.lines.percentage.toFixed(2)}%)`); | ||
console.log(` Functions: ${coverage.functions.hit}/${coverage.functions.total} (${coverage.functions.percentage.toFixed(2)}%)`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement.
console.log(`✅ Coverage ${overallCoverage.toFixed(2)}% meets the required ${COVERAGE_THRESHOLD}% threshold`); | ||
process.exit(0); | ||
} else { | ||
console.log(`❌ Coverage ${overallCoverage.toFixed(2)}% is below the required ${COVERAGE_THRESHOLD}% threshold`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement.
process.exit(0); | ||
} else { | ||
console.log(`❌ Coverage ${overallCoverage.toFixed(2)}% is below the required ${COVERAGE_THRESHOLD}% threshold`); | ||
console.log(` Need ${(COVERAGE_THRESHOLD - overallCoverage).toFixed(2)}% more coverage to pass`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement.
@@ -87,16 +87,22 @@ describe('Headers and Token', () => { | |||
}); | |||
}); | |||
|
|||
it('Should return headers with empty string if refresh token fails', async () => { | |||
it('Should return headers with empty string if refresh token fails', async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected unnamed async function.
let imgs = o.querySelectorAll('img'); | ||
bgImg = imgs[0] | ||
const imgs = o.querySelectorAll('img'); | ||
bgImg = imgs[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [eslint] <prefer-destructuring> reported by reviewdog 🐶
Use array destructuring.
export function flattenObject(obj, options = {}) { | ||
const { | ||
separator = '.', | ||
prefix = '', | ||
maxDepth = 10, | ||
includeArrays = true, | ||
preserveNull = false, | ||
excludeTypes = ['function'], | ||
seenObjects = new WeakSet(), | ||
} = options; | ||
if (obj === null || obj === undefined) return preserveNull ? { [prefix || 'value']: obj } : {}; | ||
if (typeof obj !== 'object') return { [prefix || 'value']: obj }; | ||
if (seenObjects.has(obj)) return { [prefix || 'circular']: '[Circular Reference]' }; | ||
if (maxDepth <= 0) return { [prefix || 'maxDepth']: '[Max Depth Reached]' }; | ||
seenObjects.add(obj); | ||
const flattened = {}; | ||
try { | ||
if (Array.isArray(obj)) { | ||
if (!includeArrays) flattened[prefix || 'array'] = `[Array(${obj.length})]`; | ||
else { | ||
obj.forEach((item, index) => { | ||
const key = prefix ? `${prefix}${separator}${index}` : `${index}`; | ||
const nested = flattenObject(item, { | ||
...options, | ||
prefix: key, | ||
maxDepth: maxDepth - 1, | ||
seenObjects, | ||
}); | ||
Object.assign(flattened, nested); | ||
}); | ||
} | ||
} else { | ||
Object.keys(obj).forEach((key) => { | ||
const value = obj[key]; | ||
const newKey = prefix ? `${prefix}${separator}${key}` : key; | ||
if (excludeTypes.includes(typeof value)) { | ||
flattened[newKey] = `[${typeof value}]`; | ||
return; | ||
} | ||
if (value === null || value === undefined) { | ||
if (preserveNull) flattened[newKey] = value; | ||
return; | ||
} | ||
if (typeof value !== 'object') flattened[newKey] = value; | ||
else { | ||
const nested = flattenObject(value, { | ||
...options, | ||
prefix: newKey, | ||
maxDepth: maxDepth - 1, | ||
seenObjects, | ||
}); | ||
Object.assign(flattened, nested); | ||
} | ||
}); | ||
} | ||
} finally { | ||
seenObjects.delete(obj); | ||
} | ||
return flattened; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [eslint] <import/prefer-default-export> reported by reviewdog 🐶
Prefer default export.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected unnamed function.
sinon.stub(UnityWidget.prototype, 'loadPrompts').callsFake(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [eslint] <no-unused-vars> reported by reviewdog 🐶
'limits' is assigned a value but never used.
constructor(unityEl, workflowCfg, wfblock, canvasArea, actionMap = {}, limits = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [eslint] <no-return-assign> reported by reviewdog 🐶
Arrow function should not return assignment.
[...item].forEach((i) => i.style[propertyName] = propertyValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [eslint] <no-unused-vars> reported by reviewdog 🐶
'i' is defined but never used.
this.operations.forEach((op, i) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [eslint] <no-unused-vars> reported by reviewdog 🐶
'defineDeviceByScreenSize' is defined but never used.
defineDeviceByScreenSize, |
Have improved the logging to have more clarity into the actual error returned by imslib apis. This is phase 1, raising the pr to merge on stage to validate the data on field.
* Remove close icon from prompt suggestion dropdown Resolves: [MWPW-174048](https://jira.corp.adobe.com/browse/MWPW-174048) **Test URLs:** - Before: https://main--cc--adobecom.aem.live/drafts/rclayton/firefly/text-to-image?unitylibs=stage - After: https://main--cc--adobecom.aem.live/drafts/rclayton/firefly/text-to-image?unitylibs=MWPW-174048
<!-- Before submitting, please review all open PRs. --> PR includes nala ui automation test scripts for following `Batch 2A` verbs - pdf-to-word - pdf-to-excel - pdf-to-ppt - pdf-to-jpg - word-to-pdf - excel-to-pdf - ppt-to-pdf - jpg-to-pdf - png-to-pdf Resolves following jira items - [MWPW-175417](https://jira.corp.adobe.com/browse/MWPW-175417) - [MWPW-175419](https://jira.corp.adobe.com/browse/MWPW-175419) - [MWPW-175420](https://jira.corp.adobe.com/browse/MWPW-175420) - [MWPW-175422](https://jira.corp.adobe.com/browse/MWPW-175422) - [MWPW-175423](https://jira.corp.adobe.com/browse/MWPW-175423) - [MWPW-175424](https://jira.corp.adobe.com/browse/MWPW-175424) - [MWPW-175425](https://jira.corp.adobe.com/browse/MWPW-175425) - [MWPW-175426](https://jira.corp.adobe.com/browse/MWPW-175426) - [MWPW-175428](https://jira.corp.adobe.com/browse/MWPW-175428) **Test URLs:** - Before: https://main--unity--adobecom.aem.page/?martech=off - After: https://nala-batch2a--unity--adobecom.aem.page/?martech=off
* Overall Unit test coverage increased to 80% from 67% * Written unit tests for acrobat workflows and common code.
…ested error object) and flatten it to be logged in splunk incase of ims token failure (#497) Resolves: [MWPW-174041](https://jira.corp.adobe.com/browse/MWPW-174041) **Test URLs:** Before: https://stage--dc--adobecom.aem.page/acrobat/online/compress-pdf?unitylibs=stage After: https://stage--dc--adobecom.hlx.live/acrobat/online/rotate-pdf?unitylibs=imsEnahncement-2 URL for testing: https://stage--dc--adobecom.hlx.live/acrobat/online/rotate-pdf?unitylibs=imsEnahncement-2
* Additional headers to be added to unity BE api calls: x-unity-product and x-unity-action for all the workflows * For acrobat, extracted out additional headers in 'getAdditionalHeaders' method. Earlier we only 'x-unity-dc-verb' as additional header, added the other too as well. Resolves: [MWPW-174144](https://jira.corp.adobe.com/browse/MWPW-174144) and [MWPW-173999](https://jira.corp.adobe.com/browse/MWPW-173999)
Test URLs:
CC
Before: https://main--cc--adobecom.hlx.live/products/photoshop/online?unitylibs=main
After: https://main--cc--adobecom.hlx.live/products/photoshop/online?unitylibs=stage
DC
Before: https://main--dc--adobecom.hlx.live/acrobat/online/compress?unitylibs=main
After: https://main--dc--adobecom.hlx.live/acrobat/online/compress?unitylibs=stage