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

chore: Use string key instead of number for modal action key (#1537) #1569

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

igarashitm
Copy link
Contributor

No description provided.

@igarashitm igarashitm requested a review from lordrip October 11, 2024 14:26
@@ -583,21 +583,6 @@ exports[`CustomAutoFields renders \`AutoFields\` for common fields 1`] = `
value=""
/>
</span>
<div
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure why, this also fails with upstream main for me and need yarn test -u to fix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ugh and workflow wants to add it back... not sure what's going on...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverted the snapshot change to let the workflow pass

Copy link
Member

Choose a reason for hiding this comment

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

How do you execute the test? a single one or all of them? sometimes the IDs are generated in sequence, so if you execute a single test, the ID is 1, but if you execute alongside others, maybe it is 4 instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm using yarn workspaces foreach --all --topological-dev run test and it fails for me with upstream main, stating that this div should be removed.

[@kaoto/kaoto]: FAIL src/components/Form/CustomAutoFields.test.tsx
[@kaoto/kaoto]:   ● CustomAutoFields › renders `AutoFields` for common fields
[@kaoto/kaoto]: 
[@kaoto/kaoto]:     expect(received).toMatchSnapshot()
[@kaoto/kaoto]: 
[@kaoto/kaoto]:     Snapshot name: `CustomAutoFields renders \`AutoFields\` for common fields 1`
[@kaoto/kaoto]: 
[@kaoto/kaoto]:     - Snapshot  - 15
[@kaoto/kaoto]:     + Received  +  0
[@kaoto/kaoto]: 
[@kaoto/kaoto]:     @@ -500,25 +500,10 @@
[@kaoto/kaoto]:                     step="1"
[@kaoto/kaoto]:                     type="number"
[@kaoto/kaoto]:                     value=""
[@kaoto/kaoto]:                   />
[@kaoto/kaoto]:                 </span>
[@kaoto/kaoto]:     -           <div
[@kaoto/kaoto]:     -             class="pf-v5-c-form__helper-text"
[@kaoto/kaoto]:     -           >
[@kaoto/kaoto]:     -             <div
[@kaoto/kaoto]:     -               class="pf-v5-c-helper-text"
[@kaoto/kaoto]:     -             >
[@kaoto/kaoto]:     -               <div
[@kaoto/kaoto]:     -                 class="pf-v5-c-helper-text__item"
[@kaoto/kaoto]:     -               >
[@kaoto/kaoto]:     -                 <span
[@kaoto/kaoto]:     -                   class="pf-v5-c-helper-text__item-text"
[@kaoto/kaoto]:     -                 />
[@kaoto/kaoto]:     -               </div>
[@kaoto/kaoto]:     -             </div>
[@kaoto/kaoto]:     -           </div>
[@kaoto/kaoto]:               </div>
[@kaoto/kaoto]:             </div>
[@kaoto/kaoto]:             <div
[@kaoto/kaoto]:               class="pf-v5-c-expandable-section"
[@kaoto/kaoto]:             >
[@kaoto/kaoto]: 
[@kaoto/kaoto]:       20 |     });
[@kaoto/kaoto]:       21 |
[@kaoto/kaoto]:     > 22 |     expect(wrapper?.asFragment()).toMatchSnapshot();
[@kaoto/kaoto]:          |                                   ^
[@kaoto/kaoto]:       23 |   });
[@kaoto/kaoto]:       24 |
[@kaoto/kaoto]:       25 |   it('render `NoFieldFound` when there are no fields', () => {
[@kaoto/kaoto]: 
[@kaoto/kaoto]:       at Object.toMatchSnapshot (src/components/Form/CustomAutoFields.test.tsx:22:35)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But anyway this PR is already adjusted to pass GH workflows although it fails with above locally for me.

@igarashitm igarashitm force-pushed the modal-action-string-key branch from 16de62a to 21803d0 Compare October 11, 2024 14:35
Copy link

sonarcloud bot commented Oct 11, 2024

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@c9f7a97). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1569   +/-   ##
=======================================
  Coverage        ?   80.01%           
  Complexity      ?      272           
=======================================
  Files           ?      276           
  Lines           ?     7839           
  Branches        ?     1523           
=======================================
  Hits            ?     6272           
  Misses          ?     1458           
  Partials        ?      109           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lordrip lordrip merged commit a887b87 into KaotoIO:main Oct 14, 2024
12 checks passed
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.

2 participants