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(Tailorings): RHINENG-14520 - Fix export for wizard #2314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bastilian
Copy link
Member

This fixes the export for the Rules step in the "Create Policy" wizard.

How to test:

  1. Open the "Create Policy" wizard and advance to the Rules step
  2. Try exporting the rules as JSON or CSV
  3. Verify the export has been downloaded and the items inside equal the rules in the table
  4. Test exporting with and without filters applied

Secure Coding Practices Checklist GitHub Link

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

@bastilian bastilian requested a review from a team as a code owner December 18, 2024 11:19
@codecov-commenter
Copy link

codecov-commenter commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 68.07%. Comparing base (e984fa1) to head (a171eb4).

Files with missing lines Patch % Lines
...alComponents/Tailorings/components/TailoringTab.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2314   +/-   ##
=======================================
  Coverage   68.07%   68.07%           
=======================================
  Files         357      357           
  Lines        6471     6472    +1     
  Branches     2078     2078           
=======================================
+ Hits         4405     4406    +1     
  Misses       2066     2066           
Flag Coverage Δ
combined 68.07% <50.00%> (+<0.01%) ⬆️
cypress 32.89% <0.00%> (-0.01%) ⬇️
jest 67.45% <50.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@gkarat gkarat left a comment

Choose a reason for hiding this comment

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

Verify the export has been downloaded and the items inside equal the rules in the table

I had 74 rules selected in the beginning and tried to show all of the available rules (not only the selected ones), and did the export as CSV. The end result contained only those that are selected which goes slightly against the expected results (to export all the items in the table). I have tried to select one more item (having 75 rules selected in total), but the exported CSV again contained only 74 initial rules.

@@ -42,6 +42,7 @@ const withExport = ({
downloadItems(exportColumns, items, format);
onComplete?.(items);
} catch (error) {
console.log(error);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log(error);
console.error(error);

@gkarat
Copy link
Contributor

gkarat commented Dec 19, 2024

Adding filters (like Name) also doesn't change the exported data.

@gkarat gkarat added the bug Something isn't working label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants