mikebridge commented on code in PR #44370:
URL: https://github.com/apache/superset/pull/44370#discussion_r4056227970
##########
superset-frontend/src/components/Chart/ChartRenderer.test.tsx:
##########
@@ -483,3 +500,32 @@ test('does not render chart during loading when last data
has errors', () => {
const { queryByTestId } = render(<ChartRenderer {...props} />);
expect(queryByTestId('mock-super-chart')).not.toBeInTheDocument();
});
+
+test('chart mask updates preserve incoming selection provenance', () => {
+ const updateDataMask = jest.fn();
+ render(
+ <ChartRenderer
+ {...requiredProps}
+ latestQueryFormData={{
+ datasource: '7__semantic_view',
+ viz_type: 'table',
+ semantic_selection_version: 'cube-member-id-v1',
Review Comment:
Fixed in fa66bca40ffc85ead8c159601d72c9d6a37240d7. The fixture now supplies
a distinct source-query provenance entry, and the assertion requires incoming
mask evidence, query evidence, and chart identity in that order. Mutation
proof: deleting `...(sourceForm.semantic_selection_sources ?? [])` causes this
assertion to fail (1 failed, 17 passed); restoring the original production code
makes all 18 ChartRenderer tests pass. Production code is unchanged.
Changed-file hooks passed apart from the fresh-clone TS6305 declaration
prerequisite; the authorized source-resolved TypeScript check passed.
@aminghadersohi please re-review.
--
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]