Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Clean up the examples dashboards #26158

Merged
merged 6 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function prepareDashboardFilters(
},
type: 'NATIVE_FILTER',
description: '',
chartsInScope: [6],
chartsInScope: [5],
tabsInScope: [],
});
});
Expand Down Expand Up @@ -150,7 +150,7 @@ function prepareDashboardFilters(
meta: {
width: 4,
height: 50,
chartId: 6,
chartId: 5,
sliceName: 'Most Populated Countries',
},
},
Expand Down Expand Up @@ -414,7 +414,7 @@ describe('Native filters', () => {
cy.createSampleDashboards([0]);
});

it('Verify that default value is respected after revisit', () => {
it.only('Verify that default value is respected after revisit', () => {
prepareDashboardFilters([
{ name: 'country_name', column: 'country_name', datasetId: 2 },
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { TABBED_DASHBOARD } from 'cypress/utils/urls';
import { expandFilterOnLeftPanel } from './utils';

const TREEMAP = { name: 'Treemap', viz: 'treemap_v2' };
const FILTER_BOX = { name: 'Region Filter', viz: 'filter_box' };
const LINE_CHART = { name: 'Growth Rate', viz: 'line' };
const BOX_PLOT = { name: 'Box plot', viz: 'box_plot' };
const BIG_NUMBER = { name: 'Number of Girls', viz: 'big_number_total' };
Expand All @@ -41,7 +40,6 @@ function topLevelTabs() {
function resetTabs() {
topLevelTabs();
cy.get('@top-level-tabs').first().click();
waitForChartLoad(FILTER_BOX);
waitForChartLoad(TREEMAP);
waitForChartLoad(BIG_NUMBER);
waitForChartLoad(TABLE);
Expand Down Expand Up @@ -96,7 +94,6 @@ describe('Dashboard tabs', () => {

it.skip('should send new queries when tab becomes visible', () => {
// landing in first tab
waitForChartLoad(FILTER_BOX);
waitForChartLoad(TREEMAP);

getChartAliasBySpec(TREEMAP).then(treemapAlias => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { ChartSpec, waitForChartLoad } from 'cypress/utils';
export const WORLD_HEALTH_CHARTS = [
{ name: '% Rural', viz: 'world_map' },
{ name: 'Most Populated Countries', viz: 'table' },
{ name: 'Region Filter', viz: 'filter_box' },
{ name: "World's Population", viz: 'big_number' },
{ name: 'Growth Rate', viz: 'line' },
{ name: 'Rural Breakdown', viz: 'sunburst' },
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/cypress-base/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import '@cypress/code-coverage/support';
import '@applitools/eyes-cypress/commands';
import failOnConsoleError, { Config } from 'cypress-fail-on-console-error';
import failOnConsoleError from 'cypress-fail-on-console-error';

require('cy-verify-downloads').addCustomCommand();

Expand All @@ -44,8 +44,8 @@
});

const BASE_EXPLORE_URL = '/explore/?form_data=';
let DASHBOARD_FIXTURES: Record<string, any>[] = [];

Check warning on line 47 in superset-frontend/cypress-base/cypress/support/e2e.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Unexpected any. Specify a different type
let CHART_FIXTURES: Record<string, any>[] = [];

Check warning on line 48 in superset-frontend/cypress-base/cypress/support/e2e.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Unexpected any. Specify a different type

Cypress.Commands.add('loadChartFixtures', () =>
cy.fixture('charts.json').then(charts => {
Expand All @@ -72,7 +72,7 @@
});

Cypress.Commands.add('cleanDashboards', () => {
cy.getDashboards().then((sampleDashboards?: Record<string, any>[]) => {

Check warning on line 75 in superset-frontend/cypress-base/cypress/support/e2e.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Unexpected any. Specify a different type
const deletableDashboards = [];
for (let i = 0; i < DASHBOARD_FIXTURES.length; i += 1) {
const fixture = DASHBOARD_FIXTURES[i];
Expand Down Expand Up @@ -102,7 +102,7 @@
});

Cypress.Commands.add('cleanCharts', () => {
cy.getCharts().then((sampleCharts?: Record<string, any>[]) => {

Check warning on line 105 in superset-frontend/cypress-base/cypress/support/e2e.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Unexpected any. Specify a different type
const deletableCharts = [];
for (let i = 0; i < CHART_FIXTURES.length; i += 1) {
const fixture = CHART_FIXTURES[i];
Expand Down Expand Up @@ -306,7 +306,7 @@
Cypress.Commands.add(
'deleteDashboardByName',
(dashboardName: string, failOnStatusCode = false) =>
cy.getDashboards().then((sampleDashboards?: Record<string, any>[]) => {

Check warning on line 309 in superset-frontend/cypress-base/cypress/support/e2e.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Unexpected any. Specify a different type
const dashboard = sampleDashboards?.find(
d => d.dashboard_title === dashboardName,
);
Expand Down Expand Up @@ -360,7 +360,7 @@

Cypress.Commands.add(
'updateDashboard',
(dashboardId: number, body: Record<string, any>) =>

Check warning on line 363 in superset-frontend/cypress-base/cypress/support/e2e.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Unexpected any. Specify a different type
cy
.request({
method: 'PUT',
Expand Down Expand Up @@ -406,7 +406,7 @@
Cypress.Commands.add(
'deleteChartByName',
(sliceName: string, failOnStatusCode = false) =>
cy.getCharts().then((sampleCharts?: Record<string, any>[]) => {

Check warning on line 409 in superset-frontend/cypress-base/cypress/support/e2e.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Unexpected any. Specify a different type
const chart = sampleCharts?.find(c => c.slice_name === sliceName);
if (chart) {
cy.deleteChart(chart.id, failOnStatusCode);
Expand Down
68 changes: 0 additions & 68 deletions superset/examples/configs/charts/Filter_Segments.yaml

This file was deleted.

53 changes: 0 additions & 53 deletions superset/examples/configs/charts/Filtering_Vaccines.yaml

This file was deleted.

47 changes: 0 additions & 47 deletions superset/examples/configs/charts/Vehicle_Sales_Filter.yaml

This file was deleted.

55 changes: 0 additions & 55 deletions superset/examples/configs/charts/Video_Game_Sales_Filter.yaml

This file was deleted.

Loading
Loading