M5: roll Energy chart window for live auto-refresh (English label); render boolean config fields as switches
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user