diff --git a/web/ui/react-app/src/components/withStartingIndicator.test.tsx b/web/ui/react-app/src/components/withStartingIndicator.test.tsx index ec4fd25f3..575115ba6 100644 --- a/web/ui/react-app/src/components/withStartingIndicator.test.tsx +++ b/web/ui/react-app/src/components/withStartingIndicator.test.tsx @@ -17,6 +17,17 @@ describe('Starting', () => { expect(progress).toHaveLength(0); }); + it('shows progress bar when max is not 0', () => { + const status: WALReplayData = { + min: 0, + max: 1, + current: 0, + }; + const starting = shallow(); + const progress = starting.find(Progress); + expect(progress).toHaveLength(1); + }); + it('renders progress correctly', () => { const status: WALReplayData = { min: 0, diff --git a/web/ui/react-app/src/components/withStartingIndicator.tsx b/web/ui/react-app/src/components/withStartingIndicator.tsx index a935913a0..8f15d854e 100644 --- a/web/ui/react-app/src/components/withStartingIndicator.tsx +++ b/web/ui/react-app/src/components/withStartingIndicator.tsx @@ -23,7 +23,7 @@ export const StartingContent: FC = ({ status, isUnexpected

Starting up...

- {status?.current! > status?.min! ? ( + {status?.max! > 0 ? (

Replaying WAL ({status?.current}/{status?.max})