sadpandajoe commented on code in PR #38069:
URL: https://github.com/apache/superset/pull/38069#discussion_r3877647315
##########
superset-frontend/src/explore/exploreUtils/exportChart.test.ts:
##########
@@ -60,8 +60,10 @@ beforeEach(() => {
// Tests for exportChart URL prefix handling in streaming export
test('exportChart v1 API passes prefixed URL to onStartStreamingExport when
app root is configured', async () => {
- const appRoot = '/superset';
- ensureAppRoot.mockImplementation((path: string) => `${appRoot}${path}`);
+ // Uses SupersetClient.getUrl
+ SupersetClient.getUrl.mockImplementation(
Review Comment:
The `/superset` coverage here only uses `onStartStreamingExport`, so it
bypasses the fallback changed in `exportChart` that submits through `postForm`.
A regression that re-prefixes the resolved URL or passes it as an endpoint
would make non-streaming exports 404 under a subdirectory while these tests
still pass. Could this also assert, without a streaming handler, that
`postForm` receives `{ url: '/superset/api/v1/chart/data' }`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]