mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
Add support for period character in table names (#7453)
* Move schema name handling in table names from frontend to backend * Rename all_schema_names to get_all_schema_names * Fix js errors * Fix additional js linting errors * Refactor datasource getters and fix linting errors * Update js unit tests * Add python unit test for get_table_names method * Add python unit test for get_table_names method * Fix js linting error
This commit is contained in:
@@ -208,19 +208,20 @@ describe('TableSelector', () => {
|
||||
|
||||
it('test 1', () => {
|
||||
wrapper.instance().changeTable({
|
||||
value: 'birth_names',
|
||||
value: { schema: 'main', table: 'birth_names' },
|
||||
label: 'birth_names',
|
||||
});
|
||||
expect(wrapper.state().tableName).toBe('birth_names');
|
||||
});
|
||||
|
||||
it('test 2', () => {
|
||||
it('should call onTableChange with schema from table object', () => {
|
||||
wrapper.setProps({ schema: null });
|
||||
wrapper.instance().changeTable({
|
||||
value: 'main.my_table',
|
||||
label: 'my_table',
|
||||
value: { schema: 'other_schema', table: 'my_table' },
|
||||
label: 'other_schema.my_table',
|
||||
});
|
||||
expect(mockedProps.onTableChange.getCall(0).args[0]).toBe('my_table');
|
||||
expect(mockedProps.onTableChange.getCall(0).args[1]).toBe('main');
|
||||
expect(mockedProps.onTableChange.getCall(0).args[1]).toBe('other_schema');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user