mirror of
https://github.com/apache/superset.git
synced 2026-06-01 21:59:26 +00:00
fix(dataset-editor): add missing Data type label in calculated columns tab (#37165)
This commit is contained in:
@@ -328,6 +328,7 @@ function ColumnCollectionTable({
|
||||
control={
|
||||
<Select
|
||||
ariaLabel={t('Data type')}
|
||||
header={<FormLabel>{t('Data type')}</FormLabel>}
|
||||
options={DATA_TYPES}
|
||||
name="type"
|
||||
allowNewOptions
|
||||
|
||||
@@ -221,6 +221,27 @@ test('can add new columns', async () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('renders Data type label in calculated columns tab', async () => {
|
||||
const testProps = createProps();
|
||||
await asyncRender({
|
||||
...testProps,
|
||||
datasource: { ...testProps.datasource, table_name: 'Vehicle Sales +' },
|
||||
});
|
||||
|
||||
const calcColsTab = screen.getByTestId('collection-tab-Calculated columns');
|
||||
await userEvent.click(calcColsTab);
|
||||
|
||||
const calcColsPanel = within(
|
||||
await screen.findByRole('tabpanel', { name: /calculated columns/i }),
|
||||
);
|
||||
|
||||
const addBtn = calcColsPanel.getByRole('button', { name: /add item/i });
|
||||
await userEvent.click(addBtn);
|
||||
|
||||
const dataTypeLabels = await calcColsPanel.findAllByText('Data type');
|
||||
expect(dataTypeLabels.length).toBeGreaterThanOrEqual(2);
|
||||
});
|
||||
|
||||
test('renders isSqla fields', async () => {
|
||||
const testProps = createProps();
|
||||
await asyncRender({
|
||||
|
||||
Reference in New Issue
Block a user