diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts index 91c3549c238..087cd133b66 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts @@ -23,6 +23,7 @@ import { EntityTypeEndpoint, ENTITY_PATH, } from '../../support/entity/Entity.interface'; +import { EntityDataClass } from '../../support/entity/EntityDataClass'; import { TableClass } from '../../support/entity/TableClass'; import { Glossary } from '../../support/glossary/Glossary'; import { GlossaryTerm } from '../../support/glossary/GlossaryTerm'; @@ -1453,14 +1454,14 @@ test.describe('Domain Access with noDomain() Rule', () => { }); test.describe('Domain Tree View Functionality', () => { - const domain = new Domain(); let subDomain: SubDomain; + const domain = EntityDataClass.domain1; + const domainDisplayName = domain.responseData.displayName; test.beforeAll('Setup pre-requests', async ({ browser }) => { test.slow(true); const { apiContext, afterAction } = await performAdminLogin(browser); - await domain.create(apiContext); subDomain = new SubDomain(domain); await subDomain.create(apiContext); await afterAction(); @@ -1471,7 +1472,6 @@ test.describe('Domain Tree View Functionality', () => { const { apiContext, afterAction } = await performAdminLogin(browser); await subDomain.delete(apiContext); - await domain.delete(apiContext); await afterAction(); }); @@ -1488,15 +1488,33 @@ test.describe('Domain Tree View Functionality', () => { await page.waitForLoadState('networkidle'); await waitForAllLoadersToDisappear(page); + await page + .getByTestId('page-layout-v1') + .getByRole('textbox', { name: 'Search' }) + .clear(); + + const searchDomain = page.waitForResponse( + `/api/v1/search/query?q=*${encodeURIComponent(domainDisplayName)}*` + ); + await page + .getByTestId('page-layout-v1') + .getByRole('textbox', { name: 'Search' }) + .fill(domainDisplayName); + await searchDomain; + await page.waitForLoadState('networkidle'); + await waitForAllLoadersToDisappear(page); + await expect( page - .getByRole('treeitem', { name: domain.data.displayName }) + .getByRole('treeitem', { + name: domainDisplayName, + }) .locator('div') .nth(2) ).toBeVisible(); await page - .getByRole('treeitem', { name: domain.data.displayName }) + .getByRole('treeitem', { name: domainDisplayName }) .locator('div') .nth(2) .click(); @@ -1510,14 +1528,14 @@ test.describe('Domain Tree View Functionality', () => { await expect( page .getByRole('listitem') - .filter({ hasText: domain.data.fullyQualifiedName }) + .filter({ hasText: domain.responseData.fullyQualifiedName }) .getByTestId('breadcrumb-link') ).toBeVisible(); await expect(page.getByTestId('entity-header-display-name')).toContainText( - domain.data.displayName + domainDisplayName ); await expect(page.getByTestId('entity-header-name')).toContainText( - domain.data.name + domain.responseData.name ); await expect( page.getByTestId('documentation').getByText('Documentation') @@ -1538,19 +1556,10 @@ test.describe('Domain Tree View Functionality', () => { await expect( page .getByTestId('asset-description-container') - .getByText(domain.data.description) + .getByText(domain.responseData.description) ).toBeVisible(); await expect(page.getByTestId('domain-details-add-button')).toBeVisible(); - await page.getByTestId('data_products').getByText('Data Products').click(); - await page.waitForLoadState('networkidle'); - await waitForAllLoadersToDisappear(page); - - await expect( - page.getByTestId('no-data-placeholder').getByRole('paragraph') - ).toContainText("Looks like you haven't added any data products yet."); - await expect(page.getByTestId('data-product-add-button')).toBeVisible(); - await expect( page.getByTestId('subdomains').getByTestId('count') ).toContainText('1'); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx index 111e61937aa..aa15e29f8d0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx @@ -86,12 +86,14 @@ export const ActivityFeedTab = ({ subTab, layoutType, feedCount, + urlFqn = '', }: ActivityFeedTabProps) => { const navigate = useNavigate(); const { t } = useTranslation(); const { currentUser } = useApplicationStore(); const { isAdminUser } = useAuth(); - const { fqn } = useFqn(); + const { fqn: hookFqn } = useFqn(); + const fqn = hookFqn || urlFqn || ''; const [elementRef, isInView] = useElementInView({ ...observerOptions, root: document.querySelector('#center-container'), diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface.ts index 6fc112433ee..b590a9c8cdd 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface.ts @@ -40,6 +40,7 @@ export interface ActivityFeedTabBasicProps { subTab?: ActivityFeedTabs; layoutType?: ActivityFeedLayoutType; feedCount?: FeedCounts; + urlFqn?: string; } export type ActivityFeedTabProps = ActivityFeedTabBasicProps & diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DomainListing/components/DomainTreeView.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DomainListing/components/DomainTreeView.tsx index 881b80ba748..24135709851 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DomainListing/components/DomainTreeView.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DomainListing/components/DomainTreeView.tsx @@ -696,6 +696,12 @@ const DomainTreeView = ({ const handleNavigate = useCallback( (path: string) => { + if (path.includes('/versions/')) { + navigate(path); + + return; + } + const regex = /^\/domain\/([^/]+)(?:\/([^/]+))?/; const match = regex.exec(path); if (match) { diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/DomainUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/DomainUtils.tsx index 69e33375a9f..7f34f03d506 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/DomainUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/DomainUtils.tsx @@ -487,6 +487,7 @@ export const getDomainDetailTabs = ({ feedCount={feedCount} layoutType={ActivityFeedLayoutType.THREE_PANEL} owners={domain.owners} + urlFqn={domain.fullyQualifiedName} onFeedUpdate={onFeedUpdate ?? noop} onUpdateEntityDetails={noop} />