You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2023/08/03 23:03:35 UTC
[superset] 03/12: file-by-file unsafe-to-chain-command
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch bump_esilnt
in repository https://gitbox.apache.org/repos/asf/superset.git
commit ae37406f01dd27815db06f8ce31e6c0d05a9135a
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Tue Aug 1 18:31:40 2023 -0700
file-by-file unsafe-to-chain-command
---
superset-frontend/.eslintrc.js | 2 +-
superset-frontend/cypress-base/cypress/e2e/chart_list/list.test.ts | 2 ++
superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts | 1 +
.../cypress-base/cypress/e2e/dashboard/drilltodetail.test.ts | 2 ++
superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts | 3 ++-
superset-frontend/cypress-base/cypress/e2e/dashboard/tabs.test.ts | 2 ++
superset-frontend/cypress-base/cypress/e2e/dashboard/utils.ts | 2 ++
superset-frontend/cypress-base/cypress/e2e/dashboard_list/list.test.ts | 3 +++
.../cypress-base/cypress/e2e/explore/AdhocMetrics.test.ts | 2 ++
.../cypress-base/cypress/e2e/explore/_skip.AdhocFilters.test.ts | 2 ++
superset-frontend/cypress-base/cypress/e2e/explore/control.test.ts | 2 ++
superset-frontend/cypress-base/cypress/e2e/explore/link.test.ts | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/area.test.js | 3 +++
.../cypress-base/cypress/e2e/explore/visualizations/box_plot.test.js | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/bubble.test.js | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/compare.test.js | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/dist_bar.test.js | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/gauge.test.js | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/graph.test.ts | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/histogram.test.ts | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/line.test.ts | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/pie.test.js | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/sunburst.test.js | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/table.test.ts | 2 ++
.../cypress-base/cypress/e2e/explore/visualizations/world_map.test.js | 3 +++
superset-frontend/cypress-base/cypress/e2e/sqllab/query.test.ts | 2 ++
superset-frontend/cypress-base/cypress/utils/index.ts | 2 ++
27 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js
index 4aca8ea50a..1615fc738e 100644
--- a/superset-frontend/.eslintrc.js
+++ b/superset-frontend/.eslintrc.js
@@ -205,7 +205,7 @@ module.exports = {
'*.stories.tsx',
'*.stories.jsx',
'fixtures.*',
- 'cypress-base/cypress/**/*',
+ 'cypress-base/**/*',
'Stories.tsx',
'packages/superset-ui-core/src/style/index.tsx',
],
diff --git a/superset-frontend/cypress-base/cypress/e2e/chart_list/list.test.ts b/superset-frontend/cypress-base/cypress/e2e/chart_list/list.test.ts
index 6664281abe..d45538e999 100644
--- a/superset-frontend/cypress-base/cypress/e2e/chart_list/list.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/chart_list/list.test.ts
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
import { CHART_LIST } from 'cypress/utils/urls';
import { setGridMode, toggleBulkSelect } from 'cypress/utils';
import {
diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts
index 2f66ac5888..3c199eae72 100644
--- a/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
// eslint-disable-next-line import/no-extraneous-dependencies
import { Interception } from 'cypress/types/net-stubbing';
import { waitForChartLoad } from 'cypress/utils';
diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/drilltodetail.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/drilltodetail.test.ts
index ff1872333b..a948ffe386 100644
--- a/superset-frontend/cypress-base/cypress/e2e/dashboard/drilltodetail.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/drilltodetail.test.ts
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
import { waitForChartLoad } from 'cypress/utils';
import { SUPPORTED_CHARTS_DASHBOARD } from 'cypress/utils/urls';
import {
diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts
index 336d65b9fd..653268f982 100644
--- a/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts
@@ -25,7 +25,8 @@ import {
interceptFiltering as interceptCharts,
} from '../explore/utils';
-/* eslint-disable @typescript-eslint/no-explicit-any */
+// eslint-disable @typescript-eslint/no-explicit-any
+// eslint-disable cypress/unsafe-to-chain-command
function editDashboard() {
cy.getBySel('edit-dashboard-button').click();
diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/tabs.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/tabs.test.ts
index 6fc89c1446..624c60b09b 100644
--- a/superset-frontend/cypress-base/cypress/e2e/dashboard/tabs.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/tabs.test.ts
@@ -24,6 +24,8 @@ import {
import { TABBED_DASHBOARD } from 'cypress/utils/urls';
import { expandFilterOnLeftPanel } from './utils';
+// eslint-disable cypress/unsafe-to-chain-command
+
const TREEMAP = { name: 'Treemap', viz: 'treemap_v2' };
const FILTER_BOX = { name: 'Region Filter', viz: 'filter_box' };
const LINE_CHART = { name: 'Growth Rate', viz: 'line' };
diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/utils.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/utils.ts
index 00d3eda45e..dc29b9561a 100644
--- a/superset-frontend/cypress-base/cypress/e2e/dashboard/utils.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/utils.ts
@@ -20,6 +20,8 @@
import { dashboardView, nativeFilters } from 'cypress/support/directories';
import { ChartSpec, waitForChartLoad } from 'cypress/utils';
+// eslint-disable cypress/unsafe-to-chain-command
+
export const WORLD_HEALTH_CHARTS = [
{ name: '% Rural', viz: 'world_map' },
{ name: 'Most Populated Countries', viz: 'table' },
diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard_list/list.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard_list/list.test.ts
index 9bc6eed224..d7a4c62dcd 100644
--- a/superset-frontend/cypress-base/cypress/e2e/dashboard_list/list.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/dashboard_list/list.test.ts
@@ -16,6 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+// eslint-disable cypress/unsafe-to-chain-command
+
import { DASHBOARD_LIST } from 'cypress/utils/urls';
import { setGridMode, toggleBulkSelect } from 'cypress/utils';
import {
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/AdhocMetrics.test.ts b/superset-frontend/cypress-base/cypress/e2e/explore/AdhocMetrics.test.ts
index e97ac74c3f..ba61fe3018 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/AdhocMetrics.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/AdhocMetrics.test.ts
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('AdhocMetrics', () => {
beforeEach(() => {
cy.intercept('POST', '/superset/explore_json/**').as('postJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/_skip.AdhocFilters.test.ts b/superset-frontend/cypress-base/cypress/e2e/explore/_skip.AdhocFilters.test.ts
index a4e9c8fe46..94205cba0a 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/_skip.AdhocFilters.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/_skip.AdhocFilters.test.ts
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
describe.skip('AdhocFilters', () => {
beforeEach(() => {
cy.intercept('GET', '/api/v1/datasource/table/*/column/name/values').as(
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/control.test.ts b/superset-frontend/cypress-base/cypress/e2e/explore/control.test.ts
index faee1f6f4e..db163f7eb6 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/control.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/control.test.ts
@@ -22,6 +22,8 @@
import { interceptChart } from 'cypress/utils';
import { FORM_DATA_DEFAULTS, NUM_METRIC } from './visualizations/shared.helper';
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Datasource control', () => {
const newMetricName = `abc${Date.now()}`;
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/link.test.ts b/superset-frontend/cypress-base/cypress/e2e/explore/link.test.ts
index 1e13c7d7ed..a10fd44599 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/link.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/link.test.ts
@@ -25,6 +25,8 @@ import shortid from 'shortid';
import { interceptChart } from 'cypress/utils';
import { HEALTH_POP_FORM_DATA_DEFAULTS } from './visualizations/shared.helper';
+// eslint-disable cypress/unsafe-to-chain-command
+
const apiURL = (endpoint: string, queryObject: Record<string, unknown>) =>
`${endpoint}?q=${rison.encode(queryObject)}`;
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/area.test.js b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/area.test.js
index c95127dd1e..207ddb6ca5 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/area.test.js
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/area.test.js
@@ -16,6 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > Area', () => {
beforeEach(() => {
cy.intercept('POST', '/superset/explore_json/**').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/box_plot.test.js b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/box_plot.test.js
index 323dc5c24e..104246ab55 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/box_plot.test.js
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/box_plot.test.js
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > Box Plot', () => {
beforeEach(() => {
cy.intercept('POST', '/api/v1/chart/data*').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/bubble.test.js b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/bubble.test.js
index f3a0dcd2d4..030c324c46 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/bubble.test.js
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/bubble.test.js
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > Bubble', () => {
beforeEach(() => {
cy.intercept('POST', '/superset/explore_json/**').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/compare.test.js b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/compare.test.js
index 136e48d5ad..3fbcd9962d 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/compare.test.js
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/compare.test.js
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > Compare', () => {
beforeEach(() => {
cy.intercept('POST', '/superset/explore_json/**').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/dist_bar.test.js b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/dist_bar.test.js
index 770e1e1c04..896d8fc351 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/dist_bar.test.js
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/dist_bar.test.js
@@ -18,6 +18,8 @@
*/
import { FORM_DATA_DEFAULTS, NUM_METRIC } from './shared.helper';
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > Distribution bar chart', () => {
beforeEach(() => {
cy.intercept('POST', '/superset/explore_json/**').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/gauge.test.js b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/gauge.test.js
index e704705c6a..add2972e20 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/gauge.test.js
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/gauge.test.js
@@ -17,6 +17,8 @@
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > Gauge', () => {
beforeEach(() => {
cy.intercept('POST', '/api/v1/chart/data*').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/graph.test.ts b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/graph.test.ts
index ff8eaa629f..37b8e4f6b2 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/graph.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/graph.test.ts
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
type adhocFilter = {
expressionType: string;
subject: string;
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/histogram.test.ts b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/histogram.test.ts
index ba197cf4cd..05e2ca54be 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/histogram.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/histogram.test.ts
@@ -18,6 +18,8 @@
*/
import { QueryFormData } from '@superset-ui/core';
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > Histogram', () => {
beforeEach(() => {
cy.intercept('POST', '/superset/explore_json/**').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/line.test.ts b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/line.test.ts
index 5cc398c7f3..7e51f72028 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/line.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/line.test.ts
@@ -18,6 +18,8 @@
*/
import { FORM_DATA_DEFAULTS, NUM_METRIC, SIMPLE_FILTER } from './shared.helper';
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > Line', () => {
beforeEach(() => {
cy.intercept('POST', '/superset/explore_json/**').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/pie.test.js b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/pie.test.js
index f853cf1284..4afa666270 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/pie.test.js
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/pie.test.js
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > Pie', () => {
beforeEach(() => {
cy.intercept('POST', '/api/v1/chart/data*').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/sunburst.test.js b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/sunburst.test.js
index 03090db9c4..9f1ca495f9 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/sunburst.test.js
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/sunburst.test.js
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > Sunburst', () => {
beforeEach(() => {
cy.intercept('POST', '/superset/explore_json/**').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/table.test.ts b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/table.test.ts
index 7db1dbe8ef..58d45bec4f 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/table.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/table.test.ts
@@ -25,6 +25,8 @@ import {
SIMPLE_FILTER,
} from './shared.helper';
+// eslint-disable cypress/unsafe-to-chain-command
+
// Table
describe('Visualization > Table', () => {
beforeEach(() => {
diff --git a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/world_map.test.js b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/world_map.test.js
index f92fbf58ef..c9f5642753 100644
--- a/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/world_map.test.js
+++ b/superset-frontend/cypress-base/cypress/e2e/explore/visualizations/world_map.test.js
@@ -16,6 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+// eslint-disable cypress/unsafe-to-chain-command
+
describe('Visualization > World Map', () => {
beforeEach(() => {
cy.intercept('POST', '/superset/explore_json/**').as('getJson');
diff --git a/superset-frontend/cypress-base/cypress/e2e/sqllab/query.test.ts b/superset-frontend/cypress-base/cypress/e2e/sqllab/query.test.ts
index 0d36692b2a..b02ff93afd 100644
--- a/superset-frontend/cypress-base/cypress/e2e/sqllab/query.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/sqllab/query.test.ts
@@ -19,6 +19,8 @@
import * as shortid from 'shortid';
import { selectResultsTab, assertSQLLabResultsAreEqual } from './sqllab.helper';
+// eslint-disable cypress/unsafe-to-chain-command
+
function parseClockStr(node: JQuery) {
return Number.parseFloat(node.text().replace(/:/g, ''));
}
diff --git a/superset-frontend/cypress-base/cypress/utils/index.ts b/superset-frontend/cypress-base/cypress/utils/index.ts
index 8733955720..198db95055 100644
--- a/superset-frontend/cypress-base/cypress/utils/index.ts
+++ b/superset-frontend/cypress-base/cypress/utils/index.ts
@@ -18,6 +18,8 @@
*/
import { getChartAlias, Slice } from 'cypress/utils/vizPlugins';
+// eslint-disable cypress/unsafe-to-chain-command
+
export * from './vizPlugins';
export { default as parsePostForm } from './parsePostForm';
export interface ChartSpec {