You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2022/04/22 20:57:32 UTC

[superset] branch master updated: fix: Cypress tests reliability improvements (#19800)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 3f0413b8cb fix: Cypress tests reliability improvements (#19800)
3f0413b8cb is described below

commit 3f0413b8cbf54bac94ea52dd9d49f07f835e6f0a
Author: Diego Medina <di...@gmail.com>
AuthorDate: Fri Apr 22 16:57:25 2022 -0400

    fix: Cypress tests reliability improvements (#19800)
---
 .../cypress/integration/chart_list/list_view.test.ts     | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts b/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts
index 6da5d90106..42313d7849 100644
--- a/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts
@@ -21,11 +21,12 @@ import { CHART_LIST } from './chart_list.helper';
 describe('chart list view', () => {
   beforeEach(() => {
     cy.login();
-    cy.visit(CHART_LIST);
-    cy.get('[aria-label="list-view"]').click();
   });
 
   it('should load rows', () => {
+    cy.visit(CHART_LIST);
+    cy.get('[aria-label="list-view"]').click();
+
     cy.get('[data-test="listview-table"]').should('be.visible');
     // check chart list view header
     cy.get('[data-test="sort-header"]').eq(1).contains('Chart');
@@ -49,6 +50,17 @@ describe('chart list view', () => {
   });
 
   it('should bulk delete correctly', () => {
+    // Load the chart list order by name asc.
+    // This will ensure the tests stay consistent, and the
+    // same charts get deleted every time
+    cy.visit(CHART_LIST, {
+      qs: {
+        sortColumn: 'slice_name',
+        sortOrder: 'asc',
+      },
+    });
+    cy.get('[aria-label="list-view"]').click();
+
     cy.get('[data-test="listview-table"]').should('be.visible');
     cy.get('[data-test="bulk-select"]').eq(0).click();
     cy.get('[aria-label="checkbox-off"]').eq(1).siblings('input').click();