Skip to content

Commit

Permalink
fix(designer): Fix attachment wording (#4949)
Browse files Browse the repository at this point in the history
Fix attachment wording
  • Loading branch information
ccastrotrejo authored Jun 10, 2024
1 parent ae4f719 commit 8d5133e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion libs/designer/src/lib/core/utils/loops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ export const getTokenExpressionValueForManifestBasedOperation = (
/**
* generate the full path for the specifiecd expression segments, e.g, for @body('action')?[test] => body.$.test
* if the splitOn is not empty, and the expression is triggerBody(), then it would also append the splitOn path,
* e.g, @triggerBody()?[attachements] with splitOn: @triggerBody()['value'], the result would be: body.$.value.attachments
* e.g, @triggerBody()?[attachments] with splitOn: @triggerBody()['value'], the result would be: body.$.value.attachments
*/
const getFullPath = (expressionSegment: ExpressionFunction, splitOn?: Expression): string => {
const segments = [equals(expressionSegment.name, 'outputs') ? 'outputs' : 'body', '$'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ import { describe, vi, beforeEach, afterEach, beforeAll, afterAll, it, test, exp
describe('Parameter Key Utility Tests', () => {
describe('isAncestorKey', () => {
it('should return correct result different cases', () => {
expect(ParameterKeyUtility.isAncestorKey('body.$.attachements.[*].test', 'body.$.attachements')).toBeTruthy();
expect(ParameterKeyUtility.isAncestorKey('body.$.attachements.[*].any.[*].test', 'body.$.attachements')).toBeTruthy();
expect(ParameterKeyUtility.isAncestorKey('body.$.attachements123', 'body.$.attachements')).toBeFalsy();
expect(ParameterKeyUtility.isAncestorKey('body.$.attachement.[*].test', 'body.$.attachements')).toBeFalsy();
expect(ParameterKeyUtility.isAncestorKey('body.$.attachement.[*].test', undefined)).toBeFalsy();
expect(ParameterKeyUtility.isAncestorKey('body.$.attachments.[*].test', 'body.$.attachments')).toBeTruthy();
expect(ParameterKeyUtility.isAncestorKey('body.$.attachments.[*].any.[*].test', 'body.$.attachments')).toBeTruthy();
expect(ParameterKeyUtility.isAncestorKey('body.$.attachments123', 'body.$.attachments')).toBeFalsy();
expect(ParameterKeyUtility.isAncestorKey('body.$.attachment.[*].test', 'body.$.attachments')).toBeFalsy();
expect(ParameterKeyUtility.isAncestorKey('body.$.attachment.[*].test', undefined)).toBeFalsy();
});
});

describe('isChildKey', () => {
it('should return correct result different cases', () => {
expect(ParameterKeyUtility.isChildKey('body.$.attachements', 'body.$.attachements.[*]')).toBeTruthy();
expect(ParameterKeyUtility.isChildKey('body.$.attachements.[*]', 'body.$.attachements.[*].test')).toBeTruthy();
expect(ParameterKeyUtility.isChildKey('body.$.attachments', 'body.$.attachments.[*]')).toBeTruthy();
expect(ParameterKeyUtility.isChildKey('body.$.attachments.[*]', 'body.$.attachments.[*].test')).toBeTruthy();
expect(ParameterKeyUtility.isChildKey('body.$.[*].test.[*]', 'body.$.[*].test.[*].id')).toBeTruthy();
expect(ParameterKeyUtility.isChildKey('body.$', 'body.$.attachements')).toBeTruthy();
expect(ParameterKeyUtility.isChildKey('body.$.attachements123', 'body.$.attachements')).toBeFalsy();
expect(ParameterKeyUtility.isChildKey('body.$.attachement2222', 'body.$.attachements.test')).toBeFalsy();
expect(ParameterKeyUtility.isChildKey('body.$.attachement.[*].test', undefined)).toBeFalsy();
expect(ParameterKeyUtility.isChildKey('body.$', 'body.$.attachments')).toBeTruthy();
expect(ParameterKeyUtility.isChildKey('body.$.attachments123', 'body.$.attachments')).toBeFalsy();
expect(ParameterKeyUtility.isChildKey('body.$.attachment2222', 'body.$.attachments.test')).toBeFalsy();
expect(ParameterKeyUtility.isChildKey('body.$.attachment.[*].test', undefined)).toBeFalsy();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10492,7 +10492,7 @@ export const Outlook = {
in: 'path',
description: 'Id of the attachment to download.',
required: true,
'x-ms-summary': 'Attachement Id',
'x-ms-summary': 'Attachment Id',
type: 'string',
},
{
Expand Down

0 comments on commit 8d5133e

Please sign in to comment.