diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/controls.test.js b/superset-frontend/cypress-base/cypress/integration/dashboard/controls.test.js index bdc8fa44a6..9b80c4d9dc 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/controls.test.js +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/controls.test.js @@ -79,7 +79,7 @@ describe('Dashboard top-level controls', () => { 'ant-dropdown-menu-item-disabled', ); - // wait all charts force refreshed + // wait all charts force refreshed. cy.wait(aliases, { responseTimeout: 15000 }).then(xhrs => { xhrs.forEach(async xhr => { const responseBody = await readResponseBlob(xhr.response.body); diff --git a/superset-frontend/src/components/ListView/types.ts b/superset-frontend/src/components/ListView/types.ts index f73b177c1f..19446c352a 100644 --- a/superset-frontend/src/components/ListView/types.ts +++ b/superset-frontend/src/components/ListView/types.ts @@ -56,8 +56,8 @@ type FilterOperator = | 'chart_all_text' | 'dataset_is_null_or_empty' | 'between' - | 'dashboard_is_fav' - | 'chart_is_fav'; + | 'dashboard_is_favorite' + | 'chart_is_favorite'; export interface Filter { Header: ReactNode; @@ -123,6 +123,6 @@ export enum FilterOperators { chartAllText = 'chart_all_text', datasetIsNullOrEmpty = 'dataset_is_null_or_empty', between = 'between', - dashboardIsFav = 'dashboard_is_fav', - chartIsFav = 'chart_is_fav', + dashboardIsFav = 'dashboard_is_favorite', + chartIsFav = 'chart_is_favorite', } diff --git a/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx b/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx index cbf351f43d..4bd7561379 100644 --- a/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx @@ -92,7 +92,7 @@ function ChartTable({ } else { filters.push({ id: 'id', - operator: 'chart_is_fav', + operator: 'chart_is_favorite', value: true, }); } diff --git a/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx b/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx index 7830122f91..2182982ff9 100644 --- a/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx @@ -99,7 +99,7 @@ function DashboardTable({ } else { filters.push({ id: 'id', - operator: 'dashboard_is_fav', + operator: 'dashboard_is_favorite', value: true, }); } diff --git a/superset/charts/filters.py b/superset/charts/filters.py index 5af8c9e032..7d8338edd3 100644 --- a/superset/charts/filters.py +++ b/superset/charts/filters.py @@ -50,7 +50,7 @@ class ChartFavoriteFilter(BaseFavoriteFilter): # pylint: disable=too-few-public Custom filter for the GET list that filters all charts that a user has favored """ - arg_name = "chart_is_fav" + arg_name = "chart_is_favorite" class_name = "slice" model = Slice diff --git a/superset/dashboards/filters.py b/superset/dashboards/filters.py index 020aa0294f..589d98fb26 100644 --- a/superset/dashboards/filters.py +++ b/superset/dashboards/filters.py @@ -51,7 +51,7 @@ class DashboardFavoriteFilter( Custom filter for the GET list that filters all dashboards that a user has favored """ - arg_name = "dashboard_is_fav" + arg_name = "dashboard_is_favorite" class_name = "Dashboard" model = Dashboard diff --git a/tests/charts/api_tests.py b/tests/charts/api_tests.py index 3ba175d924..9028806a93 100644 --- a/tests/charts/api_tests.py +++ b/tests/charts/api_tests.py @@ -923,7 +923,7 @@ class TestChartApi(SupersetTestCase, ApiOwnersTestCaseMixin): ) arguments = { - "filters": [{"col": "id", "opr": "chart_is_fav", "value": True}], + "filters": [{"col": "id", "opr": "chart_is_favorite", "value": True}], "order_column": "slice_name", "order_direction": "asc", "keys": ["none"], diff --git a/tests/dashboards/api_tests.py b/tests/dashboards/api_tests.py index 3e5a19da32..cd91badc24 100644 --- a/tests/dashboards/api_tests.py +++ b/tests/dashboards/api_tests.py @@ -368,7 +368,7 @@ class TestDashboardApi(SupersetTestCase, ApiOwnersTestCaseMixin): ) arguments = { - "filters": [{"col": "id", "opr": "dashboard_is_fav", "value": True}], + "filters": [{"col": "id", "opr": "dashboard_is_favorite", "value": True}], "order_column": "dashboard_title", "order_direction": "asc", "keys": ["none"], @@ -431,7 +431,7 @@ class TestDashboardApi(SupersetTestCase, ApiOwnersTestCaseMixin): .all() ) arguments = { - "filters": [{"col": "id", "opr": "dashboard_is_fav", "value": False}], + "filters": [{"col": "id", "opr": "dashboard_is_favorite", "value": False}], "order_column": "dashboard_title", "order_direction": "asc", "keys": ["none"],