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 03af055a27ace..a695541ceecd9 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 12fe43a165a4d..e267d76f6f7ed 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 60bf87ed1d349..92ad94bb7da69 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 1b225ec4b07d1..b632969c6b79d 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 29b3d16b1482f..460b2cc02b468 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 085ebb15876f9..4a65d68cf5883 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 f5b617393a3c7..6ae5d1e5d6fe9 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 52bc4cd60b321..2fc640e86165b 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 a072cf1207db2..686c9e7536c99 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 3269334e8c406..297702bce2507 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 91485ce19bcfb..2ab4966d57d08 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 34e6d2dc10b37..4251b6a7ae502 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 cd8ab210c622e..487b2c7f0e17a 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 ff6939e9afd85..ded53e64eedd9 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 323a8e7f4da7d..ac076a2200f26 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 5f457ff49ae42..4e9c84d6ea028 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 47e14755cb1b4..ffd6626132bb3 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 aeee9ba4997b1..9bc6eed224578 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 c94adcc2bd74a..a3260250aa47f 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 9e55d01c3c3f5..e78c328ec5104 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 deb829a092dca..e97ac74c3f2a2 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 1dca8f6e10460..8eb12a95b14f7 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 f38fdbd3a92d1..fd207a64e3124 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 448a676f67307..a10295af964fe 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 7c8cb855c78b7..cade5fab24ad3 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 f447780e2b2b6..faee1f6f4ee41 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 64d77b4d6854a..4e951c2560e15 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 b9844274e2d04..a4ca5ddcf2ef9 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 7a31d7cbb81f1..1e13c7d7ed3fb 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) => 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 a8af76a651b23..c95127dd1ebd5 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 5701ed81044ce..2882f6ab4af28 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 8ef01b7a4e679..d53436acd0317 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 d88ef7562726a..323dc5c24e410 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 9a0e4ca2b9ef2..f3a0dcd2d4eec 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 d319944b31744..136e48d5adec2 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 0a81ab78f7aee..770e1e1c04d38 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 6f0643cc8fc43..668e9c789f617 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 be9b26739b146..d31196b9564b7 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 023b3aeaa4249..e704705c6a572 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 76883ca87695a..ff8eaa629ff48 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 5a8576df2e6f8..ba197cf4cd543 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 7f55529a68ea1..5cc398c7f3ef7 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 77f502e172088..f853cf12848a8 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 dbf74472acddb..dfef462fc9e61 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 b0da5cd808a7b..e5139bee1c01b 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 a3e556d5909f8..03090db9c4ed8 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 b91df4a45f0d8..46030bfb35949 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 ef9863a56f8b8..5c8672192a8e5 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 9b7ea9819022a..158aa7b39b15e 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 4afb5f54ff751..f92fbf58efcc0 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 00f4c1988c761..be455a4a99b7f 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 f75a29bc886d7..f4db901bb64cf 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 31b4472516f31..fdbaefb158f1d 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 0f08593022a6d..34f8844d49a0c 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 603c490ebfc2e..124d72bddd006 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 e3909338ffc6a..456ca7ebc5c77 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[] = []; let CHART_FIXTURES: Record[] = []; @@ -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[]) => { 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[]) => { 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),