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

refactor: Removes 5.0 approved legacy charts #31582

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft
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 @@ -31,7 +31,10 @@ describe('explore view', () => {
});

it('should load Explore', () => {
const LINE_CHART_DEFAULTS = { ...FORM_DATA_DEFAULTS, viz_type: 'line' };
const LINE_CHART_DEFAULTS = {
...FORM_DATA_DEFAULTS,
viz_type: 'echarts_timeseries_line',
};
const formData = { ...LINE_CHART_DEFAULTS, metrics: [NUM_METRIC] };
cy.visitChartByParams(formData);
cy.verifySliceSuccess({ waitAlias: '@getJson', chartSelector: 'svg' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,19 +431,6 @@ describe('Drill to detail modal', () => {
});
});
});

describe('Bar Chart', () => {
it('opens the modal for unsupported chart without filters', () => {
interceptSamples();

cy.get("[data-test-viz-type='dist_bar'] svg").then($canvas => {
cy.wrap($canvas).scrollIntoView();
cy.wrap($canvas).rightclick(70, 150);
openModalFromChartContext('Drill to detail');
cy.getBySel('filter-val').should('not.exist');
});
});
});
});

describe('Tier 2 charts', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

openExploreWithDashboardContext('Top 10 California Names Timeseries');
Expand All @@ -294,14 +294,14 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// open second top tab to catch shared labels
openTab(0, 1);
waitForChartLoad({
name: 'Trends',
viz: 'line',
viz: 'echarts_timeseries_line',
});

openTab(0, 0);
Expand Down Expand Up @@ -330,7 +330,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand Down Expand Up @@ -378,7 +378,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand Down Expand Up @@ -427,7 +427,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand Down Expand Up @@ -480,7 +480,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand All @@ -492,7 +492,7 @@ describe('Dashboard edit', () => {

// open 2nd main tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

// label Andrew
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
Expand All @@ -505,7 +505,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand All @@ -517,7 +517,7 @@ describe('Dashboard edit', () => {

// open 2nd main tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

// label Andrew
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
Expand All @@ -536,7 +536,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand All @@ -548,7 +548,7 @@ describe('Dashboard edit', () => {

// open 2nd main tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

// label Andrew
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
Expand All @@ -561,7 +561,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand All @@ -573,7 +573,7 @@ describe('Dashboard edit', () => {

// open 2nd main tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

// label Andrew
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
Expand All @@ -588,7 +588,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand All @@ -610,7 +610,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand All @@ -622,7 +622,7 @@ describe('Dashboard edit', () => {

// open 2nd main tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

// label Anthony
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
Expand All @@ -634,7 +634,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand All @@ -646,7 +646,7 @@ describe('Dashboard edit', () => {

// open 2nd main tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

// label Anthony
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
Expand All @@ -661,7 +661,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand All @@ -673,7 +673,7 @@ describe('Dashboard edit', () => {

// open 2nd main tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

// label Anthony
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
Expand All @@ -686,7 +686,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand All @@ -698,7 +698,7 @@ describe('Dashboard edit', () => {

// open 2nd main tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

// label Anthony
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
Expand All @@ -721,7 +721,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});
cy.get(
'[data-test-chart-name="Top 10 California Names Timeseries"] .line .nv-legend-symbol',
Expand All @@ -731,7 +731,7 @@ describe('Dashboard edit', () => {

// open another nested tab
openTab(2, 1);
waitForChartLoad({ name: 'Growth Rate', viz: 'line' });
waitForChartLoad({ name: 'Growth Rate', viz: 'echarts_timeseries_line' });
cy.get('[data-test-chart-name="Growth Rate"] .line .nv-legend-symbol')
.first()
.should('have.css', 'fill', 'rgb(255, 0, 0)');
Expand All @@ -743,7 +743,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// go to previous tab
Expand Down Expand Up @@ -815,7 +815,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});
cy.get(
'[data-test-chart-name="Top 10 California Names Timeseries"] .line .nv-legend-symbol',
Expand Down Expand Up @@ -888,7 +888,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand Down Expand Up @@ -917,7 +917,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// label Anthony
Expand All @@ -929,7 +929,7 @@ describe('Dashboard edit', () => {

// open 2nd main tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

// label Anthony
cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
Expand Down Expand Up @@ -968,7 +968,7 @@ describe('Dashboard edit', () => {

// go to second tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
.first()
Expand All @@ -985,7 +985,7 @@ describe('Dashboard edit', () => {

// go to second tab
openTab(0, 1);
waitForChartLoad({ name: 'Trends', viz: 'line' });
waitForChartLoad({ name: 'Trends', viz: 'echarts_timeseries_line' });

cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol')
.first()
Expand Down Expand Up @@ -1014,7 +1014,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});
cy.get(
'[data-test-chart-name="Top 10 California Names Timeseries"] .line .nv-legend-symbol',
Expand All @@ -1024,7 +1024,7 @@ describe('Dashboard edit', () => {

// open another nested tab
openTab(2, 1);
waitForChartLoad({ name: 'Growth Rate', viz: 'line' });
waitForChartLoad({ name: 'Growth Rate', viz: 'echarts_timeseries_line' });
cy.get('[data-test-chart-name="Growth Rate"] .line .nv-legend-symbol')
.first()
.should('have.css', 'fill', 'rgb(50, 0, 167)');
Expand All @@ -1036,7 +1036,7 @@ describe('Dashboard edit', () => {
openTab(1, 1);
waitForChartLoad({
name: 'Top 10 California Names Timeseries',
viz: 'line',
viz: 'echarts_timeseries_line',
});

// go to previous tab
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { TABBED_DASHBOARD } from 'cypress/utils/urls';
import { expandFilterOnLeftPanel } from './utils';

const TREEMAP = { name: 'Treemap', viz: 'treemap_v2' };
const LINE_CHART = { name: 'Growth Rate', viz: 'line' };
const LINE_CHART = { name: 'Growth Rate', viz: 'echarts_timeseries_line' };
const BOX_PLOT = { name: 'Box plot', viz: 'box_plot' };
const BIG_NUMBER = { name: 'Number of Girls', viz: 'big_number_total' };
const TABLE = { name: 'Names Sorted by Num in California', viz: 'table' };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export const WORLD_HEALTH_CHARTS = [
{ name: '% Rural', viz: 'world_map' },
{ name: 'Most Populated Countries', viz: 'table' },
{ name: "World's Population", viz: 'big_number' },
{ name: 'Growth Rate', viz: 'line' },
{ name: 'Growth Rate', viz: 'echarts_timeseries_line' },
{ name: 'Rural Breakdown', viz: 'sunburst_v2' },
{ name: "World's Pop Growth", viz: 'area' },
{ name: "World's Pop Growth", viz: 'echarts_area' },
{ name: 'Life Expectancy VS Rural %', viz: 'bubble' },
{ name: 'Treemap', viz: 'treemap_v2' },
{ name: 'Box plot', viz: 'box_plot' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('No Results', () => {
const formData = {
...FORM_DATA_DEFAULTS,
metrics: [NUM_METRIC],
viz_type: 'line',
viz_type: 'echarts_timeseries_line',
adhoc_filters: [
{
expressionType: 'SIMPLE',
Expand Down
Loading
Loading