From b99482dfb1ed831a08e3382f1563109042f37ea9 Mon Sep 17 00:00:00 2001 From: Cody Leff Date: Thu, 30 Jun 2022 16:30:32 -0600 Subject: [PATCH] Try making skipped Cypress test less flaky and un-skip. (#20568) --- .../cypress/integration/explore/control.test.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/superset-frontend/cypress-base/cypress/integration/explore/control.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/control.test.ts index 95bdd514bf..55721500ac 100644 --- a/superset-frontend/cypress-base/cypress/integration/explore/control.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/explore/control.test.ts @@ -127,10 +127,16 @@ describe('Test datatable', () => { cy.get('[data-test="row-count-label"]').contains('26 rows'); cy.get('.ant-empty-description').should('not.exist'); }); - it.skip('Datapane loads view samples', () => { - cy.contains('Samples').click(); - cy.get('[data-test="row-count-label"]').contains('1k rows'); - cy.get('.ant-empty-description').should('not.exist'); + it('Datapane loads view samples', () => { + cy.intercept('/api/v1/dataset/*/samples?force=false').as('Samples'); + cy.contains('Samples') + .click() + .then(() => { + cy.wait('@Samples'); + cy.get('.ant-tabs-tab-active').contains('Samples'); + cy.get('[data-test="row-count-label"]').contains('1k rows'); + cy.get('.ant-empty-description').should('not.exist'); + }); }); });