donobu 5.41.0 → 5.41.1
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/donobu-cli.js +142 -163
- package/dist/esm/cli/donobu-cli.js +142 -163
- package/dist/esm/main.d.ts +0 -1
- package/dist/esm/main.js +1 -3
- package/dist/main.d.ts +0 -1
- package/dist/main.js +1 -3
- package/package.json +2 -8
- package/dist/cli/generate-site-tests.d.ts +0 -2
- package/dist/cli/generate-site-tests.js +0 -43
- package/dist/codegen/runGenerateSiteTests.d.ts +0 -69
- package/dist/codegen/runGenerateSiteTests.js +0 -937
- package/dist/esm/cli/generate-site-tests.d.ts +0 -2
- package/dist/esm/cli/generate-site-tests.js +0 -43
- package/dist/esm/codegen/runGenerateSiteTests.d.ts +0 -69
- package/dist/esm/codegen/runGenerateSiteTests.js +0 -937
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* Thin CLI wrapper for Donobu Site Test Generator.
|
|
5
|
-
*/
|
|
6
|
-
const commander_1 = require("commander");
|
|
7
|
-
const runGenerateSiteTests_1 = require("../codegen/runGenerateSiteTests");
|
|
8
|
-
async function main() {
|
|
9
|
-
const program = new commander_1.Command();
|
|
10
|
-
program
|
|
11
|
-
.requiredOption('--url <url>', 'Target website URL')
|
|
12
|
-
.option('--storage-state <path>', 'Path to Playwright storageState JSON')
|
|
13
|
-
.option('--out <dir>', 'Output directory for the generated project', undefined)
|
|
14
|
-
.option('--max-tests <n>', 'Maximum number of tests to generate', String(12))
|
|
15
|
-
.option('--max-discovery-steps <n>', 'Max Donobu tool calls when profiling the site', String(32))
|
|
16
|
-
.option('--max-test-steps <n>', 'Max Donobu tool calls when executing each test flow', String(28))
|
|
17
|
-
.option('--gpt-config-name <name>', 'Name of the GPT config to use')
|
|
18
|
-
.option('--playwright-variant <variant>', 'Use "ai" (page.ai) or "classic" scripts in the generated project', 'ai')
|
|
19
|
-
.option('--headed', 'Generate headed Playwright config (xvfb-friendly)', false)
|
|
20
|
-
.option('--slowmo <ms>', 'Slow motion delay in ms for headed runs', (value) => Number(value))
|
|
21
|
-
.option('--disable-self-heal', 'Disable Donobu self-healing in generated AI-mode tests', false);
|
|
22
|
-
const cli = program.parse(process.argv).opts();
|
|
23
|
-
await (0, runGenerateSiteTests_1.runGenerateSiteTests)({
|
|
24
|
-
url: cli.url,
|
|
25
|
-
outDir: cli.outDir,
|
|
26
|
-
storageStatePath: cli.storageStatePath,
|
|
27
|
-
maxTests: cli.maxTests ? Number(cli.maxTests) : undefined,
|
|
28
|
-
maxDiscoverySteps: cli.maxDiscoverySteps
|
|
29
|
-
? Number(cli.maxDiscoverySteps)
|
|
30
|
-
: undefined,
|
|
31
|
-
maxTestSteps: cli.maxTestSteps ? Number(cli.maxTestSteps) : undefined,
|
|
32
|
-
gptConfigName: cli.gptConfigName,
|
|
33
|
-
playwrightVariant: cli.playwrightVariant,
|
|
34
|
-
headed: cli.headed,
|
|
35
|
-
slowMo: cli.slowMo,
|
|
36
|
-
disableSelfHeal: cli.disableSelfHeal,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
void main().catch((error) => {
|
|
40
|
-
console.error(error.message);
|
|
41
|
-
process.exit(1);
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=generate-site-tests.js.map
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Library entrypoint for Donobu Site Test Generator (coverage-aware).
|
|
3
|
-
*
|
|
4
|
-
* Use `runGenerateSiteTests(options, onProgress?, shouldCancel?)` to invoke programmatically.
|
|
5
|
-
*/
|
|
6
|
-
type DiscoveryTestCase = {
|
|
7
|
-
title: string;
|
|
8
|
-
objective: string;
|
|
9
|
-
assertions: string[];
|
|
10
|
-
category?: string;
|
|
11
|
-
startUrl?: string;
|
|
12
|
-
dependsOnAuth?: boolean;
|
|
13
|
-
dataNeeds?: string[];
|
|
14
|
-
priority?: 'P0' | 'P1' | 'P2';
|
|
15
|
-
};
|
|
16
|
-
type DiscoveryResult = {
|
|
17
|
-
siteProfile: {
|
|
18
|
-
siteType: string;
|
|
19
|
-
primaryAudiences: string[];
|
|
20
|
-
requiresAuth: boolean;
|
|
21
|
-
authNotes?: string;
|
|
22
|
-
keyJourneys: string[];
|
|
23
|
-
riskAreas: string[];
|
|
24
|
-
};
|
|
25
|
-
testCases: DiscoveryTestCase[];
|
|
26
|
-
};
|
|
27
|
-
export type GenerateSiteTestsOptions = {
|
|
28
|
-
url: string;
|
|
29
|
-
outDir?: string;
|
|
30
|
-
storageStatePath?: string;
|
|
31
|
-
maxTests?: number;
|
|
32
|
-
maxDiscoverySteps?: number;
|
|
33
|
-
maxTestSteps?: number;
|
|
34
|
-
gptConfigName?: string;
|
|
35
|
-
playwrightVariant?: 'ai' | 'classic';
|
|
36
|
-
headed?: boolean;
|
|
37
|
-
slowMo?: number;
|
|
38
|
-
disableSelfHeal?: boolean;
|
|
39
|
-
/** Explicit tool allowlist for discovery and test flows. If provided, only these tools are enabled. */
|
|
40
|
-
toolAllowlist?: string[];
|
|
41
|
-
/** Tool denylist to disable specific tools. Applied after allowlist. */
|
|
42
|
-
toolDenylist?: string[];
|
|
43
|
-
};
|
|
44
|
-
export type ProgressEvent = {
|
|
45
|
-
type: 'log';
|
|
46
|
-
level?: 'info' | 'warn' | 'error';
|
|
47
|
-
message: string;
|
|
48
|
-
} | {
|
|
49
|
-
type: 'flow';
|
|
50
|
-
stage: 'start' | 'end';
|
|
51
|
-
flowId: string;
|
|
52
|
-
name?: string;
|
|
53
|
-
} | {
|
|
54
|
-
type: 'stdout';
|
|
55
|
-
data: string;
|
|
56
|
-
} | {
|
|
57
|
-
type: 'summary';
|
|
58
|
-
data: {
|
|
59
|
-
projectDir: string;
|
|
60
|
-
newlyGeneratedTests: number;
|
|
61
|
-
totalPlannedTests: number;
|
|
62
|
-
requiresAuth: boolean;
|
|
63
|
-
usedStorageState: boolean;
|
|
64
|
-
siteProfile?: DiscoveryResult['siteProfile'];
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
export declare function runGenerateSiteTests(opts: GenerateSiteTestsOptions, onProgress?: (event: ProgressEvent) => void, shouldCancel?: () => boolean): Promise<void>;
|
|
68
|
-
export {};
|
|
69
|
-
//# sourceMappingURL=runGenerateSiteTests.d.ts.map
|