diff --git a/superset/assets/cypress/integration/sqllab/query.js b/superset/assets/cypress/integration/sqllab/query.js index 2f799b0341..0f520395cb 100644 --- a/superset/assets/cypress/integration/sqllab/query.js +++ b/superset/assets/cypress/integration/sqllab/query.js @@ -26,7 +26,7 @@ export default () => { cy.wait('@sqlLabQuery'); - cy.get('.SouthPane .ReactVirtualized__Table') + selectResultsTab() .eq(0) // ensures results tab in case preview tab exists .then((tableNodes) => { const [header, bodyWrapper] = tableNodes[0].childNodes; diff --git a/superset/assets/cypress/integration/sqllab/sqllab.helper.js b/superset/assets/cypress/integration/sqllab/sqllab.helper.js index 7c28b5f9ae..e366661748 100644 --- a/superset/assets/cypress/integration/sqllab/sqllab.helper.js +++ b/superset/assets/cypress/integration/sqllab/sqllab.helper.js @@ -1,4 +1,5 @@ -export const selectResultsTab = () => cy.get('.SouthPane .ReactVirtualized__Table'); +export const selectResultsTab = () => + cy.get('.SouthPane .ReactVirtualized__Table', { timeout: 10000 }); // this function asserts that the result set for two SQL lab table results are equal export const assertSQLLabResultsAreEqual = (resultsA, resultsB) => {