fix(cua): retain busy-state typing for both settings rows
This commit is contained in:
1 parent
fdc14b5b84
commit
5e98e0e8f7
2 files changed
+3
-3
No files matched your search
@@ -31,13 +31,13 @@ export type PermissionPanelProps = PermissionProps & DefaultPresetProps & Persis
|
||||
|
||||
function DefaultPresetSetting(props: DefaultPresetProps) {
|
||||
const preset = props.useCuaDefaultPreset(value => value)
|
||||
return <ConfigurationSetting kind="default" setting={preset} t={props.t} busy={props.busy} save={props.setPtcDefault}
|
||||
return <ConfigurationSetting kind="default" setting={preset} t={props.t} busy={props.busy === true} save={props.setPtcDefault}
|
||||
configured={(preset.value?.selectedDefault ?? preset.value?.default) === 'ptc'} />
|
||||
}
|
||||
|
||||
function PersistentPtcSetting(props: PersistentPtcProps) {
|
||||
const runtime = props.useCuaPtcRuntime(value => value)
|
||||
return <ConfigurationSetting kind="persistent" setting={runtime} t={props.t} busy={props.busy} save={props.setPersistentPtc}
|
||||
return <ConfigurationSetting kind="persistent" setting={runtime} t={props.t} busy={props.busy === true} save={props.setPersistentPtc}
|
||||
configured={runtime.value?.executionMode === 'persistent-in-memory'} />
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ it('keeps content mounted and pauses observation while the bundle changes', () =
|
||||
f.publish({ ...observe(value), system: { value: value.system, busy: false, error: 'provider is reloading' }, busy: false })
|
||||
const view = render(<PermissionPanel {...f.props} busy />)
|
||||
const requirements = screen.getByRole('region', { name: en.title })
|
||||
expect(within(requirements).getAllByRole('group')).toHaveLength(3)
|
||||
expect(within(requirements).getAllByRole('group')).toHaveLength(4)
|
||||
expect(screen.queryByRole('alert')).toBeNull()
|
||||
expect(f.props.setActive).toHaveBeenLastCalledWith(false)
|
||||
expect(screen.getByRole('button', { name: en.request }).hasAttribute('disabled')).toBe(true)
|
||||
|
||||
Reference in new issue
Block a user