OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

analytics.dashboard.create.test

Verifies dashboard creation flow

  • Type: test-spec (test-spec)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.analytics-dashboard
  • Tags: analytics, dashboard, test
  • File: packages/examples/analytics-dashboard/src/dashboard/dashboard.test-spec.ts
  • field.key.label
    analytics.dashboard.create.test
    field.version.label
    1.0.0
    field.type.label
    test-spec (test-spec)
    field.title.label
    analytics.dashboard.create.test
    field.description.label

    Verifies dashboard creation flow

  • Type: test-spec (test-spec)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.analytics-dashboard
  • Tags: analytics, dashboard, test
  • File: packages/examples/analytics-dashboard/src/dashboard/dashboard.test-spec.ts
  • field.tags.label
    analytics,dashboard,test
    field.owners.label
    @example.analytics-dashboard
    field.stability.label
    stable

    Verifies dashboard creation flow

    Source Definition

    import { defineTestSpec } from '@lssm-tech/lib.contracts-spec/tests';
    
    export const CreateDashboardTest = defineTestSpec({
    	meta: {
    		key: 'analytics.dashboard.create.test',
    		version: '1.0.0',
    		title: 'Create Dashboard Test',
    		description: 'Verifies dashboard creation flow',
    		owners: ['@example.analytics-dashboard'],
    		tags: ['analytics', 'dashboard', 'test'],
    		stability: 'stable',
    	},
    	target: {
    		type: 'operation',
    		operation: { key: 'analytics.dashboard.create', version: '1.0.0' },
    	},
    	scenarios: [
    		{
    			key: 'success',
    			description: 'Successfully create a dashboard',
    			when: {
    				operation: { key: 'analytics.dashboard.create', version: '1.0.0' },
    				input: {
    					name: 'Test Dashboard',
    					description: 'Test Description',
    				},
    			},
    			then: [
    				{
    					type: 'expectOutput',
    					match: {
    						name: 'Test Dashboard',
    					},
    				},
    			],
    		},
    		{
    			key: 'error-invalid-input',
    			description: 'Fail to create dashboard with invalid input',
    			when: {
    				operation: { key: 'analytics.dashboard.create', version: '1.0.0' },
    				input: {
    					name: '',
    				},
    			},
    			then: [
    				{
    					type: 'expectError',
    					messageIncludes: 'VALIDATION_ERROR',
    				},
    			],
    		},
    	],
    });