M8-T18: add source and multi-commodity meter UI
This commit is contained in:
@@ -50,6 +50,9 @@ describe('DsmrPanel', () => {
|
||||
renderWithProviders(<DsmrPanel />)
|
||||
await waitFor(() => expect(screen.getByTestId('dsmr-empty')).toBeInTheDocument())
|
||||
expect(screen.queryByTestId('dsmr-table')).not.toBeInTheDocument()
|
||||
expect(screen.getByText(/In this DSMR Source, enable or edit the broker, topic, and profile/)).toBeInTheDocument()
|
||||
expect(screen.getByText(/confirm the publisher is sending/)).toBeInTheDocument()
|
||||
expect(screen.queryByText(/Enable DSMR ingest.*Config/)).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('renders the latest telegram as a key/value table; null shown as dash', async () => {
|
||||
@@ -79,4 +82,11 @@ describe('DsmrPanel', () => {
|
||||
renderWithProviders(<DsmrPanel />)
|
||||
await waitFor(() => expect(screen.getByTestId('dsmr-error')).toBeInTheDocument())
|
||||
})
|
||||
|
||||
it('keeps the compatibility endpoint available for DSMR source detail', async () => {
|
||||
mockGet.mockResolvedValue({ data: { found: true, recorded_at: '2026-06-23T12:16:00Z', payload: { tariff: 'low' } } })
|
||||
renderWithProviders(<DsmrPanel />)
|
||||
await waitFor(() => expect(mockGet).toHaveBeenCalledWith('/api/energy/dsmr/latest'))
|
||||
expect(await screen.findByText('Latest DSMR reading (compatibility view)')).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user