-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[SIP-4] replace chart ajax calls with SupersetClient
#5875
Merged
+929
−698
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d6e6712
[deps] add @superset-ui/core
williaster 4eb807c
[superset-client] initialize SupersetClient in app setup
williaster aa6e6a7
[superset-client] add abortcontroller-polyfill
williaster cb21249
[superset-client] replace all chart ajax calls with SupersetClient
williaster 4730da8
[tests] add fetch-mock dep and helpers/setupSupersetClient.js
williaster 3b507c2
[superset client][charts][tests] fix and improve chartActions_spec
williaster e01d6ba
[deps] @superset-ui/core@^0.0.4
williaster 5b4b2ce
[common] add better SupersetClient initialization error
williaster b8ba1eb
[cypress] add readResponseBlob helper, fix broken fetch-based tests
williaster 7288d59
[cypress] fix tests from rebase
williaster 2f385cb
[deps] @superset-ui/core@^0.0.5
williaster 183e35c
[cypress][fetch] fix controls test for fetch
williaster 52d36e6
[cypress][dashboard][fetch] fix filter test for fetch
williaster e7c4597
[superset-client] configure protocol on init
williaster be7d61a
yarn.lock
williaster 5d6c6f9
undo Chart.jsx revert
williaster 9bbbba0
yarn again
williaster 0265386
[superset-client] fix chartAction unit tests
williaster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[cypress] add readResponseBlob helper, fix broken fetch-based tests
commit b8ba1eb9dd196e3a4358080f30e0f316ea17f77b
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// This function returns a promise that resolves to the value | ||
// of the passed response blob. It assumes the blob should be read as text, | ||
// and that the response can be parsed as JSON. This is needed to read | ||
// the value of any fetch-based response. | ||
export default function readResponseBlob(blob) { | ||
return new Promise((resolve) => { | ||
const reader = new FileReader(); | ||
reader.onload = () => resolve(JSON.parse(reader.result)); | ||
reader.readAsText(blob); | ||
}); | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you double check cypress doesn't add this in as a test? If you run tests just make sure this file doesn't show up. I had trouble adding helpers / utils because it kept picking them up as tests. I'm not sure if it will happen because this is outside of the integration folder, but if it does I added a setting to ignore any files with the pattern
*.helper.js
.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.
@michellethomas thanks for bringing this up, it looks okay from the cypress UI