diff --git a/src/index.test.ts b/src/index.test.ts index 2453a08..2cc2e66 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -322,7 +322,32 @@ const chartDesignerConfigNormalMode: Required = { onDesignerRenderingFailed: designer => { designer.destroy() } } -// Set up a complete Chart Designer config - normal mode + +// Set up a complete Chart Designer config - readOnly mode +const chartDesignerConfigReadOnlyMode: Required = { + secretKey: 'mySecretKey', + divId: 'chartContainer', + container: document.body, + chartKey: 'myChartKey', + language: 'en', + features: { + disabled: ['areas', 'backgroundImage'], + readOnly: ['categoryList', 'chartName'] + }, + mode: 'readOnly', + openDraftDrawing: true, + openLatestDrawing: true, + canvasColorScheme: 'auto', + // Callbacks + onChartCreated: _chartKey => {}, + onChartUpdated: _chartKey => {}, + onChartPublished: _chartKey => {}, + onExitRequested: () => {}, + onDesignerRendered: _designer => {}, + onDesignerRenderingFailed: designer => { designer.destroy() } +} + +// Set up a complete Chart Designer config - safe mode const chartDesignerConfigSafeMode: Required = { secretKey: 'mySecretKey', divId: 'chartContainer',