Skip to content

Commit

Permalink
fix dev test, simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Nov 28, 2024
1 parent fb32416 commit 1c680bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
9 changes: 1 addition & 8 deletions src/components/page-scheduled-batch/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { ScheduledBatchSummary } from '../../store/radix-api';

const testData: Array<
Parameters<typeof PageScheduledBatch>[0] & {
batchData?: ScheduledBatchSummary;
batchData: ScheduledBatchSummary;
}
> = [
{
Expand Down Expand Up @@ -131,12 +131,6 @@ const testData: Array<
],
},
},
{
appName: 'empty-app',
envName: 'empty-env',
jobComponentName: 'empty-component',
scheduledBatchName: 'no-btch',
},
];

// Mock API response
Expand All @@ -146,7 +140,6 @@ new Server({
testData.forEach(({ scheduledBatchName, batchData }) => {
this.get(
`/api/v1/applications/:appName/environments/:envName/jobcomponents/:jobComponentName/batches/${scheduledBatchName}`,
// @ts-expect-error no idea why batchdata fails
() => batchData
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ const ScheduledBatchDuration = ({ started, finished }: Props) => {
);
};

type ScheduledBatchStateProps = Pick<ScheduledBatchSummary, 'status'>;
const ScheduledBatchState = ({ status }: ScheduledBatchStateProps) => (
<>{status && <ProgressStatusBadge status={status} />}</>
);

type ScheduledBatchOverviewProps = {
batch: ScheduledBatchSummary;
jobComponentName: string;
Expand All @@ -70,7 +65,7 @@ export const ScheduledBatchOverview = ({
</Typography>
{batch.status && (
<Typography className="status-title">
Batch status <ScheduledBatchState status={batch.status} />
Batch status <ProgressStatusBadge status={batch.status} />
</Typography>
)}
<Typography className="status-title">
Expand Down

0 comments on commit 1c680bf

Please sign in to comment.