8000 [Release] Stage to Main by rohitsahu · Pull Request #498 · adobecom/unity · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[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

Merged
merged 7 commits into from
Jul 10, 2025
Merged

[Release] Stage to Main #498

merged 7 commits into from
Jul 10, 2025

Conversation

Copy link
aem-code-sync bot commented Jul 10, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

},
};
} catch (error) {
console.error('Error reading coverage file:', error.message);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <no-console> reported by reviewdog 🐶
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.');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <no-console> reported by reviewdog 🐶
Unexpected console statement.


const coverage = parseLcovFile(coverageFile);

console.log('📊 Coverage Report:');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <no-console> reported by reviewdog 🐶
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)}%)`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <no-console> reported by reviewdog 🐶
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)}%)`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <no-console> reported by reviewdog 🐶
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`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <no-console> reported by reviewdog 🐶
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`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <no-console> reported by reviewdog 🐶
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 () {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <func-names> reported by reviewdog 🐶
Unexpected unnamed async function.

let imgs = o.querySelectorAll('img');
bgImg = imgs[0]
const imgs = o.querySelectorAll('img');
bgImg = imgs[0];

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.

Comment on lines +1 to +60
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;
}

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <func-names> reported by reviewdog 🐶
Unexpected unnamed function.

sinon.stub(UnityWidget.prototype, 'loadPrompts').callsFake(function () {

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 = {}) {

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);

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) => {

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.

arugupta1992 and others added 7 commits July 10, 2025 07:57
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.
<!-- 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.
* 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)
@sanjayms01 sanjayms01 requested review from rgclayton and removed request for rayyank10 July 10, 2025 15:20
@sanjayms01 sanjayms01 merged commit 081a9f0 into main Jul 10, 2025
4 of 8 checks passed
sanjayms01 added a commit that referenced this pull request Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0