You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/01/05 16:18:50 UTC

[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #12161: test: World bank examples

dpgaspar commented on a change in pull request #12161:
URL: https://github.com/apache/incubator-superset/pull/12161#discussion_r552033727



##########
File path: tests/dashboards/commands_tests.py
##########
@@ -78,79 +82,148 @@ def test_export_dashboard_command(self, mock_g1, mock_g2):
         assert metadata == {
             "dashboard_title": "World Bank's Data",
             "description": None,
-            "css": "",
+            "css": None,
             "slug": "world_health",
             "uuid": str(example_dashboard.uuid),
             "position": {
-                "DASHBOARD_CHART_TYPE-0": {
+                "CHART-36bfc934": {
+                    "children": [],
+                    "id": "CHART-36bfc934",
+                    "meta": {"height": 25, "sliceName": "Region Filter", "width": 2},
+                    "type": "CHART",
+                },
+                "CHART-37982887": {
                     "children": [],
-                    "id": "DASHBOARD_CHART_TYPE-0",
-                    "meta": {"height": 50, "width": 4},
+                    "id": "CHART-37982887",
+                    "meta": {
+                        "height": 25,
+                        "sliceName": "World's Population",
+                        "width": 2,
+                    },
                     "type": "CHART",
                 },
-                "DASHBOARD_CHART_TYPE-1": {
+                "CHART-17e0f8d8": {
                     "children": [],
-                    "id": "DASHBOARD_CHART_TYPE-1",
-                    "meta": {"height": 50, "width": 4},
+                    "id": "CHART-17e0f8d8",
+                    "meta": {
+                        "height": 92,
+                        "sliceName": "Most Populated Countries",
+                        "width": 3,
+                    },
                     "type": "CHART",
                 },
-                "DASHBOARD_CHART_TYPE-2": {
+                "CHART-2ee52f30": {
                     "children": [],
-                    "id": "DASHBOARD_CHART_TYPE-2",
-                    "meta": {"height": 50, "width": 4},
+                    "id": "CHART-2ee52f30",
+                    "meta": {"height": 38, "sliceName": "Growth Rate", "width": 6},
                     "type": "CHART",
                 },
-                "DASHBOARD_CHART_TYPE-3": {
+                "CHART-2d5b6871": {
                     "children": [],
-                    "id": "DASHBOARD_CHART_TYPE-3",
-                    "meta": {"height": 50, "width": 4},
+                    "id": "CHART-2d5b6871",
+                    "meta": {"height": 52, "sliceName": "% Rural", "width": 7},
                     "type": "CHART",
                 },
-                "DASHBOARD_CHART_TYPE-4": {
+                "CHART-0fd0d252": {
                     "children": [],
-                    "id": "DASHBOARD_CHART_TYPE-4",
-                    "meta": {"height": 50, "width": 4},
+                    "id": "CHART-0fd0d252",
+                    "meta": {
+                        "height": 50,
+                        "sliceName": "Life Expectancy VS Rural %",
+                        "width": 8,
+                    },
                     "type": "CHART",
                 },
-                "DASHBOARD_CHART_TYPE-5": {
+                "CHART-97f4cb48": {
                     "children": [],
-                    "id": "DASHBOARD_CHART_TYPE-5",
-                    "meta": {"height": 50, "width": 4},
+                    "id": "CHART-97f4cb48",
+                    "meta": {"height": 38, "sliceName": "Rural Breakdown", "width": 3},
                     "type": "CHART",
                 },
-                "DASHBOARD_CHART_TYPE-6": {
+                "CHART-b5e05d6f": {
                     "children": [],
-                    "id": "DASHBOARD_CHART_TYPE-6",
-                    "meta": {"height": 50, "width": 4},
+                    "id": "CHART-b5e05d6f",
+                    "meta": {
+                        "height": 50,
+                        "sliceName": "World's Pop Growth",
+                        "width": 4,
+                    },
                     "type": "CHART",
                 },
-                "DASHBOARD_CHART_TYPE-7": {
+                "CHART-e76e9f5f": {
                     "children": [],
-                    "id": "DASHBOARD_CHART_TYPE-7",
-                    "meta": {"height": 50, "width": 4},
+                    "id": "CHART-e76e9f5f",
+                    "meta": {"height": 50, "sliceName": "Box plot", "width": 4},
                     "type": "CHART",
                 },
-                "DASHBOARD_CHART_TYPE-8": {
+                "CHART-a4808bba": {
                     "children": [],
-                    "id": "DASHBOARD_CHART_TYPE-8",
-                    "meta": {"height": 50, "width": 4},
+                    "id": "CHART-a4808bba",
+                    "meta": {"height": 50, "sliceName": "Treemap", "width": 8},
                     "type": "CHART",
                 },
-                "DASHBOARD_CHART_TYPE-9": {
+                "CHART-3nc0d8sk": {
                     "children": [],
-                    "id": "DASHBOARD_CHART_TYPE-9",
-                    "meta": {"height": 50, "width": 4},
+                    "id": "CHART-3nc0d8sk",
+                    "meta": {"height": 50, "sliceName": "Treemap", "width": 8},
                     "type": "CHART",
                 },
+                "COLUMN-071bbbad": {
+                    "children": ["ROW-1e064e3c", "ROW-afdefba9"],
+                    "id": "COLUMN-071bbbad",
+                    "meta": {"background": "BACKGROUND_TRANSPARENT", "width": 9},
+                    "type": "COLUMN",
+                },
+                "COLUMN-fe3914b8": {
+                    "children": ["CHART-36bfc934", "CHART-37982887"],
+                    "id": "COLUMN-fe3914b8",
+                    "meta": {"background": "BACKGROUND_TRANSPARENT", "width": 2},
+                    "type": "COLUMN",
+                },
+                "GRID_ID": {
+                    "children": ["ROW-46632bc2", "ROW-3fa26c5d", "ROW-812b3f13"],
+                    "id": "GRID_ID",
+                    "type": "GRID",
+                },
+                "HEADER_ID": {
+                    "id": "HEADER_ID",
+                    "meta": {"text": "World's Bank Data"},
+                    "type": "HEADER",
+                },
+                "ROOT_ID": {"children": ["GRID_ID"], "id": "ROOT_ID", "type": "ROOT"},
+                "ROW-1e064e3c": {
+                    "children": ["COLUMN-fe3914b8", "CHART-2d5b6871"],
+                    "id": "ROW-1e064e3c",
+                    "meta": {"background": "BACKGROUND_TRANSPARENT"},
+                    "type": "ROW",
+                },
+                "ROW-3fa26c5d": {
+                    "children": ["CHART-b5e05d6f", "CHART-0fd0d252"],
+                    "id": "ROW-3fa26c5d",
+                    "meta": {"background": "BACKGROUND_TRANSPARENT"},
+                    "type": "ROW",
+                },
+                "ROW-46632bc2": {
+                    "children": ["COLUMN-071bbbad", "CHART-17e0f8d8"],
+                    "id": "ROW-46632bc2",
+                    "meta": {"background": "BACKGROUND_TRANSPARENT"},
+                    "type": "ROW",
+                },
+                "ROW-812b3f13": {
+                    "children": ["CHART-a4808bba", "CHART-e76e9f5f"],
+                    "id": "ROW-812b3f13",
+                    "meta": {"background": "BACKGROUND_TRANSPARENT"},
+                    "type": "ROW",
+                },
+                "ROW-afdefba9": {
+                    "children": ["CHART-2ee52f30", "CHART-97f4cb48"],
+                    "id": "ROW-afdefba9",
+                    "meta": {"background": "BACKGROUND_TRANSPARENT"},
+                    "type": "ROW",
+                },
                 "DASHBOARD_VERSION_KEY": "v2",
             },
-            "metadata": {
-                "timed_refresh_immune_slices": [],
-                "expanded_slices": {},
-                "refresh_frequency": 0,
-                "default_filters": "{}",
-                "color_scheme": None,
-            },
+            "metadata": {"mock_key": "mock_value"},

Review comment:
       Why the change?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org