M5: roll Energy chart window for live auto-refresh (English label); render boolean config fields as switches

This commit is contained in:
2026-06-22 19:40:18 +02:00
parent 935e68846c
commit 75d685f04d
10 changed files with 468 additions and 30 deletions
+2 -2
View File
@@ -371,7 +371,7 @@ describe('EnergyPage — auto-refresh switch', () => {
// Mantine Switch uses role="switch" and places data-testid directly on the
// <input> element; query it by the testid or by role.
const switchInput = screen.getByRole('switch', { name: /自动刷新/i })
const switchInput = screen.getByRole('switch', { name: /auto-refresh/i })
expect(switchInput).toBeChecked()
})
@@ -382,7 +382,7 @@ describe('EnergyPage — auto-refresh switch', () => {
expect(screen.getByTestId('auto-refresh-switch')).toBeInTheDocument()
})
const switchInput = screen.getByRole('switch', { name: /自动刷新/i })
const switchInput = screen.getByRole('switch', { name: /auto-refresh/i })
expect(switchInput).toBeChecked()
fireEvent.click(switchInput)