-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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: accept headers on import #17080
Conversation
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.
ok as is, or pending any tests you wanted to add. Fetchmock could work here.
Codecov Report
@@ Coverage Diff @@
## master #17080 +/- ##
=======================================
Coverage 76.88% 76.88%
=======================================
Files 1031 1031
Lines 55183 55183
Branches 7505 7505
=======================================
Hits 42430 42430
Misses 12501 12501
Partials 252 252
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
wrapper.find(Button).at(2).simulate('click'); | ||
await waitForComponentToPaint(wrapper); | ||
expect(fetchMock.calls(DATABASE_IMPORT_URL)[0][1]?.headers).toStrictEqual({ | ||
Accept: 'application/json', |
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.
cool!
* fix: accept headers on import * Add unit test
* fix: accept headers on import * Add unit test (cherry picked from commit 40e9add)
SUMMARY
When importing an asset (dashboard, chart, etc.) we should specify an
Accept
request header to prevent the pretty 500 page from showing up.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION