import { mockRobot } from '../../robot-api/__fixtures__' ; import type { RobotSettings } from '../types' ; import type { RobotApiResponse , RobotApiResponseMeta , } from '../../robot-api/types' ; export const mockRobotSettings = [ { id : 'foo' , title : 'Foo' , description : 'foobar' , value : true } , { id : 'bar' , title : 'Bar' , description : 'bazqux' , value : false } , ] ; export const mockFetchSettingsSuccessMeta = { method : 'GET' , path : '/settings' , ok : true , status : 200 , } ; export const mockFetchSettingsSuccess = { ... mockFetchSettingsSuccessMeta , host : mockRobot , body : { settings : mockRobotSettings , links : { restart : '/restart' } , } , } ; export const mockFetchSettingsFailureMeta = { method : 'GET' , path : '/settings' , ok : false , status : 500 , } ; export const mockFetchSettingsFailure = { ... mockFetchSettingsFailureMeta , host : mockRobot , body : { message : 'AH' } , } ; export const mockUpdateSettingSuccessMeta = { method : 'POST' , path : '/settings' , ok : true , status : 200 , } ; export const mockUpdateSettingSuccess = { ... mockUpdateSettingSuccessMeta , host : mockRobot , body : { settings : mockRobotSettings , links : { restart : '/restart' } , } , } ; export const mockUpdateSettingFailureMeta = { method : 'POST' , path : '/settings' , ok : false , status : 500 , } ; export const mockUpdateSettingFailure = { ... mockUpdateSettingFailureMeta , host : mockRobot , body : { message : 'AH' } , } ;