fix(dataset-editor): add missing Data type label in calculated columns tab (#37165)

This commit is contained in:
Jean Massucatto
2026-01-23 02:57:16 -03:00
committed by GitHub
parent b1ad54220b
commit 04c5517206
2 changed files with 22 additions and 0 deletions

View File

@@ -328,6 +328,7 @@ function ColumnCollectionTable({
control={
<Select
ariaLabel={t('Data type')}
header={<FormLabel>{t('Data type')}</FormLabel>}
options={DATA_TYPES}
name="type"
allowNewOptions

View File

@@ -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({