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 03af055a27ac..a695541ceecd 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 12fe43a165a4..e267d76f6f7e 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 60bf87ed1d34..92ad94bb7da6 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 1b225ec4b07d..b632969c6b79 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 29b3d16b1482..460b2cc02b46 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 085ebb15876f..4a65d68cf588 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 f5b617393a3c..6ae5d1e5d6fe 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 52bc4cd60b32..2fc640e86165 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 a072cf1207db..686c9e7536c9 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 3269334e8c40..297702bce250 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 91485ce19bcf..2ab4966d57d0 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 34e6d2dc10b3..4251b6a7ae50 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 cd8ab210c622..487b2c7f0e17 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 ff6939e9afd8..ded53e64eedd 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 323a8e7f4da7..ac076a2200f2 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 5f457ff49ae4..4e9c84d6ea02 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 47e14755cb1b..ffd6626132bb 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 aeee9ba4997b..9bc6eed22457 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 c94adcc2bd74..a3260250aa47 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 9e55d01c3c3f..e78c328ec510 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 deb829a092dc..e97ac74c3f2a 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 1dca8f6e1046..8eb12a95b14f 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 f38fdbd3a92d..fd207a64e312 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 448a676f6730..a10295af964f 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 7c8cb855c78b..cade5fab24ad 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 f447780e2b2b..faee1f6f4ee4 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 64d77b4d6854..4e951c2560e1 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 b9844274e2d0..a4ca5ddcf2ef 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 7a31d7cbb81f..1e13c7d7ed3f 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 a8af76a651b2..c95127dd1ebd 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 5701ed81044c..2882f6ab4af2 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 8ef01b7a4e67..d53436acd031 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 d88ef7562726..323dc5c24e41 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 9a0e4ca2b9ef..f3a0dcd2d4ee 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 d319944b3174..136e48d5adec 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 0a81ab78f7ae..770e1e1c04d3 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 6f0643cc8fc4..668e9c789f61 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 be9b26739b14..d31196b9564b 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 023b3aeaa424..e704705c6a57 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 76883ca87695..ff8eaa629ff4 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 5a8576df2e6f..ba197cf4cd54 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 7f55529a68ea..5cc398c7f3ef 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 77f502e17208..f853cf12848a 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 dbf74472acdd..dfef462fc9e6 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 b0da5cd808a7..e5139bee1c01 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 a3e556d5909f..03090db9c4ed 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 b91df4a45f0d..46030bfb3594 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 ef9863a56f8b..5c8672192a8e 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 9b7ea9819022..158aa7b39b15 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 4afb5f54ff75..f92fbf58efcc 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 00f4c1988c76..be455a4a99b7 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 f75a29bc886d..f4db901bb64c 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 31b4472516f3..fdbaefb158f1 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 0f08593022a6..34f8844d49a0 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 603c490ebfc2..124d72bddd00 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 e3909338ffc6..456ca7ebc5c7 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),