Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function makeBuild(
images_removed: 0,
images_changed: 3,
images_unchanged: 19,
images_skipped: 0,
},
...overrides,
};
Expand Down Expand Up @@ -117,6 +118,7 @@ describe('PreprodBuildsSnapshotTable', () => {
images_removed: 0,
images_changed: 3,
images_unchanged: 19,
images_skipped: 0,
},
})
),
Expand All @@ -137,6 +139,7 @@ describe('PreprodBuildsSnapshotTable', () => {
images_removed: 0,
images_changed: 0,
images_unchanged: 0,
images_skipped: 0,
},
})
),
Expand Down Expand Up @@ -168,6 +171,7 @@ describe('PreprodBuildsSnapshotTable', () => {
images_removed: 0,
images_changed: 0,
images_unchanged: 20,
images_skipped: 0,
},
})
),
Expand Down
8 changes: 7 additions & 1 deletion static/app/components/preprod/preprodBuildsSnapshotTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,20 @@ function ChangeCounts({
removed,
changed,
unchanged,
skipped,
comparisonState,
}: {
added: number;
changed: number;
comparisonState: SnapshotComparisonState | null | undefined;
removed: number;
skipped: number;
unchanged: number;
}) {
if (comparisonState !== 'success') {
return <Text variant="muted">{'–'}</Text>;
}
if (added === 0 && removed === 0 && changed === 0) {
if (added === 0 && removed === 0 && changed === 0 && skipped === 0) {
return (
<Text size="sm" variant="muted">
{t('No changes')}
Expand All @@ -62,6 +64,9 @@ function ChangeCounts({
if (unchanged > 0) {
parts.push(t('%s unchanged', unchanged));
}
if (skipped > 0) {
parts.push(t('%s skipped', skipped));
}
return (
<Text size="sm" variant="muted">
{parts.join(', ')}
Expand Down Expand Up @@ -113,6 +118,7 @@ export function PreprodBuildsSnapshotTable({
removed={info?.images_removed ?? 0}
changed={info?.images_changed ?? 0}
unchanged={info?.images_unchanged ?? 0}
skipped={info?.images_skipped ?? 0}
comparisonState={info?.comparison_state}
/>
</SimpleTable.RowCell>
Expand Down
1 change: 1 addition & 0 deletions static/app/views/preprod/types/buildDetailsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,5 +211,6 @@ interface SnapshotComparisonInfo {
images_added: number;
images_changed: number;
images_removed: number;
images_skipped: number;
images_unchanged: number;
}
Loading