MINOR: supported search filter and only all show in case of all node value selected (#18136)

* supported search filter and only all show in case of all node value selected

* updated the playwright test as per the all selector

* fix playwright and unit test
This commit is contained in:
Ashish Gupta 2024-10-07 17:10:28 +05:30 committed by GitHub
parent 764b42f2e4
commit aa7b95a515
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View File

@ -105,7 +105,10 @@ test('Search Index Application', async ({ page }) => {
await page.click('[data-testid="configuration"]'); await page.click('[data-testid="configuration"]');
await page.fill('#root\\/batchSize', '0'); await page.fill('#root\\/batchSize', '0');
await page.getByTitle('chart').getByLabel('close').click(); await page.getByTestId('tree-select-widget').click();
// uncheck the entity
await page.getByRole('tree').getByTitle('Topic').click();
await page.click( await page.click(
'[data-testid="select-widget"] > .ant-select-selector > .ant-select-selection-item' '[data-testid="select-widget"] > .ant-select-selector > .ant-select-selection-item'

View File

@ -89,10 +89,10 @@ describe('Test TreeSelectWidget Component', () => {
userEvent.click(treeSelectInput); userEvent.click(treeSelectInput);
}); });
await waitForElement(() => screen.getAllByText('Table')); await waitForElement(() => screen.getByText('Table'));
await act(async () => { await act(async () => {
fireEvent.click(screen.getAllByText('Table')[1]); fireEvent.click(screen.getByText('Table'));
}); });
expect(mockOnChange).toHaveBeenCalledTimes(1); expect(mockOnChange).toHaveBeenCalledTimes(1);

View File

@ -49,7 +49,7 @@ const TreeSelectWidget: FC<WidgetProps> = ({
treeDefaultExpandAll treeDefaultExpandAll
data-testid="tree-select-widget" data-testid="tree-select-widget"
disabled={rest.disabled} disabled={rest.disabled}
filterTreeNode={false} showCheckedStrategy={TreeSelect.SHOW_PARENT}
style={{ style={{
width: '100%', width: '100%',
}} }}