diff --git a/packages/openapi/src/__tests__/showstyles.spec.ts b/packages/openapi/src/__tests__/showstyles.spec.ts index d510848272..c4a6d803da 100644 --- a/packages/openapi/src/__tests__/showstyles.spec.ts +++ b/packages/openapi/src/__tests__/showstyles.spec.ts @@ -1,5 +1,11 @@ // eslint-disable-next-line node/no-missing-import -import { Configuration, ShowStyleBase, ShowstylesApi, ShowStyleVariant } from '../../client/ts' +import { + Configuration, + GetShowStyleConfig200ResponseResult, + ShowStyleBase, + ShowstylesApi, + ShowStyleVariant, +} from '../../client/ts' import { checkServer } from '../checkServer' import Logging from '../httpLogging' @@ -72,6 +78,26 @@ describe('Network client', () => { expect(showStyle.status).toBe(200) }) + let showStyleConfig: GetShowStyleConfig200ResponseResult | undefined + test('can request a ShowStyle config by id', async () => { + const showStyle = await showStylesApi.getShowStyleConfig({ + showStyleBaseId: showStyleBaseIds[0], + }) + expect(showStyle.status).toBe(200) + expect(showStyle).toHaveProperty('result') + expect(showStyle.result).toHaveProperty('developerMode') + showStyleConfig = JSON.parse(JSON.stringify(showStyle.result)) + }) + + test('can update a ShowStyle config', async () => { + showStyleConfig.developerMode = !showStyleConfig.developerMode + const showStyle = await showStylesApi.updateShowStyleConfig({ + showStyleBaseId: showStyleBaseIds[0], + requestBody: showStyleConfig, + }) + expect(showStyle.status).toBe(200) + }) + const showStyleVariantIds: string[] = [] test('can request all ShowStyleVariants', async () => { const showStyleVariants = await showStylesApi.getShowStyleVariants({ diff --git a/packages/openapi/src/__tests__/studios.spec.ts b/packages/openapi/src/__tests__/studios.spec.ts index e81e4a7694..f0c601ffc4 100644 --- a/packages/openapi/src/__tests__/studios.spec.ts +++ b/packages/openapi/src/__tests__/studios.spec.ts @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-missing-import -import { Configuration, Studio, StudiosApi } from '../../client/ts' +import { Configuration, GetStudioConfig200ResponseResult, Studio, StudiosApi } from '../../client/ts' import { checkServer } from '../checkServer' import Logging from '../httpLogging' @@ -58,6 +58,26 @@ describe('Network client', () => { expect(studio.status).toBe(200) }) + let studioConfig: GetStudioConfig200ResponseResult | undefined + test('can request a Studio config by id', async () => { + const studio = await studiosApi.getStudioConfig({ + studioId: studioIds[0], + }) + expect(studio.status).toBe(200) + expect(studio).toHaveProperty('result') + expect(studio.result).toHaveProperty('developerMode') + studioConfig = JSON.parse(JSON.stringify(studio.result)) + }) + + test('can update a studio config', async () => { + studioConfig.developerMode = !studioConfig.developerMode + const studio = await studiosApi.updateStudioConfig({ + studioId: studioIds[0], + requestBody: studioConfig, + }) + expect(studio.status).toBe(200) + }) + const studioDevices: string[] = [] test('can request a list of devices for a studio', async () => { const devices = await studiosApi.devices({ studioId: studioIds[0] })