geido commented on code in PR #21551:
URL: https://github.com/apache/superset/pull/21551#discussion_r983645002
##########
superset-frontend/cypress-base/cypress/integration/dashboard/drilltodetail.test.ts:
##########
@@ -58,220 +58,243 @@ function closeModal() {
});
}
+function setTopLevelTab(tabName: string) {
+ cy.get("div#TABS-TOP div[role='tab']").contains(tabName).click();
+}
+
describe('Drill to detail modal', () => {
before(() => {
- cy.visit(ECHARTS_DASHBOARD);
- ECHARTS_CHARTS.forEach(waitForChartLoad);
+ cy.visit(SUPPORTED_CHARTS_DASHBOARD);
});
beforeEach(() => {
cy.preserveLogin();
- closeModal();
});
- describe('Modal actions', () => {
- it('opens the modal from the context menu', () => {
- openModalFromMenu('big_number_total');
-
- cy.get("[role='dialog'] .draggable-trigger").should(
- 'contain',
- 'Drill to detail: Number of Girls',
- );
- });
-
- it('refreshes the data', () => {
- openModalFromMenu('big_number_total');
- // move to the last page
- cy.get(".pagination-container [role='navigation'] [role='button']")
- .eq(7)
- .click();
- cy.wait('@samples');
- // reload
- cy.get("[aria-label='reload']").click();
- cy.wait('@samples');
- // make sure it started back from first page
- cy.get(".pagination-container [role='navigation'] li.active").should(
- 'contain',
- '1',
- );
- });
+ afterEach(() => {
Review Comment:
We should not rely on the afterEach as the test might never finish. Any
clean up work should go in the beforeEach
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]