/** * E2E Test Runner - Init Command Templates * * Template strings for init command file generation */ export declare const EXAMPLE_YAML_TEST = "# Example E2E Test - Gift Rule Creation\nname: \"TC-EXAMPLE-001 - Create and verify gift rule\"\ndescription: \"Test creating a gift rule and verifying it in the database\"\npriority: P1\ntags:\n - smoke\n - example\n - gift-rule\n\nvariables:\n ruleName: \"Example Rule {{$uuid}}\"\n giftItemId: \"GIFT-001\"\n\nsetup:\n - adapter: postgresql\n action: execute\n description: \"Clean up any existing test rules\"\n sql: |\n DELETE FROM gift_rules\n WHERE name LIKE 'Example Rule%'\n AND created_at < NOW() - INTERVAL '1 hour'\n\nexecute:\n - adapter: http\n action: request\n description: \"Create a new gift rule via API\"\n method: POST\n url: \"/api/v1/gift-rules\"\n headers:\n Content-Type: application/json\n Authorization: \"Bearer {{$env(TEST_AUTH_TOKEN)}}\"\n body:\n name: \"{{ruleName}}\"\n giftItemId: \"{{giftItemId}}\"\n minPurchaseAmount: 100000\n isActive: true\n capture:\n ruleId: \"$.data.id\"\n assert:\n status: 201\n body:\n \"$.success\": true\n \"$.data.name\": \"{{ruleName}}\"\n\nverify:\n - adapter: postgresql\n action: queryOne\n description: \"Verify rule was created in database\"\n sql: |\n SELECT * FROM gift_rules WHERE id = $1\n params:\n - \"{{ruleId}}\"\n assert:\n rowCount: 1\n \"name\": \"{{ruleName}}\"\n \"is_active\": true\n\nteardown:\n - adapter: postgresql\n action: execute\n description: \"Clean up test rule\"\n sql: |\n DELETE FROM gift_rules WHERE id = $1\n params:\n - \"{{ruleId}}\"\n continueOnError: true\n"; export declare const EXAMPLE_TS_TEST = "/**\n * Example E2E Test - TypeScript DSL\n *\n * Demonstrates how to write E2E tests using TypeScript\n */\n\nimport type { TestContext } from '../../scripts/e2e-runner/core';\n\nexport const name = 'TC-EXAMPLE-002';\n\nexport default {\n priority: 'P1' as const,\n tags: ['smoke', 'example', 'typescript'],\n timeout: 30000,\n\n variables: {\n testId: `ts-test-${Date.now()}`,\n },\n\n async setup(ctx: TestContext) {\n ctx.logger.info('Setting up TypeScript test');\n const result = await ctx.adapters.getPostgreSQL().execute({\n action: 'execute',\n sql: 'SELECT 1 as check',\n params: [],\n });\n ctx.capture('setupResult', result);\n },\n\n async execute(ctx: TestContext) {\n ctx.logger.info('Executing TypeScript test');\n const response = await ctx.adapters.getHTTP().execute({\n action: 'request',\n method: 'GET',\n url: '/api/health',\n });\n ctx.capture('apiResponse', response);\n },\n\n async verify(ctx: TestContext) {\n const response = ctx.captured.apiResponse as { status: number };\n if (response.status !== 200) {\n throw new Error(`Expected status 200, got ${response.status}`);\n }\n ctx.logger.info('Verification passed');\n },\n\n async teardown(ctx: TestContext) {\n ctx.logger.info('Cleaning up TypeScript test');\n },\n};\n"; export declare const ENV_EXAMPLE = "# E2E Test Environment Variables\n# Copy this to .env.e2e and fill in your values\n\n# PostgreSQL\nPOSTGRESQL_CONNECTION_STRING=postgresql://user:password@localhost:5432/database\n\n# Redis\nREDIS_CONNECTION_STRING=redis://localhost:6379\n\n# MongoDB\nMONGODB_CONNECTION_STRING=mongodb://localhost:27017\n\n# Azure EventHub (if using)\nEVENTHUB_CONNECTION_STRING=\n\n# Test authentication token\nTEST_AUTH_TOKEN=your-test-token-here\n\n# Optional: Override default config path\n# E2E_CONFIG=tests/e2e/e2e.config.yaml\n\n# Optional: Default environment\n# E2E_ENV=local\n"; export declare const CONFIG_SCHEMA: { $schema: string; title: string; type: string; required: string[]; properties: { version: { type: string; const: string; }; environments: { type: string; additionalProperties: { type: string; required: string[]; properties: { baseUrl: { type: string; format: string; }; adapters: { type: string; properties: { postgresql: { $ref: string; }; redis: { $ref: string; }; mongodb: { $ref: string; }; eventhub: { $ref: string; }; }; }; }; }; }; defaults: { $ref: string; }; variables: { type: string; }; reporters: { type: string; items: { $ref: string; }; }; }; definitions: { postgresqlConfig: { type: string; required: string[]; properties: { connectionString: { type: string; }; schema: { type: string; }; poolSize: { type: string; minimum: number; maximum: number; }; }; }; redisConfig: { type: string; required: string[]; properties: { connectionString: { type: string; }; db: { type: string; }; keyPrefix: { type: string; }; }; }; mongodbConfig: { type: string; required: string[]; properties: { connectionString: { type: string; }; database: { type: string; }; }; }; eventhubConfig: { type: string; required: string[]; properties: { connectionString: { type: string; }; consumerGroup: { type: string; }; }; }; defaults: { type: string; properties: { timeout: { type: string; minimum: number; }; retries: { type: string; minimum: number; }; retryDelay: { type: string; minimum: number; }; parallel: { type: string; minimum: number; }; }; }; reporter: { type: string; required: string[]; properties: { type: { type: string; enum: string[]; }; output: { type: string; }; verbose: { type: string; }; }; }; }; }; export declare const TEST_SCHEMA: { $schema: string; title: string; type: string; required: string[]; properties: { name: { type: string; minLength: number; }; description: { type: string; }; priority: { type: string; enum: string[]; }; tags: { type: string; items: { type: string; }; }; skip: { type: string; }; skipReason: { type: string; }; timeout: { type: string; minimum: number; }; retries: { type: string; minimum: number; maximum: number; }; depends: { type: string; items: { type: string; }; }; variables: { type: string; }; setup: { type: string; items: { $ref: string; }; }; execute: { type: string; items: { $ref: string; }; minItems: number; }; verify: { type: string; items: { $ref: string; }; }; teardown: { type: string; items: { $ref: string; }; }; }; definitions: { step: { type: string; required: string[]; properties: { adapter: { type: string; enum: string[]; }; action: { type: string; }; description: { type: string; }; continueOnError: { type: string; }; retry: { type: string; }; delay: { type: string; }; }; }; }; }; //# sourceMappingURL=init-templates.d.ts.map