Skip to content
13 changes: 13 additions & 0 deletions .github/playwright/impact-map.generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"playwright/e2e/Features/DataQuality/TestDefinitionSortAndSearch.spec.ts",
"playwright/e2e/Features/DataQuality/TestLibrary.spec.ts",
"playwright/e2e/Features/DescriptionSuggestion.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/EntityRenameConsolidation.spec.ts",
"playwright/e2e/Features/EntitySuggestions.spec.ts",
"playwright/e2e/Features/ExploreColumnsSortLabel.spec.ts",
Expand Down Expand Up @@ -1653,6 +1654,7 @@
"specs": [
"playwright/e2e/Features/DataAssetRulesDisabled.spec.ts",
"playwright/e2e/Features/DataAssetRulesEnabled.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/EntitySuggestions.spec.ts",
"playwright/e2e/Features/LandingPageWidgets/FollowingWidget.spec.ts",
"playwright/e2e/Features/RestoreEntityInheritedFields.spec.ts",
Expand Down Expand Up @@ -1955,6 +1957,7 @@
"playwright/e2e/Features/DataAssetRulesEnabled.spec.ts",
"playwright/e2e/Features/DescriptionSuggestion.spec.ts",
"playwright/e2e/Features/DomainFilterQueryFilter.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/EntitySuggestions.spec.ts",
"playwright/e2e/Features/ExploreFilterComposition.spec.ts",
"playwright/e2e/Features/Glossary/GlossaryAssets.spec.ts",
Expand Down Expand Up @@ -3221,6 +3224,7 @@
"playwright/e2e/Features/DomainIsolation/DomainTaskIsolation.spec.ts",
"playwright/e2e/Features/DomainNavFilter/PersistedDomainFilter.spec.ts",
"playwright/e2e/Features/DomainTierCertificationVoting.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/ExploreColumnsSortLabel.spec.ts",
"playwright/e2e/Features/ExploreSortOrderFilter.spec.ts",
"playwright/e2e/Features/FailedTestCaseSampleData.spec.ts",
Expand Down Expand Up @@ -3688,6 +3692,7 @@
"playwright/e2e/Features/DomainIsolation/DomainTaskIsolation.spec.ts",
"playwright/e2e/Features/DomainNavFilter/PersistedDomainFilter.spec.ts",
"playwright/e2e/Features/DomainTierCertificationVoting.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/EntityRenameConsolidation.spec.ts",
"playwright/e2e/Features/EntityRightCollapsablePanel.spec.ts",
"playwright/e2e/Features/EntitySuggestions.spec.ts",
Expand Down Expand Up @@ -4330,6 +4335,7 @@
"playwright/e2e/Features/DomainIsolation/DomainIncidentIsolation.spec.ts",
"playwright/e2e/Features/DomainIsolation/DomainListingIsolation.spec.ts",
"playwright/e2e/Features/DomainTierCertificationVoting.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/EntitySuggestions.spec.ts",
"playwright/e2e/Features/EntitySummaryPanel.spec.ts",
"playwright/e2e/Features/ExploreColumnsSortLabel.spec.ts",
Expand Down Expand Up @@ -7120,6 +7126,7 @@
"playwright/e2e/Features/DataQuality/FailureThreshold.spec.ts",
"playwright/e2e/Features/DataQuality/IncidentManagerSqlQuery.spec.ts",
"playwright/e2e/Features/DataQuality/TableLevelTests.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/OntologyReview.spec.ts",
"playwright/e2e/Features/QueryEntity.spec.ts",
"playwright/e2e/Pages/DataContracts.spec.ts"
Expand All @@ -7133,6 +7140,7 @@
"playwright/e2e/Features/DataQuality/FailureThreshold.spec.ts",
"playwright/e2e/Features/DataQuality/IncidentManagerSqlQuery.spec.ts",
"playwright/e2e/Features/DataQuality/TableLevelTests.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/OntologyReview.spec.ts",
"playwright/e2e/Features/QueryEntity.spec.ts",
"playwright/e2e/Pages/DataContracts.spec.ts"
Expand Down Expand Up @@ -7183,6 +7191,7 @@
"openmetadata-ui/src/main/resources/ui/src/components/Database/TableQueries/QueryCardExtraOption/QueryCardExtraOption.component.tsx"
],
"specs": [
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/Glossary/GlossaryP3Tests.spec.ts",
"playwright/e2e/Features/Glossary/GlossaryVoting.spec.ts",
"playwright/e2e/Features/Permission.spec.ts",
Expand Down Expand Up @@ -10345,6 +10354,7 @@
"openmetadata-ui/src/main/resources/ui/src/components/common/QueryViewer/QueryViewer.component.tsx"
],
"specs": [
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/Table.spec.ts"
]
},
Expand Down Expand Up @@ -13080,6 +13090,7 @@
"playwright/e2e/Features/DataProductPersonaCustomization.spec.ts",
"playwright/e2e/Features/DataQuality/TestCaseIncidentPermissions.spec.ts",
"playwright/e2e/Features/DomainIsolation/DomainLineageIsolation.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/EntitySuggestions.spec.ts",
"playwright/e2e/Features/Glossary/GlossaryPersonaCustomization.spec.ts",
"playwright/e2e/Features/ImpactAnalysis.spec.ts",
Expand Down Expand Up @@ -13281,6 +13292,7 @@
"playwright/e2e/Features/DomainIsolation/DomainTaskIsolation.spec.ts",
"playwright/e2e/Features/DomainNavFilter/PersistedDomainFilter.spec.ts",
"playwright/e2e/Features/DomainTierCertificationVoting.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/EntityRenameConsolidation.spec.ts",
"playwright/e2e/Features/EntityRightCollapsablePanel.spec.ts",
"playwright/e2e/Features/EntitySuggestions.spec.ts",
Expand Down Expand Up @@ -13653,6 +13665,7 @@
"playwright/e2e/Features/DomainIsolation/DomainTaskIsolation.spec.ts",
"playwright/e2e/Features/DomainNavFilter/PersistedDomainFilter.spec.ts",
"playwright/e2e/Features/DomainTierCertificationVoting.spec.ts",
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/EntityRenameConsolidation.spec.ts",
"playwright/e2e/Features/EntitySuggestions.spec.ts",
"playwright/e2e/Features/ExploreFilterComposition.spec.ts",
Expand Down
15 changes: 15 additions & 0 deletions .github/playwright/impact-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@
"openmetadata-ui/src/main/resources/ui/vite/**"
],
"mappings": [
{
"_comment": "QueryViewer renders the topic Config, search index Settings, table dbt and View Definition tabs and the incident SQL Query tab.",
"sources": [
"openmetadata-ui/src/main/resources/ui/src/components/common/QueryViewer/**",
"openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/**",
"openmetadata-ui/src/main/resources/ui/src/utils/SearchIndexUtils.tsx"
],
"projects": ["chromium"],
"specs": [
"playwright/e2e/Features/EntityConfigTabs.spec.ts",
"playwright/e2e/Features/Table.spec.ts",
"playwright/e2e/Features/Topic.spec.ts",
"playwright/e2e/Features/DataQuality/IncidentManagerSqlQuery.spec.ts"
]
},
{
"sources": [
"openmetadata-ui/src/main/resources/ui/playwright/e2e/search-rbac.setup.ts",
Expand Down
2 changes: 1 addition & 1 deletion .github/playwright/timing-baseline.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
/*
* Copyright 2026 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, Page, test } from '@playwright/test';
import { DOMAIN_TAGS } from '../../constant/config';
import { SearchIndexClass } from '../../support/entity/SearchIndexClass';
import { TopicClass } from '../../support/entity/TopicClass';
import { performAdminLogin } from '../../utils/admin';
import { redirectToHomePage } from '../../utils/common';
import { waitForAllLoadersToDisappear } from '../../utils/entity';

test.use({ storageState: 'playwright/.auth/admin.json' });

const TOPIC_CONFIG = {
'cleanup.policy': 'delete',
'retention.ms': '604800000',
'min.insync.replicas': '2',
};

const SEARCH_INDEX_SETTINGS = {
number_of_shards: 1,
analysis: { analyzer: { om_analyzer: { tokenizer: 'letter' } } },
};

const formattedLineCount = (value: object) =>
JSON.stringify(value, null, 2).split('\n').length;

const openTab = async (page: Page, tabId: string, tabName: string) => {
await page.getByTestId(tabId).click();
await waitForAllLoadersToDisappear(page);

return page.getByRole('tabpanel', { name: tabName });
};

test.describe(
'Entity config tabs',
{ tag: ['@Features', DOMAIN_TAGS.DISCOVERY] },
() => {
const topicWithConfig = new TopicClass();
const topicWithEmptyConfig = new TopicClass();
const searchIndexWithSettings = new SearchIndexClass();
const searchIndexWithoutSettings = new SearchIndexClass();

test.beforeAll('Create entities', async ({ browser }) => {
const { apiContext, afterAction } = await performAdminLogin(browser);

await Promise.all([
topicWithConfig.create(apiContext),
topicWithEmptyConfig.create(apiContext),
searchIndexWithSettings.create(apiContext),
searchIndexWithoutSettings.create(apiContext),
]);
await topicWithConfig.patch({
apiContext,
patchData: [{ op: 'add', path: '/topicConfig', value: TOPIC_CONFIG }],
});
await topicWithEmptyConfig.patch({
apiContext,
patchData: [{ op: 'add', path: '/topicConfig', value: {} }],
});
await searchIndexWithSettings.patch({
apiContext,
patchData: [
{
op: 'add',
path: '/searchIndexSettings',
value: SEARCH_INDEX_SETTINGS,
},
],
});

await afterAction();
});

test.afterAll('Delete entities', async ({ browser }) => {
const { apiContext, afterAction } = await performAdminLogin(browser);

await Promise.all([
topicWithConfig.delete(apiContext),
topicWithEmptyConfig.delete(apiContext),
searchIndexWithSettings.delete(apiContext),
searchIndexWithoutSettings.delete(apiContext),
]);

await afterAction();
});

test.beforeEach(async ({ page }) => {
await redirectToHomePage(page);
});

test('Topic config tab shows formatted config with its line count', async ({
page,
}) => {
await topicWithConfig.visitEntityPage(page);
const panel = await openTab(page, 'config', 'Config');

await expect(panel.getByTestId('query-line')).toHaveText(
`${formattedLineCount(TOPIC_CONFIG)} Lines`
);
await expect(panel.getByTestId('code-mirror-container')).toContainText(
'"cleanup.policy": "delete"'
);
await expect(panel.getByText('Config', { exact: true })).toHaveCount(0);
});

test('Topic config tab shows a placeholder when the topic config is empty', async ({
page,
}) => {
await topicWithEmptyConfig.visitEntityPage(page);
const panel = await openTab(page, 'config', 'Config');

await expect(panel.getByTestId('no-data-placeholder')).toBeVisible();
await expect(panel.getByTestId('query-line')).toHaveCount(0);
});

test('Search index settings tab shows formatted settings with its line count', async ({
page,
}) => {
await searchIndexWithSettings.visitEntityPage(page);
const panel = await openTab(
page,
'search-index-settings',
'Search Index Settings'
);

await expect(panel.getByTestId('query-line')).toHaveText(
`${formattedLineCount(SEARCH_INDEX_SETTINGS)} Lines`
);
await expect(panel.getByTestId('code-mirror-container')).toContainText(
'"tokenizer": "letter"'
);
await expect(
panel.getByText('Search Index Settings', { exact: true })
).toHaveCount(0);
});

test('Search index settings tab shows a placeholder when the index has no settings', async ({
page,
}) => {
await searchIndexWithoutSettings.visitEntityPage(page);
const panel = await openTab(
page,
'search-index-settings',
'Search Index Settings'
);

await expect(panel.getByTestId('no-data-placeholder')).toBeVisible();
await expect(panel.getByTestId('query-line')).toHaveCount(0);
});
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,11 @@ test.describe('dbt Tab Visibility for Seed Files', () => {
await expect(page.getByText('seeds/sample_seed.csv')).toBeVisible();

// Verify SQL-related elements are NOT visible since this is a seed file (no SQL query)
await expect(
page
.getByRole('tabpanel', { name: 'dbt' })
.getByTestId('no-data-placeholder')
).toBeVisible();
await expect(page.getByTestId('query-line')).not.toBeVisible();
await expect(
page.getByTestId('query-entity-copy-button')
Expand Down Expand Up @@ -979,6 +984,11 @@ test.describe('dbt Tab Visibility for Seed Files', () => {
);

// Verify SQL-related elements are NOT visible since this is a seed file (no SQL query)
await expect(
page
.getByRole('tabpanel', { name: 'dbt' })
.getByTestId('no-data-placeholder')
).toBeVisible();
await expect(page.getByTestId('query-line')).not.toBeVisible();
await expect(
page.getByTestId('query-entity-copy-button')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import { getPartialNameFromTableFQN } from '../../../utils/FqnUtils';
import { getDerivedPermissionFlags } from '../../../utils/PermissionDerivation';
import { getEntityDetailsPath } from '../../../utils/RouterUtils';
import { getJSONEditorValue } from '../../../utils/SchemaEditor.utils';
import { getTagsWithoutTier, getTierTags } from '../../../utils/TablePureUtils';
import {
createTagObject,
Expand Down Expand Up @@ -272,7 +273,7 @@
};
await onTopicUpdate(updatedTopicDetails, 'owners');
},
[owners]

Check warning on line 276 in openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/TopicDetails.component.tsx

View workflow job for this annotation

GitHub Actions / checkstyle

React Hook useCallback has missing dependencies: 'onTopicUpdate' and 'topicDetails'. Either include them or remove the dependency array. If 'onTopicUpdate' changes too often, find the parent component that defines it and wrap that definition in useCallback
);

const onTierUpdate = (newTier?: Tag) => {
Expand Down Expand Up @@ -340,7 +341,7 @@
getPartialNameFromTableFQN(decodedTopicFQN, [FqnPart.Service])
)
),
[decodedTopicFQN]

Check warning on line 344 in openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/TopicDetails.component.tsx

View workflow job for this annotation

GitHub Actions / checkstyle

React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array
);

// Consumer via prop (Task 8 rule 2): `topicPermissions` is the raw
Expand Down Expand Up @@ -383,7 +384,7 @@
useEffect(() => {
fetchTaskCounts();
fetchActivityCount();
}, [topicPermissions, decodedTopicFQN]);

Check warning on line 387 in openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/TopicDetails.component.tsx

View workflow job for this annotation

GitHub Actions / checkstyle

React Hook useEffect has missing dependencies: 'fetchActivityCount' and 'fetchTaskCounts'. Either include them or remove the dependency array

const tabs = useMemo(() => {
const tabLabelMap = getTabLabelMapFromTabs(customizedPage?.tabs);
Expand Down Expand Up @@ -422,8 +423,7 @@
queryViewerTab: (
<QueryViewer
isActive={activeTab === EntityTabs.CONFIG}
sqlQuery={JSON.stringify(topicDetails.topicConfig)}
title={t('label.config')}
sqlQuery={getJSONEditorValue(topicDetails.topicConfig)}
/>
),
lineageTab: (
Expand Down Expand Up @@ -452,7 +452,7 @@
customizedPage?.tabs,
EntityTabs.SCHEMA
);
}, [

Check warning on line 455 in openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/TopicDetails.component.tsx

View workflow job for this annotation

GitHub Actions / checkstyle

React Hook useMemo has missing dependencies: 'customizedPage?.tabs', 'feedCount', 'getEntityFeedCount', and 't'. Either include them or remove the dependency array
activeTab,
feedCount.totalCount,
topicTags,
Expand Down Expand Up @@ -499,7 +499,7 @@

const isExpandViewSupported = useMemo(
() => checkIfExpandViewSupported(tabs[0], activeTab, PageType.Topic),
[tabs[0], activeTab]

Check warning on line 502 in openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/TopicDetails.component.tsx

View workflow job for this annotation

GitHub Actions / checkstyle

React Hook useMemo has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked

Check warning on line 502 in openmetadata-ui/src/main/resources/ui/src/components/Topic/TopicDetails/TopicDetails.component.tsx

View workflow job for this annotation

GitHub Actions / checkstyle

React Hook useMemo has a missing dependency: 'tabs'. Either include it or remove the dependency array
);
if (isLoading) {
return <Loader />;
Expand Down
Loading
Loading