diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/time_table.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/time_table.js index ea1353bec8dba..7da90027856f6 100644 --- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/time_table.js +++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/time_table.js @@ -47,7 +47,7 @@ describe('Visualization > Time TableViz', () => { waitAlias: '@getJson', querySubstring: NUM_METRIC.label, }); - cy.get('.time-table').within(() => { + cy.get('[data-test="time-table"]').within(() => { cy.get('span').contains('Sum(num)'); cy.get('span').contains('COUNT(*)'); }); @@ -75,7 +75,7 @@ describe('Visualization > Time TableViz', () => { waitAlias: '@getJson', querySubstring: NUM_METRIC.label, }); - cy.get('.time-table').within(() => { + cy.get('[data-test="time-table"]').within(() => { cy.get('td').contains('boy'); cy.get('td').contains('girl'); }); @@ -112,7 +112,7 @@ describe('Visualization > Time TableViz', () => { waitAlias: '@getJson', querySubstring: NUM_METRIC.label, }); - cy.get('.time-table').within(() => { + cy.get('[data-test="time-table"]').within(() => { cy.get('th').contains('Current'); cy.get('th').contains('Last Year'); cy.get('th').contains('YoY'); diff --git a/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx b/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx index d12022f74c60e..f9638575bed66 100644 --- a/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx +++ b/superset-frontend/src/visualizations/TimeTable/TimeTable.jsx @@ -31,7 +31,6 @@ import sortNumericValues from 'src/utils/sortNumericValues'; import FormattedNumber from './FormattedNumber'; import SparklineCell from './SparklineCell'; -import './TimeTable.less'; const ACCESSIBLE_COLOR_BOUNDS = ['#ca0020', '#0571b0']; @@ -101,6 +100,7 @@ const defaultProps = { const TimeTableStyles = styled.div` height: ${props => props.height}px; + overflow: auto; th { z-index: 1; // to cover sparkline @@ -325,7 +325,11 @@ const TimeTable = ({ : []; return ( - +