Skip to content
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

fix: handling xml parsing not returning array for one element #343

Merged
merged 5 commits into from
Aug 26, 2022

Conversation

scolladon
Copy link
Owner

@scolladon scolladon commented Aug 26, 2022

What does this pull request contain?


  • Added (for new features).
  • Changed (for changes in existing functionality).
  • Deprecated (for soon-to-be removed features).
  • Removed (for now removed features).
  • Fixed (for any bug fixes).
  • Security (for vulnerability fixes).

Explain your changes


Handling one parsed xml element to json resolving to object instead of array
Creating a method to deal with that aspect
Using this method in inFileHandler as well

Test has been added to cover this use case in the flowTranslationProcessor.test.js file
Tests have been added for the new asArray helper method

Does this close any currently open issues?


closes #342

  • Jest test added to check the fix is applied.

Any particular element that can be tested locally


Any other comments


Tested in sfdx playground

@codeclimate
Copy link

codeclimate bot commented Aug 26, 2022

Code Climate has analyzed commit fe8a4cb and detected 0 issues on this pull request.

View more on Code Climate.

@codecov
Copy link

codecov bot commented Aug 26, 2022

Codecov Report

Merging #343 (fe8a4cb) into main (2ca036b) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #343   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           29        29           
  Lines          730       733    +3     
=========================================
+ Hits           730       733    +3     
Impacted Files Coverage Δ
src/post-processor/flowTranslationProcessor.js 100.00% <100.00%> (ø)
src/service/inFileHandler.js 100.00% <100.00%> (ø)
src/utils/fxpHelper.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@scolladon scolladon changed the title fix: handling fxp not returning array for one element fix: handling xml parsing not returning array for one element Aug 26, 2022
@scolladon scolladon merged commit c5abb9a into main Aug 26, 2022
@scolladon scolladon deleted the fix/flow-translation-issue branch August 26, 2022 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

translationJSON?.Translations?.flowDefinitions?.forEach is not a function
1 participant