Skip to content

Commit

Permalink
Revert "Fix: close select dropdown when focus is shifted (#19764)" (#…
Browse files Browse the repository at this point in the history
…19838)

This reverts commit 7b49507.
  • Loading branch information
karanh37 authored Feb 17, 2025
1 parent 50f05f3 commit c1e895a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import {
import { CustomPropertyTypeByName } from '../../utils/customProperty';
import {
addMultiOwner,
dropdownVisibility,
removeOwner,
removeOwnersFromList,
} from '../../utils/entity';
Expand Down Expand Up @@ -220,14 +219,6 @@ entities.forEach((EntityClass) => {
);
});

test("Tags and Glossary Term dropdown shouldn't be visible on tab change", async ({
page,
}) => {
await dropdownVisibility(page, 'tags');
await page.getByRole('tablist').getByRole('tab').first().click();
await dropdownVisibility(page, 'glossary');
});

// Run only if entity has children
if (!isUndefined(entity.childrenTabId)) {
test('Tag Add, Update and Remove for child entities', async ({
Expand Down
18 changes: 0 additions & 18 deletions openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,24 +709,6 @@ export const removeGlossaryTermFromChildren = async ({
}
};

export const dropdownVisibility = async (page: Page, tagType: string) => {
await page
.getByTestId('entity-right-panel')
.getByTestId(`${tagType}-container`)
.getByTestId('add-tag')
.click();
await page.waitForSelector(
'.ant-select-dropdown [data-testid="saveAssociatedTag"]',
{ state: 'visible' }
);

await expect(page.getByTestId('saveAssociatedTag')).toBeVisible();

await page.getByTestId('activity_feed').click();

await expect(page.getByTestId('saveAssociatedTag')).not.toBeVisible();
};

export const upVote = async (page: Page, endPoint: string) => {
const patchRequest = page.waitForResponse(`/api/v1/${endPoint}/*/vote`);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ const AsyncSelectList: FC<AsyncSelectListProps & SelectProps> = ({
style={{ width: '100%' }}
tagRender={customTagRender}
onChange={handleChange}
onDropdownVisibleChange={(open) => !open && onCancel?.()}
onInputKeyDown={(event) => {
if (event.key === 'Backspace') {
return event.stopPropagation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
treeData={treeData}
treeExpandedKeys={isEmpty(searchOptions) ? undefined : expandedRowKeys}
onChange={handleChange}
onDropdownVisibleChange={(open) => !open && onCancel?.()}
onSearch={onSearch}
onTreeExpand={setExpandedRowKeys}
{...props}
Expand Down

0 comments on commit c1e895a

Please sign in to comment.