@sun-asterisk/sungen 2.6.7 → 2.6.10
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/dist/cli/commands/dashboard.d.ts +2 -1
- package/dist/cli/commands/dashboard.d.ts.map +1 -1
- package/dist/cli/commands/dashboard.js +9 -9
- package/dist/cli/commands/dashboard.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +33 -0
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/history-store.d.ts +13 -9
- package/dist/dashboard/history-store.d.ts.map +1 -1
- package/dist/dashboard/history-store.js +19 -28
- package/dist/dashboard/history-store.js.map +1 -1
- package/dist/dashboard/html-renderer.d.ts +1 -1
- package/dist/dashboard/html-renderer.d.ts.map +1 -1
- package/dist/dashboard/html-renderer.js +2 -2
- package/dist/dashboard/html-renderer.js.map +1 -1
- package/dist/dashboard/snapshot-builder.d.ts.map +1 -1
- package/dist/dashboard/snapshot-builder.js +38 -2
- package/dist/dashboard/snapshot-builder.js.map +1 -1
- package/dist/dashboard/templates/index.html +142 -221
- package/dist/exporters/csv-exporter.d.ts +4 -0
- package/dist/exporters/csv-exporter.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.js +35 -26
- package/dist/exporters/csv-exporter.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +16 -4
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/exporters/json-exporter.d.ts.map +1 -1
- package/dist/exporters/json-exporter.js +28 -20
- package/dist/exporters/json-exporter.js.map +1 -1
- package/dist/exporters/playwright-report-parser.d.ts.map +1 -1
- package/dist/exporters/playwright-report-parser.js +22 -5
- package/dist/exporters/playwright-report-parser.js.map +1 -1
- package/dist/exporters/scenario-merger.d.ts +23 -1
- package/dist/exporters/scenario-merger.d.ts.map +1 -1
- package/dist/exporters/scenario-merger.js +39 -0
- package/dist/exporters/scenario-merger.js.map +1 -1
- package/dist/exporters/step-formatter.d.ts +31 -3
- package/dist/exporters/step-formatter.d.ts.map +1 -1
- package/dist/exporters/step-formatter.js +52 -19
- package/dist/exporters/step-formatter.js.map +1 -1
- package/dist/exporters/sun-logo.d.ts +10 -0
- package/dist/exporters/sun-logo.d.ts.map +1 -0
- package/dist/exporters/sun-logo.js +13 -0
- package/dist/exporters/sun-logo.js.map +1 -0
- package/dist/exporters/test-data-resolver.d.ts +13 -5
- package/dist/exporters/test-data-resolver.d.ts.map +1 -1
- package/dist/exporters/test-data-resolver.js +36 -14
- package/dist/exporters/test-data-resolver.js.map +1 -1
- package/dist/exporters/types.d.ts +16 -0
- package/dist/exporters/types.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.js +169 -99
- package/dist/exporters/xlsx-exporter.js.map +1 -1
- package/dist/orchestrator/templates/ai-instructions/claude-cmd-create-test.md +1 -1
- package/dist/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +154 -67
- package/dist/orchestrator/templates/ai-instructions/claude-skill-test-design-techniques.md +39 -0
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +1 -1
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +134 -61
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md +39 -0
- package/dist/orchestrator/templates/playwright.config.d.ts.map +1 -1
- package/dist/orchestrator/templates/playwright.config.js +2 -0
- package/dist/orchestrator/templates/playwright.config.js.map +1 -1
- package/dist/orchestrator/templates/playwright.config.ts +2 -0
- package/dist/orchestrator/templates/specs-base.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-base.js +1 -5
- package/dist/orchestrator/templates/specs-base.js.map +1 -1
- package/dist/orchestrator/templates/specs-base.ts +1 -5
- package/package.json +1 -1
- package/src/cli/commands/dashboard.ts +9 -9
- package/src/cli/commands/delivery.ts +30 -0
- package/src/cli/index.ts +1 -1
- package/src/dashboard/history-store.ts +22 -28
- package/src/dashboard/html-renderer.ts +6 -2
- package/src/dashboard/snapshot-builder.ts +36 -2
- package/src/dashboard/templates/index.html +142 -221
- package/src/dashboard/types.ts +1 -1
- package/src/exporters/csv-exporter.ts +44 -27
- package/src/exporters/feature-parser.ts +27 -8
- package/src/exporters/json-exporter.ts +31 -21
- package/src/exporters/playwright-report-parser.ts +23 -5
- package/src/exporters/scenario-merger.ts +65 -1
- package/src/exporters/step-formatter.ts +48 -23
- package/src/exporters/sun-logo.ts +10 -0
- package/src/exporters/test-data-resolver.ts +37 -13
- package/src/exporters/types.ts +18 -1
- package/src/exporters/xlsx-exporter.ts +176 -101
- package/src/orchestrator/templates/ai-instructions/claude-cmd-create-test.md +1 -1
- package/src/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +154 -67
- package/src/orchestrator/templates/ai-instructions/claude-skill-test-design-techniques.md +39 -0
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +1 -1
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +134 -61
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md +39 -0
- package/src/orchestrator/templates/playwright.config.ts +2 -0
- package/src/orchestrator/templates/specs-base.ts +1 -5
|
@@ -42,8 +42,12 @@ export function resolveTemplatePath(): string {
|
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export function buildPayload(
|
|
46
|
-
|
|
45
|
+
export function buildPayload(
|
|
46
|
+
cwd: string,
|
|
47
|
+
current: DashboardSnapshot,
|
|
48
|
+
historyLimit?: number,
|
|
49
|
+
): DashboardPayload {
|
|
50
|
+
const all = readHistory(cwd, historyLimit);
|
|
47
51
|
// Exclude `current` from history if it's been written there already.
|
|
48
52
|
const history = all.filter((s) => s.runId !== current.runId);
|
|
49
53
|
return { current, history };
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
import * as fs from 'fs';
|
|
15
15
|
import * as path from 'path';
|
|
16
16
|
import { execSync } from 'child_process';
|
|
17
|
+
import { parse as parseYaml } from 'yaml';
|
|
17
18
|
import { parseFeatureMetadata } from '../exporters/feature-parser';
|
|
18
19
|
import { parseSpecFile } from '../exporters/spec-parser';
|
|
19
20
|
import { loadTestData } from '../exporters/test-data-resolver';
|
|
@@ -99,11 +100,20 @@ function buildOneScreen(
|
|
|
99
100
|
const label = target.isFlow ? `flow/${target.name}` : target.name;
|
|
100
101
|
const specLink = fs.existsSync(specMdFile) ? path.relative(cwd, specMdFile) : undefined;
|
|
101
102
|
|
|
103
|
+
// Screens declare their URL inline in the .feature ("Path: /awards"). Flows
|
|
104
|
+
// don't have one there, so fall back to the first `type: 'page'` entry in
|
|
105
|
+
// the flow's selectors YAML — that's where the entry point is recorded.
|
|
106
|
+
let featurePath = feature.featurePath;
|
|
107
|
+
if (!featurePath && target.isFlow) {
|
|
108
|
+
const selectorsFile = path.join(base, 'selectors', `${target.name}.yaml`);
|
|
109
|
+
featurePath = readPagePathFromSelectors(selectorsFile);
|
|
110
|
+
}
|
|
111
|
+
|
|
102
112
|
return buildScreenSnapshot({
|
|
103
113
|
screen: label,
|
|
104
114
|
isFlow: target.isFlow,
|
|
105
115
|
featureName: feature.featureName,
|
|
106
|
-
featurePath
|
|
116
|
+
featurePath,
|
|
107
117
|
specLink,
|
|
108
118
|
merged,
|
|
109
119
|
testData,
|
|
@@ -125,7 +135,7 @@ function aggregateSummary(screens: ScreenSnapshot[]): AggregateSummary {
|
|
|
125
135
|
na: 0,
|
|
126
136
|
notCompiled: 0,
|
|
127
137
|
passRate: 0,
|
|
128
|
-
byPriority: {
|
|
138
|
+
byPriority: { High: 0, Normal: 0, Low: 0 },
|
|
129
139
|
byCategory: { Accessing: 0, GUI: 0, Function: 0 },
|
|
130
140
|
byType: { Auto: 0, Manual: 0, 'Not compiled': 0 },
|
|
131
141
|
};
|
|
@@ -269,5 +279,29 @@ function collectEnvironment(cwd: string, env: EnvironmentInfo) {
|
|
|
269
279
|
};
|
|
270
280
|
}
|
|
271
281
|
|
|
282
|
+
/**
|
|
283
|
+
* Read the entry-point path for a flow from its selectors YAML. We pick the
|
|
284
|
+
* first selector whose `type` is `page` — that's the convention sungen uses
|
|
285
|
+
* for the page-selector block in flow YAML files. Returns undefined when the
|
|
286
|
+
* file is missing or has no page entry.
|
|
287
|
+
*/
|
|
288
|
+
function readPagePathFromSelectors(selectorsFile: string): string | undefined {
|
|
289
|
+
if (!fs.existsSync(selectorsFile)) return undefined;
|
|
290
|
+
try {
|
|
291
|
+
const raw = fs.readFileSync(selectorsFile, 'utf-8');
|
|
292
|
+
const parsed = parseYaml(raw);
|
|
293
|
+
if (!parsed || typeof parsed !== 'object') return undefined;
|
|
294
|
+
for (const value of Object.values(parsed as Record<string, unknown>)) {
|
|
295
|
+
if (value && typeof value === 'object' && (value as { type?: string }).type === 'page') {
|
|
296
|
+
const v = (value as { value?: unknown }).value;
|
|
297
|
+
if (typeof v === 'string' && v.length > 0) return v;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
} catch {
|
|
301
|
+
// Malformed YAML — fall through to undefined.
|
|
302
|
+
}
|
|
303
|
+
return undefined;
|
|
304
|
+
}
|
|
305
|
+
|
|
272
306
|
// Helper for ScenarioSnapshot tree filters in UI (re-exported for callers)
|
|
273
307
|
export type { ScenarioSnapshot };
|