mirror of
https://github.com/apache/superset.git
synced 2026-06-01 05:39:17 +00:00
fix(dashboard): recursive parent on dashboard components (#16933)
* fix(dashboard): don't add recursive parents on wrapper component
* add test
* refine logic and add new test
(cherry picked from commit a07c9d591b)
This commit is contained in:
committed by
Ville Brofeldt
parent
ddc01a9b76
commit
b04a9f8ca1
@@ -94,7 +94,11 @@ describe('newEntitiesFromDrop', () => {
|
||||
|
||||
expect(result.a.children).toHaveLength(1);
|
||||
expect(Object.keys(result)).toHaveLength(3);
|
||||
expect(result[newRowId].type).toBe(ROW_TYPE);
|
||||
expect(result[newChartId].type).toBe(CHART_TYPE);
|
||||
const newRow = result[newRowId];
|
||||
expect(newRow.type).toBe(ROW_TYPE);
|
||||
expect(newRow.parents).toEqual(['a']);
|
||||
const newChart = result[newChartId];
|
||||
expect(newChart.type).toBe(CHART_TYPE);
|
||||
expect(newChart.parents).toEqual(['a', newRowId]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user