fix(cypress): table viz failed to run in postgres12 (#11230)

This commit is contained in:
Yongjie Zhao 2020-10-12 02:28:13 +08:00 committed by GitHub
parent fa9963519e
commit 16d36a776c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 19 deletions

View File

@ -87,25 +87,13 @@ export const MAX_DS = {
}; };
export const MAX_STATE = { export const MAX_STATE = {
expressionType: 'SIMPLE', expressionType: 'SQL',
column: { sqlExpression: 'MAX(UPPER(state))',
id: 337, column: null,
column_name: 'state', aggregate: null,
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,
isNew: false, isNew: false,
hasCustomLabel: false, hasCustomLabel: false,
label: 'MAX(state)', label: 'MAX(UPPER(state))',
optionName: 'metric_kvval50pvbo_hewj3pzacb', optionName: 'metric_kvval50pvbo_hewj3pzacb',
}; };

View File

@ -66,7 +66,7 @@ describe('Visualization > Table', () => {
cy.get('.chart-container td:nth-child(1)').contains('2008 Q1'); cy.get('.chart-container td:nth-child(1)').contains('2008 Q1');
// other column with timestamp use raw timestamp // 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(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', () => { 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 // time column should not use time granularity when timestamp format is set
cy.get('.chart-container td').contains('2008 Q1').should('not.exist'); cy.get('.chart-container td').contains('2008 Q1').should('not.exist');
// other num numeric metric column should stay as string // 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', () => { it('Test table with groupby', () => {