Skip to content

Commit

Permalink
Merge branch 'main' into feat-#15380
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachin-chaurasiya authored Dec 17, 2024
2 parents 05d0525 + c96c778 commit 8e79597
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 1 deletion.
Empty file.
2 changes: 2 additions & 0 deletions bootstrap/sql/migrations/native/1.6.2/mysql/schemaChanges.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- add timestamp index for test case result reindex performance
ALTER TABLE data_quality_data_time_series ADD INDEX `idx_timestamp_desc` (timestamp DESC);
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- add timestamp index for test case result reindex performance
CREATE INDEX idx_timestamp_desc ON data_quality_data_time_series (timestamp DESC);
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ import {
updateTestCaseIncidentById,
} from '../../../../rest/incidentManagerAPI';
import { getNameFromFQN } from '../../../../utils/CommonUtils';
import { getEntityName } from '../../../../utils/EntityUtils';
import {
getColumnNameFromEntityLink,
getEntityName,
} from '../../../../utils/EntityUtils';
import { getEntityFQN } from '../../../../utils/FeedUtils';
import { checkPermission } from '../../../../utils/PermissionsUtils';
import { getDecodedFqn } from '../../../../utils/StringsUtils';
Expand Down Expand Up @@ -76,6 +79,17 @@ const IncidentManagerPageHeader = ({
initialAssignees,
} = useActivityFeedProvider();

const columnName = useMemo(() => {
const isColumn = testCaseData?.entityLink.includes('::columns::');
if (isColumn) {
const name = getColumnNameFromEntityLink(testCaseData?.entityLink ?? '');

return name;
}

return null;
}, [testCaseData]);

const tableFqn = useMemo(
() => getEntityFQN(testCaseData?.entityLink ?? ''),
[testCaseData]
Expand Down Expand Up @@ -327,6 +341,17 @@ const IncidentManagerPageHeader = ({
</Typography.Text>
</>
)}
{columnName && (
<>
<Divider className="self-center m-x-sm" type="vertical" />
<Typography.Text className="self-center text-xs whitespace-nowrap">
<span className="text-grey-muted">{`${t('label.column')}: `}</span>
<span className="font-medium" data-testid="test-column-name">
{columnName}
</span>
</Typography.Text>
</>
)}
<Divider className="self-center m-x-sm" type="vertical" />
<Typography.Text className="self-center text-xs whitespace-nowrap">
<span className="text-grey-muted">{`${t('label.test-type')}: `}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ jest.mock('../../../../utils/CommonUtils', () => ({

jest.mock('../../../../utils/EntityUtils', () => ({
getEntityName: jest.fn().mockReturnValue('getEntityName'),
getColumnNameFromEntityLink: jest
.fn()
.mockReturnValue('getColumnNameFromEntityLink'),
}));

jest.mock('../../../../utils/FeedUtils', () => ({
Expand Down Expand Up @@ -270,5 +273,8 @@ describe('Incident Manager Page Header component', () => {
// Test Type
expect(screen.getByText('label.test-type:')).toBeInTheDocument();
expect(screen.getByText('getEntityName')).toBeInTheDocument();
// If Column is present
expect(screen.getByText('label.column:')).toBeInTheDocument();
expect(screen.getByText('getColumnNameFromEntityLink')).toBeInTheDocument();
});
});

0 comments on commit 8e79597

Please sign in to comment.