-
Notifications
You must be signed in to change notification settings - Fork 366
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: [M3-8391] - Account maintenance CSV download in the first attempt #11025
fix: [M3-8391] - Account maintenance CSV download in the first attempt #11025
Conversation
Coverage Report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx! while not particularly elegant, setTimeOut
may be the best way to make this click async without adding a lot of logic. Works for me.
Confirmed fix works 100% of the time (with MSW) ✅
@@ -136,7 +136,9 @@ const MaintenanceTable = ({ type }: Props) => { | |||
|
|||
const downloadCSV = async () => { | |||
await getCSVData(); | |||
csvRef.current.link.click(); | |||
setTimeout(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a bit of a hack, please add a comment as to why we are doing this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on the necessity of adding an explanatory comment here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed fix works as expected ✅
@@ -136,7 +136,9 @@ const MaintenanceTable = ({ type }: Props) => { | |||
|
|||
const downloadCSV = async () => { | |||
await getCSVData(); | |||
csvRef.current.link.click(); | |||
setTimeout(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on the necessity of adding an explanatory comment here
Not sure if the examples are really relevant but maybe they have some more elegant ways of handling this? |
@bnussman-akamai Thanks for sharing this approach! Ideally, this async method should work, but after some digging, I discovered that the implementation doesn't behave as expected (the async operation isn't truly asynchronous). There are several open issues in |
Understood @harsh-akamai Thanks for taking a look! I see |
@bnussman-akamai Yes. |
Cloud Manager E2E Run #6616
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Passed #6616
|
Run duration | 25m 37s |
Commit |
e8c0ed4401: fix: [M3-8391] - Account maintenance CSV download in the first attempt (#11025)
|
Committer | Harsh Shankar Rao |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
3
|
Pending |
2
|
Skipped |
0
|
Passing |
414
|
View all changes introduced in this branch ↗︎ |
Description 📝
When downloading CSVs on the Account Maintenance page at /account/maintenance, the generated CSV always contains empty data on the first attempt to download (per page load). The user must download the CSV a second time in order for the data to be populated.
Changes 🔄
Target release date 🗓️
N/A
How to test 🧪
Verification steps
As an Author I have considered 🤔
Check all that apply