This is an automated email from the ASF dual-hosted git repository.
yjc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 16d36a7 fix(cypress): table viz failed to run in postgres12 (#11230)
16d36a7 is described below
commit 16d36a776c317b0b564829caaef1432ded131336
Author: Yongjie Zhao <[email protected]>
AuthorDate: Mon Oct 12 02:28:13 2020 +0800
fix(cypress): table viz failed to run in postgres12 (#11230)
---
.../explore/visualizations/shared.helper.js | 22 +++++-----------------
.../explore/visualizations/table.test.ts | 4 ++--
2 files changed, 7 insertions(+), 19 deletions(-)
diff --git
a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/shared.helper.js
b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/shared.helper.js
index 4d4eafd..f2a0968 100644
---
a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/shared.helper.js
+++
b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/shared.helper.js
@@ -87,25 +87,13 @@ export const MAX_DS = {
};
export const MAX_STATE = {
- expressionType: 'SIMPLE',
- column: {
- id: 337,
- column_name: 'state',
- verbose_name: null,
- description: null,
- expression: null,
- filterable: true,
- groupby: true,
- is_dttm: false,
- type: 'VARCHAR(10)',
- python_date_format: null,
- optionName: '_col_state',
- },
- aggregate: 'MAX',
- sqlExpression: null,
+ expressionType: 'SQL',
+ sqlExpression: 'MAX(UPPER(state))',
+ column: null,
+ aggregate: null,
isNew: false,
hasCustomLabel: false,
- label: 'MAX(state)',
+ label: 'MAX(UPPER(state))',
optionName: 'metric_kvval50pvbo_hewj3pzacb',
};
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 77f9c6f..a1daa9e 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
@@ -66,7 +66,7 @@ describe('Visualization > Table', () => {
cy.get('.chart-container td:nth-child(1)').contains('2008 Q1');
// other column with timestamp use raw timestamp
cy.get('.chart-container td:nth-child(3)').contains('2008-01-01T00:00:00');
- cy.get('.chart-container td:nth-child(4)').contains('other');
+ cy.get('.chart-container td:nth-child(4)').contains('TX');
});
it('Format with table_timestamp_format', () => {
@@ -87,7 +87,7 @@ describe('Visualization > Table', () => {
// time column should not use time granularity when timestamp format is set
cy.get('.chart-container td').contains('2008 Q1').should('not.exist');
// other num numeric metric column should stay as string
- cy.get('.chart-container td').contains('other');
+ cy.get('.chart-container td').contains('TX');
});
it('Test table with groupby', () => {