You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by co...@apache.org on 2023/01/25 00:55:38 UTC

[superset] branch master updated: chore(tests): Streamline Cypress login to fix fails/flakes (#22844)

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

codyml 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 3898368f26 chore(tests): Streamline Cypress login to fix fails/flakes (#22844)
3898368f26 is described below

commit 3898368f2613c71f06a9bbe4935e2b30e1d6c929
Author: Cody Leff <co...@preset.io>
AuthorDate: Tue Jan 24 17:55:31 2023 -0700

    chore(tests): Streamline Cypress login to fix fails/flakes (#22844)
---
 .../integration/alerts_and_reports/alerts.test.ts  |  4 ---
 .../integration/alerts_and_reports/reports.test.ts |  4 ---
 .../chart_list/chartlist.applitools.test.ts        |  1 -
 .../cypress/integration/chart_list/filter.test.ts  |  1 -
 .../cypress/integration/chart_list/list.test.ts    |  4 ---
 .../integration/dashboard/_skip.controls.test.ts   |  1 -
 .../integration/dashboard/_skip.filter.test.ts     |  1 -
 .../integration/dashboard/_skip.key_value.test.ts  |  3 --
 .../integration/dashboard/_skip.url_params.test.ts |  2 --
 .../dashboard/dashboard.applitools.test.ts         |  1 -
 .../integration/dashboard/drilltodetail.test.ts    |  1 -
 .../cypress/integration/dashboard/editmode.test.ts |  4 ---
 .../cypress/integration/dashboard/load.test.ts     |  8 -----
 .../integration/dashboard/nativeFilters.test.ts    | 12 -------
 .../cypress/integration/dashboard/tabs.test.ts     |  1 -
 .../dashboardlist.applitools.test.ts               |  1 -
 .../integration/dashboard_list/filter.test.ts      |  1 -
 .../integration/dashboard_list/list.test.ts        |  4 ---
 .../cypress/integration/database/modal.test.ts     |  1 -
 .../integration/dataset/dataset_list.test.ts       |  4 ---
 .../integration/explore/AdhocMetrics.test.ts       |  1 -
 .../integration/explore/_skip.AdhocFilters.test.ts |  1 -
 .../integration/explore/advanced_analytics.test.ts |  1 -
 .../integration/explore/annotations.test.ts        |  1 -
 .../cypress/integration/explore/chart.test.js      |  2 --
 .../cypress/integration/explore/control.test.ts    |  9 -----
 .../integration/explore/explore.applitools.test.ts |  1 -
 .../cypress/integration/explore/filter_box.test.js |  1 -
 .../cypress/integration/explore/link.test.ts       |  1 -
 .../explore/visualizations/area.test.js            |  1 -
 .../explore/visualizations/big_number.test.js      |  1 -
 .../visualizations/big_number_total.test.js        |  1 -
 .../explore/visualizations/box_plot.test.js        |  1 -
 .../explore/visualizations/bubble.test.js          |  1 -
 .../explore/visualizations/compare.test.js         |  1 -
 .../explore/visualizations/dist_bar.test.js        |  1 -
 .../explore/visualizations/download_chart.test.js  |  1 -
 .../explore/visualizations/dual_line.test.js       |  1 -
 .../explore/visualizations/gauge.test.js           |  1 -
 .../explore/visualizations/graph.test.ts           |  1 -
 .../explore/visualizations/histogram.test.ts       |  1 -
 .../explore/visualizations/line.test.ts            |  1 -
 .../integration/explore/visualizations/pie.test.js |  1 -
 .../explore/visualizations/pivot_table.test.js     |  1 -
 .../explore/visualizations/sankey.test.js          |  1 -
 .../explore/visualizations/sunburst.test.js        |  1 -
 .../explore/visualizations/table.test.ts           |  1 -
 .../explore/visualizations/time_table.js           |  1 -
 .../explore/visualizations/treemap.test.js         |  1 -
 .../explore/visualizations/world_map.test.js       |  1 -
 .../sqllab/_skip.sourcePanel.index.test.js         |  1 -
 .../cypress/integration/sqllab/query.test.ts       |  1 -
 .../integration/sqllab/sqllab.applitools.test.ts   |  1 -
 .../cypress/integration/sqllab/tabs.test.ts        |  1 -
 .../cypress-base/cypress/support/index.d.ts        |  1 -
 .../cypress-base/cypress/support/index.ts          | 39 ++++++----------------
 56 files changed, 10 insertions(+), 132 deletions(-)

diff --git a/superset-frontend/cypress-base/cypress/integration/alerts_and_reports/alerts.test.ts b/superset-frontend/cypress-base/cypress/integration/alerts_and_reports/alerts.test.ts
index 03af055a27..a695541cee 100644
--- a/superset-frontend/cypress-base/cypress/integration/alerts_and_reports/alerts.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/alerts_and_reports/alerts.test.ts
@@ -23,10 +23,6 @@ describe('Alert list view', () => {
     cy.visit(ALERT_LIST);
   });
 
-  beforeEach(() => {
-    cy.preserveLogin();
-  });
-
   it('should load alert lists', () => {
     cy.getBySel('listview-table').should('be.visible');
     cy.getBySel('sort-header').eq(1).contains('Last run');
diff --git a/superset-frontend/cypress-base/cypress/integration/alerts_and_reports/reports.test.ts b/superset-frontend/cypress-base/cypress/integration/alerts_and_reports/reports.test.ts
index 12fe43a165..e267d76f6f 100644
--- a/superset-frontend/cypress-base/cypress/integration/alerts_and_reports/reports.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/alerts_and_reports/reports.test.ts
@@ -23,10 +23,6 @@ describe('Report list view', () => {
     cy.visit(REPORT_LIST);
   });
 
-  beforeEach(() => {
-    cy.preserveLogin();
-  });
-
   it('should load report lists', () => {
     cy.getBySel('listview-table').should('be.visible');
     cy.getBySel('sort-header').eq(1).contains('Last run');
diff --git a/superset-frontend/cypress-base/cypress/integration/chart_list/chartlist.applitools.test.ts b/superset-frontend/cypress-base/cypress/integration/chart_list/chartlist.applitools.test.ts
index 60bf87ed1d..92ad94bb7d 100644
--- a/superset-frontend/cypress-base/cypress/integration/chart_list/chartlist.applitools.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/chart_list/chartlist.applitools.test.ts
@@ -20,7 +20,6 @@ import { CHART_LIST } from 'cypress/utils/urls';
 
 describe('charts list view', () => {
   beforeEach(() => {
-    cy.login();
     cy.visit(CHART_LIST);
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/chart_list/filter.test.ts b/superset-frontend/cypress-base/cypress/integration/chart_list/filter.test.ts
index 1b225ec4b0..b632969c6b 100644
--- a/superset-frontend/cypress-base/cypress/integration/chart_list/filter.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/chart_list/filter.test.ts
@@ -26,7 +26,6 @@ describe('Charts filters', () => {
   });
 
   beforeEach(() => {
-    cy.preserveLogin();
     clearAllInputs();
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/chart_list/list.test.ts b/superset-frontend/cypress-base/cypress/integration/chart_list/list.test.ts
index 29b3d16b14..460b2cc02b 100644
--- a/superset-frontend/cypress-base/cypress/integration/chart_list/list.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/chart_list/list.test.ts
@@ -54,10 +54,6 @@ function visitChartList() {
 }
 
 describe('Charts list', () => {
-  beforeEach(() => {
-    cy.preserveLogin();
-  });
-
   describe.skip('Cross-referenced dashboards', () => {
     beforeEach(() => {
       cy.createSampleDashboards([0, 1, 2, 3]);
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.controls.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.controls.test.ts
index 085ebb1587..4a65d68cf5 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.controls.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.controls.test.ts
@@ -27,7 +27,6 @@ import { isLegacyResponse } from '../../utils/vizPlugins';
 
 describe.skip('Dashboard top-level controls', () => {
   beforeEach(() => {
-    cy.login();
     cy.visit(WORLD_HEALTH_DASHBOARD);
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.filter.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.filter.test.ts
index f5b617393a..6ae5d1e5d6 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.filter.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.filter.test.ts
@@ -27,7 +27,6 @@ import { WORLD_HEALTH_CHARTS } from './utils';
 
 describe.skip('Dashboard filter', () => {
   before(() => {
-    cy.login();
     cy.visit(WORLD_HEALTH_DASHBOARD);
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.key_value.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.key_value.test.ts
index 52bc4cd60b..2fc640e861 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.key_value.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.key_value.test.ts
@@ -27,9 +27,6 @@ interface QueryString {
 
 describe.skip('nativefilter url param key', () => {
   // const urlParams = { param1: '123', param2: 'abc' };
-  before(() => {
-    cy.login();
-  });
 
   let initialFilterKey: string;
   it('should have cachekey in nativefilter param', () => {
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.url_params.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.url_params.test.ts
index a072cf1207..686c9e7536 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.url_params.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/_skip.url_params.test.ts
@@ -23,8 +23,6 @@ import { WORLD_HEALTH_CHARTS } from './utils';
 describe.skip('Dashboard form data', () => {
   const urlParams = { param1: '123', param2: 'abc' };
   before(() => {
-    cy.login();
-
     cy.visit(WORLD_HEALTH_DASHBOARD, { qs: urlParams });
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.applitools.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.applitools.test.ts
index 3269334e8c..297702bce2 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.applitools.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.applitools.test.ts
@@ -22,7 +22,6 @@ import { WORLD_HEALTH_CHARTS } from './utils';
 
 describe('Dashboard load', () => {
   beforeEach(() => {
-    cy.login();
     cy.visit(WORLD_HEALTH_DASHBOARD);
     WORLD_HEALTH_CHARTS.forEach(waitForChartLoad);
   });
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/drilltodetail.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/drilltodetail.test.ts
index 91485ce19b..2ab4966d57 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/drilltodetail.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/drilltodetail.test.ts
@@ -133,7 +133,6 @@ function testTimeChart(vizType: string) {
 
 describe('Drill to detail modal', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     closeModal();
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/editmode.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/editmode.test.ts
index 34e6d2dc10..4251b6a7ae 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/editmode.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/editmode.test.ts
@@ -182,10 +182,6 @@ function openExplore(chartName: string) {
 }
 
 describe('Dashboard edit', () => {
-  beforeEach(() => {
-    cy.preserveLogin();
-  });
-
   describe('Color consistency', () => {
     beforeEach(() => {
       visitResetTabbedDashboard();
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/load.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/load.test.ts
index cd8ab210c6..487b2c7f0e 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/load.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/load.test.ts
@@ -21,14 +21,6 @@ import { waitForChartLoad } from 'cypress/utils';
 import { WORLD_HEALTH_CHARTS, interceptLog } from './utils';
 
 describe('Dashboard load', () => {
-  before(() => {
-    cy.login();
-  });
-
-  beforeEach(() => {
-    cy.preserveLogin();
-  });
-
   it('should load dashboard', () => {
     cy.visit(WORLD_HEALTH_DASHBOARD);
     WORLD_HEALTH_CHARTS.forEach(waitForChartLoad);
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts
index ff6939e9af..ded53e64ee 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts
@@ -234,14 +234,6 @@ function openMoreFilters(intercetFilterState = true) {
 }
 
 describe('Horizontal FilterBar', () => {
-  before(() => {
-    cy.login();
-  });
-
-  beforeEach(() => {
-    cy.preserveLogin();
-  });
-
   it('should go from vertical to horizontal and the opposite', () => {
     visitDashboard();
     openVerticalFilterBar();
@@ -412,10 +404,6 @@ describe('Horizontal FilterBar', () => {
 });
 
 describe('Native filters', () => {
-  beforeEach(() => {
-    cy.preserveLogin();
-  });
-
   describe('Nativefilters tests initial state required', () => {
     beforeEach(() => {
       cy.createSampleDashboards([0]);
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/tabs.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/tabs.test.ts
index 323a8e7f4d..ac076a2200 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/tabs.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/tabs.test.ts
@@ -53,7 +53,6 @@ describe('Dashboard tabs', () => {
   });
 
   beforeEach(() => {
-    cy.preserveLogin();
     resetTabs();
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard_list/dashboardlist.applitools.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard_list/dashboardlist.applitools.test.ts
index 5f457ff49a..4e9c84d6ea 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard_list/dashboardlist.applitools.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard_list/dashboardlist.applitools.test.ts
@@ -20,7 +20,6 @@ import { DASHBOARD_LIST } from 'cypress/utils/urls';
 
 describe('dashboard list view', () => {
   beforeEach(() => {
-    cy.login();
     cy.visit(DASHBOARD_LIST);
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard_list/filter.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard_list/filter.test.ts
index 47e14755cb..ffd6626132 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard_list/filter.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard_list/filter.test.ts
@@ -26,7 +26,6 @@ describe('Dashboards filters', () => {
   });
 
   beforeEach(() => {
-    cy.preserveLogin();
     clearAllInputs();
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard_list/list.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard_list/list.test.ts
index aeee9ba499..9bc6eed224 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard_list/list.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard_list/list.test.ts
@@ -46,10 +46,6 @@ function confirmDelete() {
 }
 
 describe('Dashboards list', () => {
-  beforeEach(() => {
-    cy.preserveLogin();
-  });
-
   describe('list mode', () => {
     before(() => {
       cy.visit(DASHBOARD_LIST);
diff --git a/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts b/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts
index c94adcc2bd..a3260250aa 100644
--- a/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts
@@ -32,7 +32,6 @@ describe('Add database', () => {
   });
 
   beforeEach(() => {
-    cy.preserveLogin();
     closeModal();
     cy.getBySel('btn-create-database').click();
   });
diff --git a/superset-frontend/cypress-base/cypress/integration/dataset/dataset_list.test.ts b/superset-frontend/cypress-base/cypress/integration/dataset/dataset_list.test.ts
index 9e55d01c3c..e78c328ec5 100644
--- a/superset-frontend/cypress-base/cypress/integration/dataset/dataset_list.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dataset/dataset_list.test.ts
@@ -24,10 +24,6 @@ describe('Dataset list', () => {
     cy.visit(DATASET_LIST_PATH);
   });
 
-  beforeEach(() => {
-    cy.preserveLogin();
-  });
-
   it('should open Explore on dataset name click', () => {
     cy.intercept('**/api/v1/explore/**').as('explore');
     cy.get('[data-test="listview-table"] [data-test="internal-link"]')
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/AdhocMetrics.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/AdhocMetrics.test.ts
index deb829a092..e97ac74c3f 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/AdhocMetrics.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/AdhocMetrics.test.ts
@@ -18,7 +18,6 @@
  */
 describe('AdhocMetrics', () => {
   beforeEach(() => {
-    cy.login();
     cy.intercept('POST', '/superset/explore_json/**').as('postJson');
     cy.intercept('GET', '/superset/explore_json/**').as('getJson');
     cy.visitChartByName('Num Births Trend');
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/_skip.AdhocFilters.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/_skip.AdhocFilters.test.ts
index 1dca8f6e10..8eb12a95b1 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/_skip.AdhocFilters.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/_skip.AdhocFilters.test.ts
@@ -18,7 +18,6 @@
  */
 describe.skip('AdhocFilters', () => {
   beforeEach(() => {
-    cy.login();
     cy.intercept('GET', '/superset/filter/table/*/name').as('filterValues');
     cy.intercept('POST', '/superset/explore_json/**').as('postJson');
     cy.intercept('GET', '/superset/explore_json/**').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/advanced_analytics.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/advanced_analytics.test.ts
index f38fdbd3a9..fd207a64e3 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/advanced_analytics.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/advanced_analytics.test.ts
@@ -18,7 +18,6 @@
  */
 describe('Advanced analytics', () => {
   beforeEach(() => {
-    cy.login();
     cy.intercept('POST', '/superset/explore_json/**').as('postJson');
     cy.intercept('GET', '/superset/explore_json/**').as('getJson');
     cy.intercept('PUT', '/api/v1/explore/**').as('putExplore');
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/annotations.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/annotations.test.ts
index 448a676f67..a10295af96 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/annotations.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/annotations.test.ts
@@ -18,7 +18,6 @@
  */
 describe('Annotations', () => {
   beforeEach(() => {
-    cy.login();
     cy.intercept('POST', '/superset/explore_json/**').as('postJson');
     cy.intercept('GET', '/superset/explore_json/**').as('getJson');
   });
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/chart.test.js b/superset-frontend/cypress-base/cypress/integration/explore/chart.test.js
index 7c8cb855c7..cade5fab24 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/chart.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/chart.test.js
@@ -92,7 +92,6 @@ describe('Cross-referenced dashboards', () => {
   beforeEach(() => {
     interceptFiltering();
 
-    cy.preserveLogin();
     cy.createSampleDashboards(SAMPLE_DASHBOARDS_INDEXES);
     cy.createSampleCharts([0]);
     cy.visit(CHART_LIST);
@@ -125,7 +124,6 @@ describe('Cross-referenced dashboards', () => {
 
 describe('No Results', () => {
   beforeEach(() => {
-    cy.login();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
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 f447780e2b..faee1f6f4e 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/control.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/control.test.ts
@@ -23,10 +23,6 @@ import { interceptChart } from 'cypress/utils';
 import { FORM_DATA_DEFAULTS, NUM_METRIC } from './visualizations/shared.helper';
 
 describe('Datasource control', () => {
-  beforeEach(() => {
-    cy.preserveLogin();
-  });
-
   const newMetricName = `abc${Date.now()}`;
 
   it('should allow edit dataset', () => {
@@ -89,7 +85,6 @@ describe('Datasource control', () => {
 
 describe('Color scheme control', () => {
   beforeEach(() => {
-    cy.login();
     interceptChart({ legacy: true }).as('chartData');
 
     cy.visitChartByName('Num Births Trend');
@@ -120,7 +115,6 @@ describe('Color scheme control', () => {
 });
 describe('VizType control', () => {
   beforeEach(() => {
-    cy.login();
     interceptChart({ legacy: false }).as('tableChartData');
     interceptChart({ legacy: true }).as('lineChartData');
   });
@@ -147,7 +141,6 @@ describe('VizType control', () => {
 
 describe('Test datatable', () => {
   beforeEach(() => {
-    cy.login();
     interceptChart({ legacy: false }).as('tableChartData');
     interceptChart({ legacy: true }).as('lineChartData');
     cy.visitChartByName('Daily Totals');
@@ -174,7 +167,6 @@ describe('Test datatable', () => {
 
 describe('Time range filter', () => {
   beforeEach(() => {
-    cy.login();
     interceptChart({ legacy: true }).as('chartData');
   });
 
@@ -288,7 +280,6 @@ describe('Time range filter', () => {
 
 describe('Groupby control', () => {
   it('Set groupby', () => {
-    cy.login();
     interceptChart({ legacy: true }).as('chartData');
 
     cy.visitChartByName('Num Births Trend');
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/explore.applitools.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/explore.applitools.test.ts
index 64d77b4d68..4e951c2560 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/explore.applitools.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/explore.applitools.test.ts
@@ -20,7 +20,6 @@ import { FORM_DATA_DEFAULTS, NUM_METRIC } from './visualizations/shared.helper';
 
 describe('explore view', () => {
   beforeEach(() => {
-    cy.login();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/filter_box.test.js b/superset-frontend/cypress-base/cypress/integration/explore/filter_box.test.js
index b9844274e2..a4ca5ddcf2 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/filter_box.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/filter_box.test.js
@@ -27,7 +27,6 @@ describe('Edit FilterBox Chart', () => {
   }
 
   beforeEach(() => {
-    cy.login();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/link.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/link.test.ts
index 7a31d7cbb8..1e13c7d7ed 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/link.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/link.test.ts
@@ -30,7 +30,6 @@ const apiURL = (endpoint: string, queryObject: Record<string, unknown>) =>
 
 describe('Test explore links', () => {
   beforeEach(() => {
-    cy.login();
     interceptChart({ legacy: true }).as('chartData');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/area.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/area.test.js
index a8af76a651..c95127dd1e 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/area.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/area.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > Area', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/big_number.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/big_number.test.js
index 5701ed8104..2882f6ab4a 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/big_number.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/big_number.test.js
@@ -20,7 +20,6 @@ import { interceptChart } from 'cypress/utils';
 
 describe('Visualization > Big Number with Trendline', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     interceptChart({ legacy: false }).as('chartData');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/big_number_total.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/big_number_total.test.js
index 8ef01b7a4e..d53436acd0 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/big_number_total.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/big_number_total.test.js
@@ -21,7 +21,6 @@ import { FORM_DATA_DEFAULTS, NUM_METRIC } from './shared.helper';
 
 describe('Visualization > Big Number Total', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     interceptChart({ legacy: false }).as('chartData');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/box_plot.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/box_plot.test.js
index d88ef75627..323dc5c24e 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/box_plot.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/box_plot.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > Box Plot', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/api/v1/chart/data*').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/bubble.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/bubble.test.js
index 9a0e4ca2b9..f3a0dcd2d4 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/bubble.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/bubble.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > Bubble', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/compare.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/compare.test.js
index d319944b31..136e48d5ad 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/compare.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/compare.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > Compare', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/dist_bar.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/dist_bar.test.js
index 0a81ab78f7..770e1e1c04 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/dist_bar.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/dist_bar.test.js
@@ -20,7 +20,6 @@ import { FORM_DATA_DEFAULTS, NUM_METRIC } from './shared.helper';
 
 describe('Visualization > Distribution bar chart', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/download_chart.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/download_chart.test.js
index 6f0643cc8f..668e9c789f 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/download_chart.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/download_chart.test.js
@@ -22,7 +22,6 @@ describe('Download Chart > Distribution bar chart', () => {
   const VIZ_DEFAULTS = { ...FORM_DATA_DEFAULTS, viz_type: 'dist_bar' };
 
   beforeEach(() => {
-    cy.login();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/dual_line.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/dual_line.test.js
index be9b26739b..d31196b956 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/dual_line.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/dual_line.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > Dual Line', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/gauge.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/gauge.test.js
index 023b3aeaa4..e704705c6a 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/gauge.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/gauge.test.js
@@ -19,7 +19,6 @@
 
 describe('Visualization > Gauge', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/api/v1/chart/data*').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/graph.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/graph.test.ts
index 76883ca876..ff8eaa629f 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/graph.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/graph.test.ts
@@ -28,7 +28,6 @@ type adhocFilter = {
 
 describe('Visualization > Graph', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/api/v1/chart/data*').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/histogram.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/histogram.test.ts
index 5a8576df2e..ba197cf4cd 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/histogram.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/histogram.test.ts
@@ -20,7 +20,6 @@ import { QueryFormData } from '@superset-ui/core';
 
 describe('Visualization > Histogram', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/line.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/line.test.ts
index 7f55529a68..5cc398c7f3 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/line.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/line.test.ts
@@ -20,7 +20,6 @@ import { FORM_DATA_DEFAULTS, NUM_METRIC, SIMPLE_FILTER } from './shared.helper';
 
 describe('Visualization > Line', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/pie.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/pie.test.js
index 77f502e172..f853cf1284 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/pie.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/pie.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > Pie', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/api/v1/chart/data*').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/pivot_table.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/pivot_table.test.js
index dbf74472ac..dfef462fc9 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/pivot_table.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/pivot_table.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > Pivot Table', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/sankey.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/sankey.test.js
index b0da5cd808..e5139bee1c 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/sankey.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/sankey.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > Sankey', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/sunburst.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/sunburst.test.js
index a3e556d590..03090db9c4 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/sunburst.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/sunburst.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > Sunburst', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/table.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/table.test.ts
index b91df4a45f..46030bfb35 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/table.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/table.test.ts
@@ -28,7 +28,6 @@ import {
 // Table
 describe('Visualization > Table', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     interceptChart({ legacy: false }).as('chartData');
   });
 
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 ef9863a56f..5c8672192a 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
@@ -20,7 +20,6 @@ import { FORM_DATA_DEFAULTS, NUM_METRIC } from './shared.helper';
 
 describe('Visualization > Time TableViz', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/treemap.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/treemap.test.js
index 9b7ea98190..158aa7b39b 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/treemap.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/treemap.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > Treemap', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/world_map.test.js b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/world_map.test.js
index 4afb5f54ff..f92fbf58ef 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/world_map.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/world_map.test.js
@@ -18,7 +18,6 @@
  */
 describe('Visualization > World Map', () => {
   beforeEach(() => {
-    cy.preserveLogin();
     cy.intercept('POST', '/superset/explore_json/**').as('getJson');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/sqllab/_skip.sourcePanel.index.test.js b/superset-frontend/cypress-base/cypress/integration/sqllab/_skip.sourcePanel.index.test.js
index 00f4c1988c..be455a4a99 100644
--- a/superset-frontend/cypress-base/cypress/integration/sqllab/_skip.sourcePanel.index.test.js
+++ b/superset-frontend/cypress-base/cypress/integration/sqllab/_skip.sourcePanel.index.test.js
@@ -20,7 +20,6 @@ import { selectResultsTab } from './sqllab.helper';
 
 describe.skip('SqlLab datasource panel', () => {
   beforeEach(() => {
-    cy.login();
     cy.visit('/superset/sqllab');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/sqllab/query.test.ts b/superset-frontend/cypress-base/cypress/integration/sqllab/query.test.ts
index f75a29bc88..f4db901bb6 100644
--- a/superset-frontend/cypress-base/cypress/integration/sqllab/query.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/sqllab/query.test.ts
@@ -25,7 +25,6 @@ function parseClockStr(node: JQuery) {
 
 describe('SqlLab query panel', () => {
   beforeEach(() => {
-    cy.login();
     cy.visit('/superset/sqllab');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/sqllab/sqllab.applitools.test.ts b/superset-frontend/cypress-base/cypress/integration/sqllab/sqllab.applitools.test.ts
index 31b4472516..fdbaefb158 100644
--- a/superset-frontend/cypress-base/cypress/integration/sqllab/sqllab.applitools.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/sqllab/sqllab.applitools.test.ts
@@ -19,7 +19,6 @@
 
 describe('SqlLab view', () => {
   beforeEach(() => {
-    cy.login();
     cy.visit('/superset/sqllab');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/integration/sqllab/tabs.test.ts b/superset-frontend/cypress-base/cypress/integration/sqllab/tabs.test.ts
index 0f08593022..34f8844d49 100644
--- a/superset-frontend/cypress-base/cypress/integration/sqllab/tabs.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/sqllab/tabs.test.ts
@@ -18,7 +18,6 @@
  */
 describe('SqlLab query tabs', () => {
   beforeEach(() => {
-    cy.login();
     cy.visit('/superset/sqllab');
   });
 
diff --git a/superset-frontend/cypress-base/cypress/support/index.d.ts b/superset-frontend/cypress-base/cypress/support/index.d.ts
index 603c490ebf..124d72bddd 100644
--- a/superset-frontend/cypress-base/cypress/support/index.d.ts
+++ b/superset-frontend/cypress-base/cypress/support/index.d.ts
@@ -29,7 +29,6 @@ declare namespace Cypress {
      * Login test user.
      */
     login(): void;
-    preserveLogin(): void;
 
     /**
      *
diff --git a/superset-frontend/cypress-base/cypress/support/index.ts b/superset-frontend/cypress-base/cypress/support/index.ts
index e3909338ff..456ca7ebc5 100644
--- a/superset-frontend/cypress-base/cypress/support/index.ts
+++ b/superset-frontend/cypress-base/cypress/support/index.ts
@@ -22,7 +22,6 @@ import '@applitools/eyes-cypress/commands';
 require('cy-verify-downloads').addCustomCommand();
 
 const BASE_EXPLORE_URL = '/explore/?form_data=';
-const TokenName = Cypress.env('TOKEN_NAME');
 let DASHBOARD_FIXTURES: Record<string, any>[] = [];
 let CHART_FIXTURES: Record<string, any>[] = [];
 
@@ -40,6 +39,7 @@ Cypress.Commands.add('loadDashboardFixtures', () =>
 
 before(() => {
   cy.login();
+  Cypress.Cookies.defaults({ preserve: 'session' });
   cy.loadChartFixtures();
   cy.loadDashboardFixtures();
 });
@@ -50,7 +50,6 @@ beforeEach(() => {
 });
 
 Cypress.Commands.add('cleanDashboards', () => {
-  cy.login();
   cy.getDashboards().then((sampleDashboards?: Record<string, any>[]) => {
     const deletableDashboards = [];
     for (let i = 0; i < DASHBOARD_FIXTURES.length; i += 1) {
@@ -72,7 +71,6 @@ Cypress.Commands.add('cleanDashboards', () => {
             'access_token',
           )}`,
           'Content-Type': 'application/json',
-          Authorization: `Bearer ${TokenName}`,
           'X-CSRFToken': `${window.localStorage.getItem('access_token')}`,
           Referer: `${Cypress.config().baseUrl}/`,
         },
@@ -82,7 +80,6 @@ Cypress.Commands.add('cleanDashboards', () => {
 });
 
 Cypress.Commands.add('cleanCharts', () => {
-  cy.login();
   cy.getCharts().then((sampleCharts?: Record<string, any>[]) => {
     const deletableCharts = [];
     for (let i = 0; i < CHART_FIXTURES.length; i += 1) {
@@ -104,7 +101,6 @@ Cypress.Commands.add('cleanCharts', () => {
             'access_token',
           )}`,
           'Content-Type': 'application/json',
-          Authorization: `Bearer ${TokenName}`,
           'X-CSRFToken': `${window.localStorage.getItem('access_token')}`,
           Referer: `${Cypress.config().baseUrl}/`,
         },
@@ -144,10 +140,6 @@ Cypress.Commands.add('login', () => {
   });
 });
 
-Cypress.Commands.add('preserveLogin', () => {
-  Cypress.Cookies.preserveOnce('session');
-});
-
 Cypress.Commands.add('visitChartByName', name => {
   cy.request(`/chart/api/read?_flt_3_slice_name=${name}`).then(response => {
     cy.visit(`${BASE_EXPLORE_URL}{"slice_id": ${response.body.pks[0]}}`);
@@ -187,7 +179,6 @@ Cypress.Commands.add(
           Cookie: `csrf_access_token=${accessToken}`,
           'X-CSRFToken': accessToken,
         }),
-        ...(TokenName && { Authorization: `Bearer ${TokenName}` }),
         'Content-Type': 'application/json',
         Referer: `${Cypress.config().baseUrl}/`,
       },
@@ -258,7 +249,6 @@ Cypress.Commands.add('createSampleDashboards', (indexes?: number[]) =>
               'access_token',
             )}`,
             'Content-Type': 'application/json',
-            Authorization: `Bearer ${TokenName}`,
             'X-CSRFToken': `${window.localStorage.getItem('access_token')}`,
             Referer: `${Cypress.config().baseUrl}/`,
           },
@@ -282,7 +272,6 @@ Cypress.Commands.add('createSampleCharts', (indexes?: number[]) =>
               'access_token',
             )}`,
             'Content-Type': 'application/json',
-            Authorization: `Bearer ${TokenName}`,
             'X-CSRFToken': `${window.localStorage.getItem('access_token')}`,
             Referer: `${Cypress.config().baseUrl}/`,
           },
@@ -318,7 +307,6 @@ Cypress.Commands.add(
             'access_token',
           )}`,
           'Content-Type': 'application/json',
-          Authorization: `Bearer ${TokenName}`,
           'X-CSRFToken': `${window.localStorage.getItem('access_token')}`,
           Referer: `${Cypress.config().baseUrl}/`,
         },
@@ -326,18 +314,15 @@ Cypress.Commands.add(
       .then(resp => resp),
 );
 
-Cypress.Commands.add('getDashboards', () =>
-  cy
-    .request({
-      method: 'GET',
-      url: `api/v1/dashboard/`,
-      headers: {
-        'Content-Type': 'application/json',
-        Authorization: `Bearer ${TokenName}`,
-      },
-    })
-    .then(resp => resp.body.result),
-);
+Cypress.Commands.add('getDashboards', () => {
+  cy.request({
+    method: 'GET',
+    url: `api/v1/dashboard/`,
+    headers: {
+      'Content-Type': 'application/json',
+    },
+  }).then(resp => resp.body.result);
+});
 
 Cypress.Commands.add('getDashboard', (dashboardId: string | number) =>
   cy
@@ -346,7 +331,6 @@ Cypress.Commands.add('getDashboard', (dashboardId: string | number) =>
       url: `api/v1/dashboard/${dashboardId}`,
       headers: {
         'Content-Type': 'application/json',
-        Authorization: `Bearer ${TokenName}`,
       },
     })
     .then(resp => resp.body.result),
@@ -362,7 +346,6 @@ Cypress.Commands.add(
         body,
         headers: {
           'Content-Type': 'application/json',
-          Authorization: `Bearer ${TokenName}`,
         },
       })
       .then(resp => resp.body.result),
@@ -379,7 +362,6 @@ Cypress.Commands.add('deleteChart', (id: number, failOnStatusCode = false) =>
           'access_token',
         )}`,
         'Content-Type': 'application/json',
-        Authorization: `Bearer ${TokenName}`,
         'X-CSRFToken': `${window.localStorage.getItem('access_token')}`,
         Referer: `${Cypress.config().baseUrl}/`,
       },
@@ -394,7 +376,6 @@ Cypress.Commands.add('getCharts', () =>
       url: `api/v1/chart/`,
       headers: {
         'Content-Type': 'application/json',
-        Authorization: `Bearer ${TokenName}`,
       },
     })
     .then(resp => resp.body.result),