mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-28 07:58:31 +00:00
* fix(ui): #15214 open detailed logs for each runs * address comments
This commit is contained in:
parent
50dd74253a
commit
5b0d75bf3a
@ -259,6 +259,35 @@ describe('Test IngestionRecentRun component', () => {
|
||||
expect(await screen.findAllByText(/label.log-plural/)).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('should show additional details for clicked on non latest run', async () => {
|
||||
(getRunHistoryForPipeline as jest.Mock).mockResolvedValueOnce({
|
||||
data: [...executionRuns],
|
||||
paging: { total: 4 },
|
||||
});
|
||||
|
||||
await act(async () => {
|
||||
render(<IngestionRecentRuns ingestion={mockIngestion} />);
|
||||
});
|
||||
|
||||
const runs = await screen.findAllByTestId('pipeline-status');
|
||||
const partialSuccess = await screen.findByText(/Partial Success/);
|
||||
|
||||
expect(partialSuccess).toBeInTheDocument();
|
||||
expect(runs).toHaveLength(3);
|
||||
|
||||
await act(async () => {
|
||||
// click on last run
|
||||
fireEvent.click(runs[runs.length - 1]);
|
||||
});
|
||||
|
||||
expect(await findByRole(document.body, 'dialog')).toBeInTheDocument();
|
||||
|
||||
expect(await screen.findByText(/Source/)).toBeInTheDocument();
|
||||
|
||||
expect(await screen.findByText(/Sink/)).toBeInTheDocument();
|
||||
expect(await screen.findAllByText(/label.log-plural/)).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('should show stacktrace when click on logs', async () => {
|
||||
(getRunHistoryForPipeline as jest.Mock).mockResolvedValueOnce({
|
||||
data: [...executionRuns],
|
||||
|
||||
@ -158,6 +158,11 @@ export const IngestionRecentRuns: FunctionComponent<Props> = ({
|
||||
}
|
||||
}, [ingestion, ingestion.fullyQualifiedName]);
|
||||
|
||||
const handleRunStatusClick = (status: PipelineStatus) => {
|
||||
setExpandedKeys([]);
|
||||
setSelectedStatus(status);
|
||||
};
|
||||
|
||||
return (
|
||||
<Space className={classNames} size={2}>
|
||||
{loading ? (
|
||||
@ -175,7 +180,7 @@ export const IngestionRecentRuns: FunctionComponent<Props> = ({
|
||||
}
|
||||
data-testid="pipeline-status"
|
||||
key={i}
|
||||
onClick={() => setSelectedStatus(r)}>
|
||||
onClick={() => handleRunStatusClick(r)}>
|
||||
{startCase(r?.pipelineState)}
|
||||
</Tag>
|
||||
) : (
|
||||
@ -186,6 +191,7 @@ export const IngestionRecentRuns: FunctionComponent<Props> = ({
|
||||
}
|
||||
data-testid="pipeline-status"
|
||||
key={i}
|
||||
onClick={() => handleRunStatusClick(r)}
|
||||
/>
|
||||
);
|
||||
|
||||
@ -225,6 +231,7 @@ export const IngestionRecentRuns: FunctionComponent<Props> = ({
|
||||
|
||||
<Modal
|
||||
centered
|
||||
destroyOnClose
|
||||
closeIcon={<></>}
|
||||
maskClosable={false}
|
||||
okButtonProps={{ style: { display: 'none' } }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user