chore: Clean up the examples dashboards (#26158)

This commit is contained in:
Michael S. Molina
2023-12-04 16:05:08 -03:00
committed by GitHub
parent 248586de6e
commit 3ab27c6ec9
19 changed files with 695 additions and 1350 deletions

View File

@@ -97,17 +97,11 @@ class TestExportDashboardsCommand(SupersetTestCase):
"published": False,
"uuid": str(example_dashboard.uuid),
"position": {
"CHART-36bfc934": {
"children": [],
"id": "CHART-36bfc934",
"meta": {"height": 25, "sliceName": "Region Filter", "width": 2},
"type": "CHART",
},
"CHART-37982887": {
"children": [],
"id": "CHART-37982887",
"meta": {
"height": 25,
"height": 52,
"sliceName": "World's Population",
"width": 2,
},
@@ -180,7 +174,7 @@ class TestExportDashboardsCommand(SupersetTestCase):
"type": "COLUMN",
},
"COLUMN-fe3914b8": {
"children": ["CHART-36bfc934", "CHART-37982887"],
"children": ["CHART-37982887"],
"id": "COLUMN-fe3914b8",
"meta": {"background": "BACKGROUND_TRANSPARENT", "width": 2},
"type": "COLUMN",
@@ -299,7 +293,9 @@ class TestExportDashboardsCommand(SupersetTestCase):
mock_suffix.side_effect = (str(i) for i in itertools.count(1))
position = get_default_position("example")
chart_1 = db.session.query(Slice).filter_by(slice_name="Region Filter").one()
chart_1 = (
db.session.query(Slice).filter_by(slice_name="World's Population").one()
)
new_position = append_charts(position, {chart_1})
assert new_position == {
"DASHBOARD_VERSION_KEY": "v2",
@@ -328,7 +324,7 @@ class TestExportDashboardsCommand(SupersetTestCase):
"meta": {
"chartId": chart_1.id,
"height": 50,
"sliceName": "Region Filter",
"sliceName": "World's Population",
"uuid": str(chart_1.uuid),
"width": 4,
},
@@ -375,7 +371,7 @@ class TestExportDashboardsCommand(SupersetTestCase):
"meta": {
"chartId": chart_1.id,
"height": 50,
"sliceName": "Region Filter",
"sliceName": "World's Population",
"uuid": str(chart_1.uuid),
"width": 4,
},
@@ -406,7 +402,7 @@ class TestExportDashboardsCommand(SupersetTestCase):
"meta": {
"chartId": chart_1.id,
"height": 50,
"sliceName": "Region Filter",
"sliceName": "World's Population",
"uuid": str(chart_1.uuid),
"width": 4,
},