fraim-framework 2.0.56 ā 2.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/bin/fraim-mcp.js +14 -0
- package/bin/fraim.js +23 -0
- package/dist/src/cli/commands/init-project.js +10 -4
- package/dist/src/cli/commands/mcp.js +65 -0
- package/dist/src/cli/setup/mcp-config-generator.js +19 -16
- package/dist/src/fraim/issue-tracking/ado-provider.js +304 -0
- package/dist/src/fraim/issue-tracking/factory.js +63 -0
- package/dist/src/fraim/issue-tracking/github-provider.js +200 -0
- package/dist/src/fraim/issue-tracking/types.js +7 -0
- package/dist/src/fraim/issue-tracking-config.js +83 -0
- package/dist/src/local-mcp-server/stdio-server.js +207 -0
- package/dist/src/utils/workflow-parser.js +81 -0
- package/package.json +17 -12
- package/registry/scripts/pdf-styles.css +172 -0
- package/registry/scripts/prep-issue.sh +46 -4
- package/registry/scripts/profile-server.ts +131 -130
- package/registry/stubs/workflows/customer-development/user-survey-dispatch.md +1 -1
- package/registry/stubs/workflows/customer-development/users-to-target.md +1 -1
- package/registry/stubs/workflows/product-building/design.md +1 -1
- package/registry/stubs/workflows/product-building/implement.md +1 -1
- package/Claude.md +0 -1
- package/dist/registry/ai-manager-rules/customer-development-phases/phase1-customer-profiling.md +0 -101
- package/dist/registry/ai-manager-rules/customer-development-phases/phase2-platform-discovery.md +0 -235
- package/dist/registry/ai-manager-rules/customer-development-phases/phase3-prospect-qualification.md +0 -243
- package/dist/registry/ai-manager-rules/customer-development-phases/phase4-inventory-compilation.md +0 -206
- package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +0 -73
- package/dist/registry/ai-manager-rules/design-phases/design-design.md +0 -145
- package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +0 -283
- package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +0 -120
- package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +0 -173
- package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +0 -104
- package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +0 -100
- package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +0 -237
- package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +0 -121
- package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +0 -375
- package/dist/registry/ai-manager-rules/retrospective.md +0 -116
- package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +0 -188
- package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +0 -202
- package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +0 -170
- package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +0 -105
- package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +0 -66
- package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +0 -139
- package/dist/registry/ai-manager-rules/user-survey-phases/phase1-survey-scoping.md +0 -60
- package/dist/registry/ai-manager-rules/user-survey-phases/phase2-survey-build-linkedin.md +0 -23
- package/dist/registry/ai-manager-rules/user-survey-phases/phase3-survey-build-reddit.md +0 -22
- package/dist/registry/ai-manager-rules/user-survey-phases/phase4-survey-build-x.md +0 -21
- package/dist/registry/ai-manager-rules/user-survey-phases/phase5-survey-build-facebook.md +0 -19
- package/dist/registry/ai-manager-rules/user-survey-phases/phase6-survey-build-custom.md +0 -15
- package/dist/registry/ai-manager-rules/user-survey-phases/phase7-survey-dispatch.md +0 -45
- package/dist/registry/providers/ado.json +0 -19
- package/dist/registry/providers/github.json +0 -19
- package/dist/registry/scripts/cleanup-branch.js +0 -287
- package/dist/registry/scripts/evaluate-code-quality.js +0 -66
- package/dist/registry/scripts/exec-with-timeout.js +0 -142
- package/dist/registry/scripts/generate-engagement-emails.js +0 -705
- package/dist/registry/scripts/newsletter-helpers.js +0 -671
- package/dist/registry/scripts/profile-server.js +0 -388
- package/dist/registry/scripts/run-thank-you-workflow.js +0 -92
- package/dist/registry/scripts/send-newsletter-simple.js +0 -85
- package/dist/registry/scripts/send-thank-you-emails.js +0 -54
- package/dist/registry/scripts/validate-openapi-limits.js +0 -311
- package/dist/registry/scripts/validate-test-coverage.js +0 -262
- package/dist/registry/scripts/verify-test-coverage.js +0 -66
- package/dist/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +0 -53
- package/dist/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +0 -37
- package/dist/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +0 -35
- package/dist/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +0 -29
- package/dist/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +0 -126
- package/dist/registry/templates/customer-development/customer-interview-template.md +0 -99
- package/dist/registry/templates/customer-development/customer-persona-template.md +0 -69
- package/dist/registry/templates/customer-development/follow-up-email-templates.md +0 -132
- package/dist/registry/templates/customer-development/insight-analysis-template.md +0 -74
- package/dist/registry/templates/customer-development/prospect-inventory-template.csv +0 -3
- package/dist/registry/templates/customer-development/search-strategy-template.md +0 -123
- package/dist/registry/templates/customer-development/strategic-recommendations-template.md +0 -53
- package/dist/registry/templates/customer-development/thank-you-email-template.html +0 -124
- package/dist/registry/templates/customer-development/thank-you-note-template.md +0 -16
- package/dist/registry/templates/customer-development/triage-log-template.md +0 -278
- package/dist/registry/templates/customer-development/weekly-newsletter-template.html +0 -204
- package/dist/registry/templates/evidence/Design-Evidence.md +0 -30
- package/dist/registry/templates/evidence/Implementation-BugEvidence.md +0 -94
- package/dist/registry/templates/evidence/Implementation-FeatureEvidence.md +0 -129
- package/dist/registry/templates/evidence/Spec-Evidence.md +0 -19
- package/dist/registry/templates/help/HelpNeeded.md +0 -14
- package/dist/registry/templates/legal/NDA-TEMPLATE.md +0 -170
- package/dist/registry/templates/legal/PATENT-TEMPLATE.md +0 -372
- package/dist/registry/templates/legal/TRADEMARK-TEMPLATE.md +0 -339
- package/dist/registry/templates/legal/contract-review-checklist.md +0 -193
- package/dist/registry/templates/legal/review-report-template.md +0 -198
- package/dist/registry/templates/legal/saas-terms-template.md +0 -174
- package/dist/registry/templates/legal/sow-template.md +0 -117
- package/dist/registry/templates/legal/template-variables.md +0 -131
- package/dist/registry/templates/marketing/DOMAIN-REGISTRATION-TEMPLATE.md +0 -194
- package/dist/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +0 -66
- package/dist/registry/templates/marketing/STORYTELLING-TEMPLATE.md +0 -130
- package/dist/registry/templates/marketing/WEBSITE-TEMPLATE.md +0 -262
- package/dist/registry/templates/marketing/github-pages-workflow.yml +0 -64
- package/dist/registry/templates/replicate/implementation-checklist.md +0 -39
- package/dist/registry/templates/replicate/use-cases-template.md +0 -88
- package/dist/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +0 -55
- package/dist/registry/templates/specs/BUGSPEC-TEMPLATE.md +0 -37
- package/dist/registry/templates/specs/FEATURESPEC-TEMPLATE.md +0 -66
- package/dist/registry/templates/specs/TECHSPEC-TEMPLATE.md +0 -39
- package/dist/registry/workflows/bootstrap/create-architecture.md +0 -38
- package/dist/registry/workflows/bootstrap/detect-broken-windows.md +0 -300
- package/dist/registry/workflows/bootstrap/evaluate-code-quality.md +0 -35
- package/dist/registry/workflows/bootstrap/verify-test-coverage.md +0 -36
- package/dist/registry/workflows/brainstorming/blue-sky-brainstorming.md +0 -211
- package/dist/registry/workflows/brainstorming/codebase-brainstorming.md +0 -165
- package/dist/registry/workflows/business-development/create-business-plan.md +0 -737
- package/dist/registry/workflows/business-development/ideate-business-opportunity.md +0 -55
- package/dist/registry/workflows/business-development/price-product.md +0 -325
- package/dist/registry/workflows/compliance/detect-compliance-requirements.md +0 -78
- package/dist/registry/workflows/compliance/generate-audit-evidence.md +0 -75
- package/dist/registry/workflows/compliance/soc2-evidence-generator.md +0 -332
- package/dist/registry/workflows/customer-development/insight-analysis.md +0 -156
- package/dist/registry/workflows/customer-development/insight-triage.md +0 -938
- package/dist/registry/workflows/customer-development/interview-preparation.md +0 -452
- package/dist/registry/workflows/customer-development/linkedin-outreach.md +0 -593
- package/dist/registry/workflows/customer-development/strategic-brainstorming.md +0 -146
- package/dist/registry/workflows/customer-development/thank-customers.md +0 -203
- package/dist/registry/workflows/customer-development/user-survey-dispatch.md +0 -60
- package/dist/registry/workflows/customer-development/users-to-target.md +0 -112
- package/dist/registry/workflows/customer-development/weekly-newsletter.md +0 -366
- package/dist/registry/workflows/deploy/cloud-deployment.md +0 -310
- package/dist/registry/workflows/improve-fraim/contribute.md +0 -32
- package/dist/registry/workflows/improve-fraim/file-issue.md +0 -32
- package/dist/registry/workflows/learning/build-skillset.md +0 -212
- package/dist/registry/workflows/learning/synthesize-learnings.md +0 -284
- package/dist/registry/workflows/legal/contract-review-analysis.md +0 -382
- package/dist/registry/workflows/legal/nda.md +0 -69
- package/dist/registry/workflows/legal/patent-filing.md +0 -76
- package/dist/registry/workflows/legal/saas-contract-development.md +0 -213
- package/dist/registry/workflows/legal/trademark-filing.md +0 -77
- package/dist/registry/workflows/marketing/content-creation.md +0 -37
- package/dist/registry/workflows/marketing/convert-to-pdf.md +0 -235
- package/dist/registry/workflows/marketing/create-modern-website.md +0 -456
- package/dist/registry/workflows/marketing/domain-registration.md +0 -323
- package/dist/registry/workflows/marketing/hbr-article.md +0 -73
- package/dist/registry/workflows/marketing/launch-checklist.md +0 -37
- package/dist/registry/workflows/marketing/marketing-strategy.md +0 -45
- package/dist/registry/workflows/marketing/storytelling.md +0 -65
- package/dist/registry/workflows/performance/analyze-performance.md +0 -65
- package/dist/registry/workflows/product-building/design.md +0 -103
- package/dist/registry/workflows/product-building/implement.md +0 -74
- package/dist/registry/workflows/product-building/iterate-on-pr-comments.md +0 -70
- package/dist/registry/workflows/product-building/prep-issue.md +0 -41
- package/dist/registry/workflows/product-building/prototype.md +0 -65
- package/dist/registry/workflows/product-building/resolve.md +0 -168
- package/dist/registry/workflows/product-building/retrospect.md +0 -86
- package/dist/registry/workflows/product-building/spec.md +0 -181
- package/dist/registry/workflows/product-building/test.md +0 -125
- package/dist/registry/workflows/productivity-report/productivity-report.md +0 -263
- package/dist/registry/workflows/quality-assurance/browser-validation.md +0 -221
- package/dist/registry/workflows/quality-assurance/iterative-improvement-cycle.md +0 -562
- package/dist/registry/workflows/replicate/replicate-discovery.md +0 -336
- package/dist/registry/workflows/replicate/replicate-to-issues.md +0 -324
- package/dist/registry/workflows/reviewer/review-implementation-vs-design-spec.md +0 -638
- package/dist/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -675
- package/dist/registry/workflows/startup-credits/aws-activate-application.md +0 -535
- package/dist/registry/workflows/startup-credits/google-cloud-application.md +0 -647
- package/dist/registry/workflows/startup-credits/microsoft-azure-application.md +0 -538
- package/dist/scripts/build-stub-registry.js +0 -108
- package/dist/src/ai-manager/ai-manager.js +0 -480
- package/dist/src/ai-manager/phase-flow.js +0 -357
- package/dist/src/ai-manager/types.js +0 -5
- package/dist/src/fraim-mcp-server.js +0 -1885
- package/dist/tests/debug-tools.js +0 -80
- package/dist/tests/shared-server-utils.js +0 -57
- package/dist/tests/test-add-ide.js +0 -283
- package/dist/tests/test-ai-coach-edge-cases.js +0 -420
- package/dist/tests/test-ai-coach-mcp-integration.js +0 -450
- package/dist/tests/test-ai-coach-performance.js +0 -328
- package/dist/tests/test-ai-coach-phase-content.js +0 -264
- package/dist/tests/test-ai-coach-workflows.js +0 -514
- package/dist/tests/test-cli.js +0 -228
- package/dist/tests/test-client-scripts-validation.js +0 -167
- package/dist/tests/test-complete-setup-flow.js +0 -110
- package/dist/tests/test-config-system.js +0 -279
- package/dist/tests/test-debug-session.js +0 -134
- package/dist/tests/test-end-to-end-hybrid-validation.js +0 -328
- package/dist/tests/test-enhanced-session-init.js +0 -188
- package/dist/tests/test-first-run-journey.js +0 -368
- package/dist/tests/test-fraim-issues.js +0 -59
- package/dist/tests/test-genericization.js +0 -44
- package/dist/tests/test-hybrid-script-execution.js +0 -340
- package/dist/tests/test-ide-detector.js +0 -46
- package/dist/tests/test-improved-setup.js +0 -121
- package/dist/tests/test-mcp-config-generator.js +0 -99
- package/dist/tests/test-mcp-connection.js +0 -107
- package/dist/tests/test-mcp-issue-integration.js +0 -156
- package/dist/tests/test-mcp-lifecycle-methods.js +0 -240
- package/dist/tests/test-mcp-shared-server.js +0 -308
- package/dist/tests/test-mcp-template-processing.js +0 -160
- package/dist/tests/test-modular-issue-tracking.js +0 -165
- package/dist/tests/test-node-compatibility.js +0 -95
- package/dist/tests/test-npm-install.js +0 -68
- package/dist/tests/test-package-size.js +0 -108
- package/dist/tests/test-pr-review-workflow.js +0 -307
- package/dist/tests/test-prep-issue.js +0 -129
- package/dist/tests/test-productivity-integration.js +0 -157
- package/dist/tests/test-script-location-independence.js +0 -198
- package/dist/tests/test-script-sync.js +0 -557
- package/dist/tests/test-server-utils.js +0 -32
- package/dist/tests/test-session-rehydration.js +0 -148
- package/dist/tests/test-setup-integration.js +0 -98
- package/dist/tests/test-setup-scenarios.js +0 -322
- package/dist/tests/test-standalone.js +0 -143
- package/dist/tests/test-stub-registry.js +0 -136
- package/dist/tests/test-sync-stubs.js +0 -143
- package/dist/tests/test-sync-version-update.js +0 -93
- package/dist/tests/test-telemetry.js +0 -193
- package/dist/tests/test-token-validator.js +0 -30
- package/dist/tests/test-user-journey.js +0 -236
- package/dist/tests/test-users-to-target-workflow.js +0 -253
- package/dist/tests/test-utils.js +0 -109
- package/dist/tests/test-wizard.js +0 -71
- package/dist/tests/test-workflow-discovery.js +0 -242
- package/labels.json +0 -52
- package/registry/agent-guardrails.md +0 -63
- package/registry/fraim.md +0 -48
- package/setup.js +0 -171
- package/tsconfig.json +0 -23
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Comprehensive tests for Users to Target workflow
|
|
4
|
-
* Tests the complete customer discovery workflow including:
|
|
5
|
-
* - Phase loading and validation
|
|
6
|
-
* - Template file accessibility
|
|
7
|
-
* - AI coach phase content validation
|
|
8
|
-
* - Output directory structure
|
|
9
|
-
* - CSV template format validation
|
|
10
|
-
* - Browser automation integration points
|
|
11
|
-
*/
|
|
12
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
-
};
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
const node_test_1 = require("node:test");
|
|
17
|
-
const node_assert_1 = __importDefault(require("node:assert"));
|
|
18
|
-
const fs_1 = require("fs");
|
|
19
|
-
const path_1 = require("path");
|
|
20
|
-
(0, node_test_1.describe)('Users to Target Workflow', () => {
|
|
21
|
-
const workflowPath = 'registry/workflows/customer-development';
|
|
22
|
-
const mainWorkflowFile = (0, path_1.join)(workflowPath, 'users-to-target.md');
|
|
23
|
-
const templatesPath = 'registry/templates/customer-development';
|
|
24
|
-
const aiCoachPhasesPath = 'registry/ai-manager-rules/customer-development-phases';
|
|
25
|
-
const outputPath = 'docs/customer-development';
|
|
26
|
-
(0, node_test_1.describe)('Workflow Structure', () => {
|
|
27
|
-
(0, node_test_1.it)('should have main workflow file', () => {
|
|
28
|
-
(0, node_assert_1.default)((0, fs_1.existsSync)(mainWorkflowFile), 'Main workflow file should exist');
|
|
29
|
-
const content = (0, fs_1.readFileSync)(mainWorkflowFile, 'utf-8');
|
|
30
|
-
(0, node_assert_1.default)(content.includes('# FRAIM Workflow: users-to-target'), 'Should have proper workflow header');
|
|
31
|
-
(0, node_assert_1.default)(content.includes('## Intent'), 'Should have intent section');
|
|
32
|
-
(0, node_assert_1.default)(content.includes('## Phases'), 'Should have phases section');
|
|
33
|
-
(0, node_assert_1.default)(content.includes('Phase 1: Customer Profiling'), 'Should include Phase 1');
|
|
34
|
-
(0, node_assert_1.default)(content.includes('Phase 2: Multi-Platform Discovery'), 'Should include Phase 2');
|
|
35
|
-
(0, node_assert_1.default)(content.includes('Phase 3: Prospect Qualification'), 'Should include Phase 3');
|
|
36
|
-
(0, node_assert_1.default)(content.includes('Phase 4: Inventory Compilation'), 'Should include Phase 4');
|
|
37
|
-
});
|
|
38
|
-
(0, node_test_1.it)('should have all required template files', () => {
|
|
39
|
-
const requiredTemplates = [
|
|
40
|
-
'customer-persona-template.md',
|
|
41
|
-
'search-strategy-template.md',
|
|
42
|
-
'prospect-inventory-template.csv'
|
|
43
|
-
];
|
|
44
|
-
requiredTemplates.forEach(template => {
|
|
45
|
-
const templatePath = (0, path_1.join)(templatesPath, template);
|
|
46
|
-
(0, node_assert_1.default)((0, fs_1.existsSync)(templatePath), `Template ${template} should exist`);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
(0, node_test_1.it)('should have all AI coach phase files', () => {
|
|
50
|
-
const requiredPhases = [
|
|
51
|
-
'phase1-customer-profiling.md',
|
|
52
|
-
'phase2-platform-discovery.md',
|
|
53
|
-
'phase3-prospect-qualification.md',
|
|
54
|
-
'phase4-inventory-compilation.md'
|
|
55
|
-
];
|
|
56
|
-
requiredPhases.forEach(phase => {
|
|
57
|
-
const phasePath = (0, path_1.join)(aiCoachPhasesPath, phase);
|
|
58
|
-
(0, node_assert_1.default)((0, fs_1.existsSync)(phasePath), `Phase file ${phase} should exist`);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
(0, node_test_1.describe)('Template Content Validation', () => {
|
|
63
|
-
(0, node_test_1.it)('should have properly structured customer persona template', () => {
|
|
64
|
-
const templatePath = (0, path_1.join)(templatesPath, 'customer-persona-template.md');
|
|
65
|
-
const content = (0, fs_1.readFileSync)(templatePath, 'utf-8');
|
|
66
|
-
// Check required sections
|
|
67
|
-
(0, node_assert_1.default)(content.includes('## Basic Information'), 'Should have Basic Information section');
|
|
68
|
-
(0, node_assert_1.default)(content.includes('## Demographics'), 'Should have Demographics section');
|
|
69
|
-
(0, node_assert_1.default)(content.includes('## Pain Points & Challenges'), 'Should have Pain Points section');
|
|
70
|
-
(0, node_assert_1.default)(content.includes('## Search Keywords'), 'Should have Search Keywords section');
|
|
71
|
-
(0, node_assert_1.default)(content.includes('### LinkedIn Keywords'), 'Should have LinkedIn keywords section');
|
|
72
|
-
(0, node_assert_1.default)(content.includes('### Reddit Keywords'), 'Should have Reddit keywords section');
|
|
73
|
-
(0, node_assert_1.default)(content.includes('### X (Twitter) Keywords'), 'Should have Twitter keywords section');
|
|
74
|
-
(0, node_assert_1.default)(content.includes('## Qualification Criteria'), 'Should have qualification criteria');
|
|
75
|
-
});
|
|
76
|
-
(0, node_test_1.it)('should have properly structured search strategy template', () => {
|
|
77
|
-
const templatePath = (0, path_1.join)(templatesPath, 'search-strategy-template.md');
|
|
78
|
-
const content = (0, fs_1.readFileSync)(templatePath, 'utf-8');
|
|
79
|
-
// Check platform strategies
|
|
80
|
-
(0, node_assert_1.default)(content.includes('### LinkedIn Strategy'), 'Should have LinkedIn strategy');
|
|
81
|
-
(0, node_assert_1.default)(content.includes('### Reddit Strategy'), 'Should have Reddit strategy');
|
|
82
|
-
(0, node_assert_1.default)(content.includes('### X (Twitter) Strategy'), 'Should have Twitter strategy');
|
|
83
|
-
(0, node_assert_1.default)(content.includes('### Facebook Strategy'), 'Should have Facebook strategy');
|
|
84
|
-
(0, node_assert_1.default)(content.includes('### Forum Strategy'), 'Should have Forum strategy');
|
|
85
|
-
(0, node_assert_1.default)(content.includes('### Web Search Strategy'), 'Should have Web Search strategy');
|
|
86
|
-
(0, node_assert_1.default)(content.includes('## Success Metrics per Platform'), 'Should have success metrics');
|
|
87
|
-
});
|
|
88
|
-
(0, node_test_1.it)('should have properly formatted CSV template', () => {
|
|
89
|
-
const templatePath = (0, path_1.join)(templatesPath, 'prospect-inventory-template.csv');
|
|
90
|
-
const content = (0, fs_1.readFileSync)(templatePath, 'utf-8');
|
|
91
|
-
// Check required CSV columns
|
|
92
|
-
const requiredColumns = [
|
|
93
|
-
'Name', 'Platform Found', 'Profile URL', 'Contact Information',
|
|
94
|
-
'Pain Points Identified', 'Relevance Score', 'Discovery Context',
|
|
95
|
-
'Follow-up Priority', 'Notes', 'Date Found', 'Industry',
|
|
96
|
-
'Job Title', 'Company', 'Location', 'Engagement Level'
|
|
97
|
-
];
|
|
98
|
-
const headerLine = content.split('\n')[0];
|
|
99
|
-
requiredColumns.forEach(column => {
|
|
100
|
-
(0, node_assert_1.default)(headerLine.includes(column), `CSV should include ${column} column`);
|
|
101
|
-
});
|
|
102
|
-
// Should have at least 2 sample rows
|
|
103
|
-
const lines = content.split('\n').filter(line => line.trim());
|
|
104
|
-
(0, node_assert_1.default)(lines.length >= 3, 'CSV should have header + at least 2 sample rows');
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
(0, node_test_1.describe)('AI Coach Phase Content', () => {
|
|
108
|
-
(0, node_test_1.it)('should have comprehensive Phase 1 coaching content', () => {
|
|
109
|
-
const phasePath = (0, path_1.join)(aiCoachPhasesPath, 'phase1-customer-profiling.md');
|
|
110
|
-
const content = (0, fs_1.readFileSync)(phasePath, 'utf-8');
|
|
111
|
-
(0, node_assert_1.default)(content.includes('## Objective'), 'Should have objective');
|
|
112
|
-
(0, node_assert_1.default)(content.includes('## Key Questions to Ask'), 'Should have coaching questions');
|
|
113
|
-
(0, node_assert_1.default)(content.includes('### Understanding the Business'), 'Should have business questions');
|
|
114
|
-
(0, node_assert_1.default)(content.includes('### Defining the Target Customer'), 'Should have customer questions');
|
|
115
|
-
(0, node_assert_1.default)(content.includes('### Identifying Pain Points'), 'Should have pain point questions');
|
|
116
|
-
(0, node_assert_1.default)(content.includes('## Validation Criteria'), 'Should have validation criteria');
|
|
117
|
-
(0, node_assert_1.default)(content.includes('## Evidence Required'), 'Should have evidence requirements');
|
|
118
|
-
// Should have at least 15 coaching questions
|
|
119
|
-
const questionMatches = content.match(/^\d+\.\s*"/gm);
|
|
120
|
-
(0, node_assert_1.default)(questionMatches && questionMatches.length >= 15, 'Should have at least 15 coaching questions');
|
|
121
|
-
});
|
|
122
|
-
(0, node_test_1.it)('should have browser automation guidance in Phase 2', () => {
|
|
123
|
-
const phasePath = (0, path_1.join)(aiCoachPhasesPath, 'phase2-platform-discovery.md');
|
|
124
|
-
const content = (0, fs_1.readFileSync)(phasePath, 'utf-8');
|
|
125
|
-
// Check browser automation integration
|
|
126
|
-
(0, node_assert_1.default)(content.includes('mcp_playwright_browser_navigate'), 'Should reference Playwright navigation');
|
|
127
|
-
(0, node_assert_1.default)(content.includes('mcp_playwright_browser_snapshot'), 'Should reference Playwright snapshots');
|
|
128
|
-
(0, node_assert_1.default)(content.includes('mcp_playwright_browser_click'), 'Should reference Playwright clicking');
|
|
129
|
-
(0, node_assert_1.default)(content.includes('Authentication Check'), 'Should have authentication handling');
|
|
130
|
-
// Check platform coverage
|
|
131
|
-
(0, node_assert_1.default)(content.includes('LinkedIn'), 'Should cover LinkedIn');
|
|
132
|
-
(0, node_assert_1.default)(content.includes('Reddit'), 'Should cover Reddit');
|
|
133
|
-
(0, node_assert_1.default)(content.includes('X (Twitter)'), 'Should cover Twitter');
|
|
134
|
-
(0, node_assert_1.default)(content.includes('Facebook'), 'Should cover Facebook');
|
|
135
|
-
(0, node_assert_1.default)(content.includes('Industry Forum Search'), 'Should cover forums');
|
|
136
|
-
(0, node_assert_1.default)(content.includes('General Web Search'), 'Should cover web search');
|
|
137
|
-
// Check authentication prompts
|
|
138
|
-
(0, node_assert_1.default)(content.includes('Please log into'), 'Should have login prompts');
|
|
139
|
-
(0, node_assert_1.default)(content.includes('Type \'ready\''), 'Should have confirmation prompts');
|
|
140
|
-
});
|
|
141
|
-
(0, node_test_1.it)('should have scoring system in Phase 3', () => {
|
|
142
|
-
const phasePath = (0, path_1.join)(aiCoachPhasesPath, 'phase3-prospect-qualification.md');
|
|
143
|
-
const content = (0, fs_1.readFileSync)(phasePath, 'utf-8');
|
|
144
|
-
(0, node_assert_1.default)(content.includes('## Scoring System (1-10 Scale)'), 'Should have scoring system');
|
|
145
|
-
(0, node_assert_1.default)(content.includes('Pain Point Match'), 'Should have pain point scoring');
|
|
146
|
-
(0, node_assert_1.default)(content.includes('Authority/Influence'), 'Should have authority scoring');
|
|
147
|
-
(0, node_assert_1.default)(content.includes('Urgency'), 'Should have urgency scoring');
|
|
148
|
-
(0, node_assert_1.default)(content.includes('Accessibility'), 'Should have accessibility scoring');
|
|
149
|
-
(0, node_assert_1.default)(content.includes('Engagement Level'), 'Should have engagement scoring');
|
|
150
|
-
// Check qualification tiers
|
|
151
|
-
(0, node_assert_1.default)(content.includes('Tier 1'), 'Should have tier 1 prospects');
|
|
152
|
-
(0, node_assert_1.default)(content.includes('Tier 2'), 'Should have tier 2 prospects');
|
|
153
|
-
(0, node_assert_1.default)(content.includes('Score 35-50'), 'Should define high-score prospects');
|
|
154
|
-
(0, node_assert_1.default)(content.includes('Score 25-34'), 'Should define medium-score prospects');
|
|
155
|
-
});
|
|
156
|
-
(0, node_test_1.it)('should have CSV compilation guidance in Phase 4', () => {
|
|
157
|
-
const phasePath = (0, path_1.join)(aiCoachPhasesPath, 'phase4-inventory-compilation.md');
|
|
158
|
-
const content = (0, fs_1.readFileSync)(phasePath, 'utf-8');
|
|
159
|
-
(0, node_assert_1.default)(content.includes('## CSV Structure'), 'Should have CSV structure');
|
|
160
|
-
(0, node_assert_1.default)(content.includes('### Required Columns'), 'Should define required columns');
|
|
161
|
-
(0, node_assert_1.default)(content.includes('### Step 2: Priority Assignment'), 'Should have priority assignment');
|
|
162
|
-
(0, node_assert_1.default)(content.includes('High Priority'), 'Should define high priority');
|
|
163
|
-
(0, node_assert_1.default)(content.includes('Medium Priority'), 'Should define medium priority');
|
|
164
|
-
(0, node_assert_1.default)(content.includes('Low Priority'), 'Should define low priority');
|
|
165
|
-
// Check file naming
|
|
166
|
-
(0, node_assert_1.default)(content.includes('users-to-target-{timestamp}.csv'), 'Should have file naming convention');
|
|
167
|
-
(0, node_assert_1.default)(content.includes('docs/customer-development/'), 'Should specify output location');
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
(0, node_test_1.describe)('Workflow Integration Points', () => {
|
|
171
|
-
(0, node_test_1.it)('should specify browser automation requirements', () => {
|
|
172
|
-
const mainContent = (0, fs_1.readFileSync)(mainWorkflowFile, 'utf-8');
|
|
173
|
-
(0, node_assert_1.default)(mainContent.includes('Playwright MCP'), 'Should mention Playwright MCP requirement');
|
|
174
|
-
(0, node_assert_1.default)(mainContent.includes('Browser automation'), 'Should mention browser automation');
|
|
175
|
-
});
|
|
176
|
-
(0, node_test_1.it)('should define success metrics', () => {
|
|
177
|
-
const mainContent = (0, fs_1.readFileSync)(mainWorkflowFile, 'utf-8');
|
|
178
|
-
(0, node_assert_1.default)(mainContent.includes('50-200 qualified prospects'), 'Should define prospect quantity target');
|
|
179
|
-
(0, node_assert_1.default)(mainContent.includes('70%+ relevance score'), 'Should define quality target');
|
|
180
|
-
(0, node_assert_1.default)(mainContent.includes('60%+ of prospects'), 'Should define contact info target');
|
|
181
|
-
});
|
|
182
|
-
(0, node_test_1.it)('should reference all template files', () => {
|
|
183
|
-
const mainContent = (0, fs_1.readFileSync)(mainWorkflowFile, 'utf-8');
|
|
184
|
-
(0, node_assert_1.default)(mainContent.includes('customer-persona-template.md'), 'Should reference persona template');
|
|
185
|
-
(0, node_assert_1.default)(mainContent.includes('search-strategy-template.md'), 'Should reference strategy template');
|
|
186
|
-
(0, node_assert_1.default)(mainContent.includes('prospect-inventory-template.csv'), 'Should reference CSV template');
|
|
187
|
-
});
|
|
188
|
-
(0, node_test_1.it)('should reference AI coach integration', () => {
|
|
189
|
-
const mainContent = (0, fs_1.readFileSync)(mainWorkflowFile, 'utf-8');
|
|
190
|
-
(0, node_assert_1.default)(mainContent.includes('seekCoachingOnNextStep'), 'Should reference AI coach integration');
|
|
191
|
-
(0, node_assert_1.default)(mainContent.includes('customer-development'), 'Should specify customer-development workflow type');
|
|
192
|
-
});
|
|
193
|
-
});
|
|
194
|
-
(0, node_test_1.describe)('Output Validation', () => {
|
|
195
|
-
(0, node_test_1.it)('should specify correct output file format', () => {
|
|
196
|
-
const phase4Content = (0, fs_1.readFileSync)((0, path_1.join)(aiCoachPhasesPath, 'phase4-inventory-compilation.md'), 'utf-8');
|
|
197
|
-
(0, node_assert_1.default)(phase4Content.includes('users-to-target-{YYYY-MM-DD-HHMM}.csv'), 'Should specify timestamp format');
|
|
198
|
-
(0, node_assert_1.default)(phase4Content.includes('docs/customer-development/'), 'Should specify output directory');
|
|
199
|
-
});
|
|
200
|
-
(0, node_test_1.it)('should define minimum success criteria', () => {
|
|
201
|
-
const phase4Content = (0, fs_1.readFileSync)((0, path_1.join)(aiCoachPhasesPath, 'phase4-inventory-compilation.md'), 'utf-8');
|
|
202
|
-
(0, node_assert_1.default)(phase4Content.includes('50+ qualified prospects'), 'Should define minimum prospects');
|
|
203
|
-
(0, node_assert_1.default)(phase4Content.includes('70%+ relevance score'), 'Should define minimum relevance');
|
|
204
|
-
(0, node_assert_1.default)(phase4Content.includes('60%+ of prospects'), 'Should define minimum contact success');
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
(0, node_test_1.describe)('Error Handling and Edge Cases', () => {
|
|
208
|
-
(0, node_test_1.it)('should include authentication failure handling', () => {
|
|
209
|
-
const phase2Content = (0, fs_1.readFileSync)((0, path_1.join)(aiCoachPhasesPath, 'phase2-platform-discovery.md'), 'utf-8');
|
|
210
|
-
(0, node_assert_1.default)(phase2Content.includes('Authentication Failures'), 'Should handle auth failures');
|
|
211
|
-
(0, node_assert_1.default)(phase2Content.includes('Rate Limiting'), 'Should handle rate limiting');
|
|
212
|
-
(0, node_assert_1.default)(phase2Content.includes('Technical Issues'), 'Should handle technical issues');
|
|
213
|
-
});
|
|
214
|
-
(0, node_test_1.it)('should include qualification edge cases', () => {
|
|
215
|
-
const phase3Content = (0, fs_1.readFileSync)((0, path_1.join)(aiCoachPhasesPath, 'phase3-prospect-qualification.md'), 'utf-8');
|
|
216
|
-
(0, node_assert_1.default)(phase3Content.includes('Common Pitfalls'), 'Should identify common pitfalls');
|
|
217
|
-
(0, node_assert_1.default)(phase3Content.includes('Over-Qualification'), 'Should warn about over-qualification');
|
|
218
|
-
(0, node_assert_1.default)(phase3Content.includes('Under-Qualification'), 'Should warn about under-qualification');
|
|
219
|
-
});
|
|
220
|
-
(0, node_test_1.it)('should include data quality validation', () => {
|
|
221
|
-
const phase4Content = (0, fs_1.readFileSync)((0, path_1.join)(aiCoachPhasesPath, 'phase4-inventory-compilation.md'), 'utf-8');
|
|
222
|
-
(0, node_assert_1.default)(phase4Content.includes('Data Validation'), 'Should include data validation');
|
|
223
|
-
(0, node_assert_1.default)(phase4Content.includes('Quality Assurance'), 'Should include QA checklist');
|
|
224
|
-
(0, node_assert_1.default)(phase4Content.includes('Remove Duplicates'), 'Should handle duplicates');
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
/**
|
|
229
|
-
* Integration test that would require actual browser automation
|
|
230
|
-
* This test is commented out as it requires:
|
|
231
|
-
* - Playwright MCP server running
|
|
232
|
-
* - Valid social media accounts
|
|
233
|
-
* - Network connectivity
|
|
234
|
-
* - Longer execution time
|
|
235
|
-
*/
|
|
236
|
-
/*
|
|
237
|
-
describe('Users to Target Integration Tests', () => {
|
|
238
|
-
it('should complete end-to-end workflow simulation', async () => {
|
|
239
|
-
// This would test:
|
|
240
|
-
// 1. Loading customer persona template
|
|
241
|
-
// 2. Simulating browser automation (with mocked responses)
|
|
242
|
-
// 3. Generating prospect data
|
|
243
|
-
// 4. Creating CSV output
|
|
244
|
-
// 5. Validating output format and content
|
|
245
|
-
|
|
246
|
-
// Implementation would require:
|
|
247
|
-
// - Mock Playwright MCP responses
|
|
248
|
-
// - Sample social media data
|
|
249
|
-
// - CSV validation logic
|
|
250
|
-
// - File system cleanup
|
|
251
|
-
});
|
|
252
|
-
});
|
|
253
|
-
*/
|
package/dist/tests/test-utils.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.resolveProjectPath = resolveProjectPath;
|
|
7
|
-
exports.runTests = runTests;
|
|
8
|
-
const dotenv_1 = __importDefault(require("dotenv"));
|
|
9
|
-
dotenv_1.default.config({ override: true });
|
|
10
|
-
const node_test_1 = require("node:test");
|
|
11
|
-
const path_1 = __importDefault(require("path"));
|
|
12
|
-
// Global tracker for failed tests across all suites
|
|
13
|
-
const globalFailedTests = [];
|
|
14
|
-
/**
|
|
15
|
-
* Helper to resolve paths correctly whether running from tests/ or dist/tests/
|
|
16
|
-
* @param relativePath - Path relative to project root (e.g., 'dist/src/cli/fraim.js')
|
|
17
|
-
* @returns Absolute path to the file
|
|
18
|
-
*/
|
|
19
|
-
function resolveProjectPath(relativePath) {
|
|
20
|
-
// Detect if running from dist/tests or tests
|
|
21
|
-
const isCompiledTest = __dirname.includes(path_1.default.join('dist', 'tests'));
|
|
22
|
-
const projectRoot = isCompiledTest ? path_1.default.resolve(__dirname, '../..') : path_1.default.resolve(__dirname, '..');
|
|
23
|
-
return path_1.default.resolve(projectRoot, relativePath);
|
|
24
|
-
}
|
|
25
|
-
// Generic test runner function that can run any type of test
|
|
26
|
-
async function runTests(testCases, runTestFn, testTitle) {
|
|
27
|
-
console.log(`š§Ŗ Testing ${testTitle}...\n`);
|
|
28
|
-
// Check if we need to filter by tags
|
|
29
|
-
let tagsFilter = [];
|
|
30
|
-
console.log(`Command line arguments: ${process.argv.join(', ')}`);
|
|
31
|
-
// First try command line arguments
|
|
32
|
-
const tagsArg = process.argv.find(arg => arg && typeof arg === 'string' && arg.startsWith('--tags='));
|
|
33
|
-
if (tagsArg) {
|
|
34
|
-
const tagValue = tagsArg.split('=')[1];
|
|
35
|
-
if (tagValue) {
|
|
36
|
-
tagsFilter = tagValue.split(',');
|
|
37
|
-
console.log(`Filtering tests by tags (from CLI): ${tagsFilter.join(', ')}`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
// Then try environment variable (for npm scripts)
|
|
41
|
-
if (tagsFilter.length === 0 && process.env.TAGS) {
|
|
42
|
-
tagsFilter = process.env.TAGS.split(',');
|
|
43
|
-
console.log(`Filtering tests by tags (from ENV): ${tagsFilter.join(', ')}`);
|
|
44
|
-
}
|
|
45
|
-
// Check for exclusion tags
|
|
46
|
-
let excludeTags = [];
|
|
47
|
-
if (process.env.EXCLUDE_TAGS) {
|
|
48
|
-
excludeTags = process.env.EXCLUDE_TAGS.split(',');
|
|
49
|
-
console.log(`Excluding tests with tags (from ENV): ${excludeTags.join(', ')}`);
|
|
50
|
-
}
|
|
51
|
-
// Filter test cases by tags if specified
|
|
52
|
-
const testsToRun = testCases.filter(test => {
|
|
53
|
-
// First check inclusion filter
|
|
54
|
-
if (tagsFilter.length > 0) {
|
|
55
|
-
// Ensure test.tags exists before calling .some() on it
|
|
56
|
-
if (!test.tags || !test.tags.some(tag => tagsFilter.includes(tag))) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
// Then check exclusion filter
|
|
61
|
-
if (excludeTags.length > 0) {
|
|
62
|
-
// Exclude tests with specified tags
|
|
63
|
-
if (test.tags && test.tags.some(tag => excludeTags.includes(tag))) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return true;
|
|
68
|
-
});
|
|
69
|
-
if (testsToRun.length === 0) {
|
|
70
|
-
console.log('No tests to run for suite: ' + testTitle);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
console.log(`Running ${testsToRun.length} tests${tagsFilter.length > 0 ? ` with tags: ${tagsFilter.join(', ')}` : ''}\n`);
|
|
74
|
-
// Use Node.js built-in test() function for each test case
|
|
75
|
-
// This allows the TAP reporter to properly aggregate results across all test files
|
|
76
|
-
for (const testCase of testsToRun) {
|
|
77
|
-
await (0, node_test_1.test)(testCase.name, async () => {
|
|
78
|
-
try {
|
|
79
|
-
const success = await runTestFn(testCase);
|
|
80
|
-
if (!success) {
|
|
81
|
-
const failedTestName = `${testTitle}: ${testCase.name}`;
|
|
82
|
-
if (!globalFailedTests.includes(failedTestName)) {
|
|
83
|
-
globalFailedTests.push(failedTestName);
|
|
84
|
-
}
|
|
85
|
-
throw new Error(`Test failed: ${testCase.name}`);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
const failedTestName = `${testTitle}: ${testCase.name}`;
|
|
90
|
-
if (!globalFailedTests.includes(failedTestName)) {
|
|
91
|
-
globalFailedTests.push(failedTestName);
|
|
92
|
-
}
|
|
93
|
-
throw error;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
// Display comprehensive final summary
|
|
98
|
-
console.log(`\nšØ FINAL TEST SUMMARY:`);
|
|
99
|
-
console.log(` ā Total Failed Tests: ${globalFailedTests.length}`);
|
|
100
|
-
if (globalFailedTests.length > 0) {
|
|
101
|
-
console.log(` š Failed Test Names:`);
|
|
102
|
-
globalFailedTests.forEach(testName => {
|
|
103
|
-
console.log(` - ${testName}`);
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
if (globalFailedTests.length > 0) {
|
|
107
|
-
process.exitCode = 1;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const node_child_process_1 = require("node:child_process");
|
|
7
|
-
const test_utils_1 = require("./test-utils");
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const fs_1 = __importDefault(require("fs"));
|
|
10
|
-
const os_1 = __importDefault(require("os"));
|
|
11
|
-
async function testWizardLaunch() {
|
|
12
|
-
console.log(' š Starting Wizard Launch Test...');
|
|
13
|
-
// We just want to ensure `fraim wizard` doesn't crash immediately or report "unknown command"
|
|
14
|
-
// Since it's interactive, we expect it to output the banner and then maybe hang or exit if we don't provide input.
|
|
15
|
-
// However, our mocked wizard (setup.js import) might just run setup non-interactively if we didn't implement real prompts yet.
|
|
16
|
-
// The current implementation just calls `runSetup()` from setup.js.
|
|
17
|
-
const cliScript = (0, test_utils_1.resolveProjectPath)('dist/src/cli/fraim.js');
|
|
18
|
-
const tsxCli = (0, test_utils_1.resolveProjectPath)('node_modules/tsx/dist/cli.mjs');
|
|
19
|
-
// Use a temp dir!
|
|
20
|
-
const tempDir = fs_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), 'fraim-wizard-test-'));
|
|
21
|
-
return new Promise(resolve => {
|
|
22
|
-
const ps = (0, node_child_process_1.spawn)(process.execPath, [tsxCli, cliScript, 'wizard'], {
|
|
23
|
-
cwd: tempDir,
|
|
24
|
-
env: { ...process.env, CI: 'true' },
|
|
25
|
-
shell: false
|
|
26
|
-
});
|
|
27
|
-
let stdout = '';
|
|
28
|
-
let stderr = '';
|
|
29
|
-
ps.stdout.on('data', d => stdout += d.toString());
|
|
30
|
-
ps.stderr.on('data', d => stderr += d.toString());
|
|
31
|
-
ps.on('close', code => {
|
|
32
|
-
// It might fail because setup.js expects to be run in a certain way or fails to find files if run from arbitrary dir without proper setup
|
|
33
|
-
// But we just want to verify it invoked the command and didn't say "wizardFunction is not a function"
|
|
34
|
-
try {
|
|
35
|
-
fs_1.default.rmSync(tempDir, { recursive: true, force: true });
|
|
36
|
-
}
|
|
37
|
-
catch (e) { }
|
|
38
|
-
if (stderr.includes('wizardFunction is not a function') || stderr.includes('Unknown command')) {
|
|
39
|
-
console.error('ā Wizard command failed to register/execute correctly');
|
|
40
|
-
console.error('STDERR:', stderr);
|
|
41
|
-
resolve(false);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
if (stdout.includes('FRAIM Interactive Setup Wizard') || stdout.includes('Running V2 setup')) {
|
|
45
|
-
console.log(' ā
`fraim wizard` command launched successfully');
|
|
46
|
-
resolve(true);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
console.warn(' ā ļø Wizard output unexpected.');
|
|
50
|
-
console.log('STDOUT:', stdout);
|
|
51
|
-
console.log('STDERR:', stderr);
|
|
52
|
-
if (code === 0)
|
|
53
|
-
resolve(true); // If it exited cleanly, maybe it worked
|
|
54
|
-
else
|
|
55
|
-
resolve(false);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
async function runWizardTest(testCase) {
|
|
61
|
-
return await testCase.testFunction();
|
|
62
|
-
}
|
|
63
|
-
const testCases = [
|
|
64
|
-
{
|
|
65
|
-
name: 'Wizard Launch',
|
|
66
|
-
description: 'Verify fraim wizard command is registered',
|
|
67
|
-
testFunction: testWizardLaunch,
|
|
68
|
-
tags: ['cli', 'wizard']
|
|
69
|
-
}
|
|
70
|
-
];
|
|
71
|
-
(0, test_utils_1.runTests)(testCases, runWizardTest, 'Fraim Wizard Test');
|