qa360 2.3.0 → 2.3.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/README.md +155 -262
- package/{cli/dist → dist}/commands/ai.js +1 -1
- package/{cli/dist → dist}/commands/coverage.js +1 -1
- package/{cli/dist → dist}/commands/crawl.js +2 -2
- package/{cli/dist → dist}/commands/doctor.js +2 -2
- package/{cli/dist → dist}/commands/explain.js +2 -2
- package/{cli/dist → dist}/commands/flakiness.js +1 -1
- package/{cli/dist → dist}/commands/generate.js +1 -1
- package/{cli/dist → dist}/commands/history.js +1 -1
- package/{cli/dist → dist}/commands/monitor.js +3 -3
- package/{cli/dist → dist}/commands/ollama.js +1 -1
- package/{cli/dist → dist}/commands/pack.js +2 -2
- package/{cli/dist → dist}/commands/regression.js +1 -1
- package/{cli/dist → dist}/commands/repair.js +1 -1
- package/{cli/dist → dist}/commands/retry.js +1 -1
- package/{cli/dist → dist}/commands/run.d.ts +1 -1
- package/{cli/dist → dist}/commands/run.js +1 -1
- package/{cli/dist → dist}/commands/secrets.js +1 -1
- package/{cli/dist → dist}/commands/serve.js +1 -1
- package/{cli/dist → dist}/commands/slo.js +1 -1
- package/{cli/dist → dist}/commands/verify.js +1 -1
- package/{cli/dist → dist}/core/adapters/playwright-native-api.d.ts +2 -0
- package/{cli/dist → dist}/core/adapters/playwright-native-api.js +20 -1
- package/{cli/dist → dist}/core/adapters/playwright-ui.d.ts +21 -0
- package/dist/core/adapters/playwright-ui.js +2050 -0
- package/{cli/dist → dist}/core/ai/ollama-provider.js +15 -3
- package/{cli/dist → dist}/core/artifacts/ui-artifacts.js +24 -4
- package/dist/core/auth/backup-codes-provider.d.ts +91 -0
- package/dist/core/auth/backup-codes-provider.js +215 -0
- package/{cli/dist → dist}/core/auth/basic-auth-provider.d.ts +6 -0
- package/{cli/dist → dist}/core/auth/basic-auth-provider.js +24 -6
- package/dist/core/auth/digest-auth-provider.d.ts +116 -0
- package/dist/core/auth/digest-auth-provider.js +244 -0
- package/dist/core/auth/hcaptcha-handler.d.ts +103 -0
- package/dist/core/auth/hcaptcha-handler.js +288 -0
- package/{cli/dist → dist}/core/auth/index.d.ts +81 -4
- package/{cli/dist → dist}/core/auth/index.js +15 -1
- package/dist/core/auth/oauth-handler.d.ts +408 -0
- package/dist/core/auth/oauth-handler.js +636 -0
- package/{cli/dist → dist}/core/auth/oauth2-provider.d.ts +9 -0
- package/dist/core/auth/oauth2-provider.js +227 -0
- package/dist/core/auth/otp-provider.d.ts +93 -0
- package/dist/core/auth/otp-provider.js +288 -0
- package/dist/core/auth/recaptcha-handler.d.ts +119 -0
- package/dist/core/auth/recaptcha-handler.js +301 -0
- package/dist/core/auth/remember-me-handler.d.ts +142 -0
- package/dist/core/auth/remember-me-handler.js +255 -0
- package/dist/core/auth/saml-handler.d.ts +173 -0
- package/dist/core/auth/saml-handler.js +364 -0
- package/dist/core/auth/webauthn-handler.d.ts +182 -0
- package/dist/core/auth/webauthn-handler.js +310 -0
- package/dist/core/crawler/advanced-interactions.d.ts +342 -0
- package/dist/core/crawler/advanced-interactions.js +1069 -0
- package/dist/core/crawler/blob-url-download-handler.d.ts +145 -0
- package/dist/core/crawler/blob-url-download-handler.js +392 -0
- package/dist/core/crawler/consent-handler.d.ts +49 -0
- package/dist/core/crawler/consent-handler.js +258 -0
- package/dist/core/crawler/cookie-manager.d.ts +166 -0
- package/dist/core/crawler/cookie-manager.js +353 -0
- package/dist/core/crawler/coop-coep-handler.d.ts +136 -0
- package/dist/core/crawler/coop-coep-handler.js +338 -0
- package/dist/core/crawler/csp-handler.d.ts +151 -0
- package/dist/core/crawler/csp-handler.js +415 -0
- package/dist/core/crawler/download-handler.d.ts +155 -0
- package/dist/core/crawler/download-handler.js +370 -0
- package/dist/core/crawler/email-testing-handler.d.ts +214 -0
- package/dist/core/crawler/email-testing-handler.js +398 -0
- package/dist/core/crawler/error-tracking-handler.d.ts +177 -0
- package/dist/core/crawler/error-tracking-handler.js +378 -0
- package/dist/core/crawler/form-handler.d.ts +100 -0
- package/dist/core/crawler/form-handler.js +465 -0
- package/dist/core/crawler/framework-wait-handler.d.ts +96 -0
- package/dist/core/crawler/framework-wait-handler.js +464 -0
- package/dist/core/crawler/geolocation-handler.d.ts +112 -0
- package/dist/core/crawler/geolocation-handler.js +276 -0
- package/dist/core/crawler/index.d.ts +78 -0
- package/{cli/dist → dist}/core/crawler/index.js +74 -1
- package/dist/core/crawler/intelligent-selector-generator.d.ts +164 -0
- package/dist/core/crawler/intelligent-selector-generator.js +612 -0
- package/{cli/dist → dist}/core/crawler/journey-generator.js +44 -1
- package/{cli/dist → dist}/core/crawler/page-analyzer.d.ts +16 -1
- package/{cli/dist → dist}/core/crawler/page-analyzer.js +469 -17
- package/dist/core/crawler/permissions-handler.d.ts +112 -0
- package/dist/core/crawler/permissions-handler.js +236 -0
- package/dist/core/crawler/permissions-policy-handler.d.ts +113 -0
- package/dist/core/crawler/permissions-policy-handler.js +402 -0
- package/dist/core/crawler/presets.d.ts +100 -0
- package/dist/core/crawler/presets.js +887 -0
- package/dist/core/crawler/repl-debug-handler.d.ts +105 -0
- package/dist/core/crawler/repl-debug-handler.js +552 -0
- package/dist/core/crawler/reporting-api-handler.d.ts +212 -0
- package/dist/core/crawler/reporting-api-handler.js +344 -0
- package/{cli/dist → dist}/core/crawler/selector-generator.d.ts +9 -0
- package/{cli/dist → dist}/core/crawler/selector-generator.js +99 -23
- package/dist/core/crawler/site-profiler.d.ts +89 -0
- package/dist/core/crawler/site-profiler.js +290 -0
- package/dist/core/crawler/sourcemaps-handler.d.ts +144 -0
- package/dist/core/crawler/sourcemaps-handler.js +420 -0
- package/dist/core/crawler/stacked-modals-handler.d.ts +118 -0
- package/dist/core/crawler/stacked-modals-handler.js +429 -0
- package/dist/core/crawler/trusted-types-handler.d.ts +149 -0
- package/dist/core/crawler/trusted-types-handler.js +413 -0
- package/{cli/dist → dist}/core/crawler/types.d.ts +68 -2
- package/dist/core/crawler/wait-strategies.d.ts +108 -0
- package/dist/core/crawler/wait-strategies.js +399 -0
- package/dist/core/fixtures/factories.d.ts +180 -0
- package/dist/core/fixtures/factories.js +279 -0
- package/dist/core/fixtures/index.d.ts +6 -0
- package/dist/core/fixtures/index.js +6 -0
- package/{cli/dist → dist}/core/generation/crawler-pack-generator.d.ts +13 -3
- package/dist/core/generation/crawler-pack-generator.js +232 -0
- package/{cli/dist → dist}/core/generation/index.d.ts +2 -0
- package/{cli/dist → dist}/core/generation/index.js +2 -0
- package/{cli/dist → dist}/core/index.d.ts +2 -0
- package/{cli/dist → dist}/core/index.js +4 -0
- package/dist/core/network/index.d.ts +7 -0
- package/dist/core/network/index.js +7 -0
- package/dist/core/network/network-manager.d.ts +237 -0
- package/dist/core/network/network-manager.js +343 -0
- package/dist/core/network/network-simulator.d.ts +158 -0
- package/dist/core/network/network-simulator.js +261 -0
- package/{cli/dist → dist}/core/pack/validator.js +2 -2
- package/{cli/dist → dist}/core/pack-v2/migrator.d.ts +5 -0
- package/{cli/dist → dist}/core/pack-v2/migrator.js +81 -6
- package/{cli/dist → dist}/core/pack-v2/validator.js +4 -3
- package/{cli/dist → dist}/core/pom/base-page.js +1 -1
- package/{cli/dist → dist}/core/pom/loader.js +1 -1
- package/dist/core/reporting/index.d.ts +9 -0
- package/dist/core/reporting/index.js +10 -0
- package/dist/core/reporting/junit-reporter.d.ts +114 -0
- package/dist/core/reporting/junit-reporter.js +306 -0
- package/{cli/dist → dist}/core/runner/e2e-helpers.d.ts +1 -1
- package/{cli/dist → dist}/core/runner/e2e-helpers.js +2 -2
- package/{cli/dist → dist}/core/runner/phase3-runner.d.ts +3 -0
- package/{cli/dist → dist}/core/runner/phase3-runner.js +45 -14
- package/dist/core/sharding/test-sharding.d.ts +137 -0
- package/dist/core/sharding/test-sharding.js +233 -0
- package/dist/core/storage/cookie-manager.d.ts +160 -0
- package/dist/core/storage/cookie-manager.js +268 -0
- package/dist/core/storage/index.d.ts +7 -0
- package/dist/core/storage/index.js +7 -0
- package/dist/core/storage/storage-helpers.d.ts +138 -0
- package/dist/core/storage/storage-helpers.js +315 -0
- package/dist/core/test-helpers/index.d.ts +6 -0
- package/dist/core/test-helpers/index.js +6 -0
- package/dist/core/test-helpers/state-reset.d.ts +119 -0
- package/dist/core/test-helpers/state-reset.js +234 -0
- package/{cli/dist → dist}/core/types/pack-v1.d.ts +15 -2
- package/{cli/dist → dist}/core/types/pack-v2.d.ts +1 -1
- package/dist/core/upload/chunked-uploader.d.ts +150 -0
- package/dist/core/upload/chunked-uploader.js +289 -0
- package/dist/core/upload/index.d.ts +11 -0
- package/dist/core/upload/index.js +8 -0
- package/dist/core/upload/mime-validator.d.ts +119 -0
- package/dist/core/upload/mime-validator.js +373 -0
- package/dist/core/upload/presigned-uploader.d.ts +118 -0
- package/dist/core/upload/presigned-uploader.js +274 -0
- package/dist/core/utils/device-emulation.d.ts +194 -0
- package/dist/core/utils/device-emulation.js +380 -0
- package/dist/core/utils/index.d.ts +8 -0
- package/dist/core/utils/index.js +8 -0
- package/dist/core/utils/retry.d.ts +145 -0
- package/dist/core/utils/retry.js +242 -0
- package/dist/core/utils/smart-wait.d.ts +133 -0
- package/dist/core/utils/smart-wait.js +417 -0
- package/dist/core/visual/index.d.ts +7 -0
- package/dist/core/visual/index.js +7 -0
- package/dist/core/visual/pixel-diff.d.ts +87 -0
- package/dist/core/visual/pixel-diff.js +213 -0
- package/dist/core/visual/screenshot-helper.d.ts +130 -0
- package/dist/core/visual/screenshot-helper.js +223 -0
- package/{cli/dist → dist}/utils/config.d.ts +1 -1
- package/examples/README.md +160 -0
- package/examples/accessibility.yml +48 -0
- package/examples/api-basic.yml +27 -0
- package/examples/complete.yml +146 -0
- package/examples/crawler.yml +38 -0
- package/examples/fullstack.yml +78 -0
- package/examples/security.yml +58 -0
- package/examples/ui-advanced.yml +49 -0
- package/examples/ui-basic.yml +24 -0
- package/package.json +33 -67
- package/CHANGELOG.md +0 -330
- package/CONTRIBUTING.md +0 -273
- package/QUICK_START.md +0 -191
- package/cli/CHANGELOG.md +0 -84
- package/cli/LICENSE +0 -24
- package/cli/README.md +0 -222
- package/cli/dist/core/adapters/playwright-ui.js +0 -864
- package/cli/dist/core/auth/oauth2-provider.js +0 -114
- package/cli/dist/core/coverage/analyzer.d.ts +0 -101
- package/cli/dist/core/coverage/analyzer.js +0 -415
- package/cli/dist/core/coverage/collector.d.ts +0 -74
- package/cli/dist/core/coverage/collector.js +0 -459
- package/cli/dist/core/coverage/config.d.ts +0 -37
- package/cli/dist/core/coverage/config.js +0 -156
- package/cli/dist/core/coverage/index.d.ts +0 -11
- package/cli/dist/core/coverage/index.js +0 -15
- package/cli/dist/core/coverage/types.d.ts +0 -267
- package/cli/dist/core/coverage/types.js +0 -6
- package/cli/dist/core/coverage/vault.d.ts +0 -95
- package/cli/dist/core/coverage/vault.js +0 -405
- package/cli/dist/core/crawler/index.d.ts +0 -57
- package/cli/dist/core/fixtures/index.d.ts +0 -8
- package/cli/dist/core/fixtures/index.js +0 -8
- package/cli/dist/core/generation/crawler-pack-generator.js +0 -231
- package/cli/dist/core/reporting/index.d.ts +0 -6
- package/cli/dist/core/reporting/index.js +0 -6
- package/cli/dist/core/visual/index.d.ts +0 -6
- package/cli/dist/core/visual/index.js +0 -6
- package/cli/package.json +0 -76
- package/core/LICENSE +0 -24
- package/core/README.md +0 -105
- package/core/package.json +0 -90
- package/core/schemas/pack.schema.json +0 -236
- /package/{cli/bin → bin}/qa360.js +0 -0
- /package/{cli/dist → dist}/cli-minimal.d.ts +0 -0
- /package/{cli/dist → dist}/cli-minimal.js +0 -0
- /package/{cli/dist → dist}/commands/ai.d.ts +0 -0
- /package/{cli/dist → dist}/commands/ask.d.ts +0 -0
- /package/{cli/dist → dist}/commands/ask.js +0 -0
- /package/{cli/dist → dist}/commands/coverage.d.ts +0 -0
- /package/{cli/dist → dist}/commands/crawl.d.ts +0 -0
- /package/{cli/dist → dist}/commands/doctor.d.ts +0 -0
- /package/{cli/dist → dist}/commands/examples.d.ts +0 -0
- /package/{cli/dist → dist}/commands/examples.js +0 -0
- /package/{cli/dist → dist}/commands/explain.d.ts +0 -0
- /package/{cli/dist → dist}/commands/flakiness.d.ts +0 -0
- /package/{cli/dist → dist}/commands/generate.d.ts +0 -0
- /package/{cli/dist → dist}/commands/history.d.ts +0 -0
- /package/{cli/dist → dist}/commands/init.d.ts +0 -0
- /package/{cli/dist → dist}/commands/init.js +0 -0
- /package/{cli/dist → dist}/commands/monitor.d.ts +0 -0
- /package/{cli/dist → dist}/commands/ollama.d.ts +0 -0
- /package/{cli/dist → dist}/commands/pack.d.ts +0 -0
- /package/{cli/dist → dist}/commands/regression.d.ts +0 -0
- /package/{cli/dist → dist}/commands/repair.d.ts +0 -0
- /package/{cli/dist → dist}/commands/report.d.ts +0 -0
- /package/{cli/dist → dist}/commands/report.js +0 -0
- /package/{cli/dist → dist}/commands/retry.d.ts +0 -0
- /package/{cli/dist → dist}/commands/scan.d.ts +0 -0
- /package/{cli/dist → dist}/commands/scan.js +0 -0
- /package/{cli/dist → dist}/commands/secrets.d.ts +0 -0
- /package/{cli/dist → dist}/commands/serve.d.ts +0 -0
- /package/{cli/dist → dist}/commands/slo.d.ts +0 -0
- /package/{cli/dist → dist}/commands/verify.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/gitleaks-secrets.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/gitleaks-secrets.js +0 -0
- /package/{cli/dist → dist}/core/adapters/jest-adapter.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/jest-adapter.js +0 -0
- /package/{cli/dist → dist}/core/adapters/k6-perf.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/k6-perf.js +0 -0
- /package/{cli/dist → dist}/core/adapters/osv-deps.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/osv-deps.js +0 -0
- /package/{cli/dist → dist}/core/adapters/playwright-native-adapter.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/playwright-native-adapter.js +0 -0
- /package/{cli/dist → dist}/core/adapters/pytest-adapter.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/pytest-adapter.js +0 -0
- /package/{cli/dist → dist}/core/adapters/semgrep-sast.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/semgrep-sast.js +0 -0
- /package/{cli/dist → dist}/core/adapters/unit-test-types.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/unit-test-types.js +0 -0
- /package/{cli/dist → dist}/core/adapters/vitest-adapter.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/vitest-adapter.js +0 -0
- /package/{cli/dist → dist}/core/adapters/zap-dast.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/zap-dast.js +0 -0
- /package/{cli/dist → dist}/core/ai/anthropic-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/anthropic-provider.js +0 -0
- /package/{cli/dist → dist}/core/ai/deepseek-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/deepseek-provider.js +0 -0
- /package/{cli/dist → dist}/core/ai/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/index.js +0 -0
- /package/{cli/dist → dist}/core/ai/llm-client.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/llm-client.js +0 -0
- /package/{cli/dist → dist}/core/ai/mock-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/mock-provider.js +0 -0
- /package/{cli/dist → dist}/core/ai/ollama-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/openai-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/openai-provider.js +0 -0
- /package/{cli/dist → dist}/core/ai/provider-factory.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/provider-factory.js +0 -0
- /package/{cli/dist → dist}/core/artifacts/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/artifacts/index.js +0 -0
- /package/{cli/dist → dist}/core/artifacts/ui-artifacts.d.ts +0 -0
- /package/{cli/dist → dist}/core/assertions/engine.d.ts +0 -0
- /package/{cli/dist → dist}/core/assertions/engine.js +0 -0
- /package/{cli/dist → dist}/core/assertions/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/assertions/index.js +0 -0
- /package/{cli/dist → dist}/core/assertions/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/assertions/types.js +0 -0
- /package/{cli/dist → dist}/core/auth/api-key-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/api-key-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/aws-iam-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/aws-iam-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/azure-ad-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/azure-ad-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/gcp-adc-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/gcp-adc-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/jwt-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/jwt-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/manager.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/manager.js +0 -0
- /package/{cli/dist → dist}/core/auth/totp-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/totp-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/ui-login-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/ui-login-provider.js +0 -0
- /package/{cli/dist → dist}/core/cache/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/cache/index.js +0 -0
- /package/{cli/dist → dist}/core/cache/lru-cache.d.ts +0 -0
- /package/{cli/dist → dist}/core/cache/lru-cache.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/analyzer.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/analyzer.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/collector.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/collector.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/config.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/config.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/index.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/index.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/types.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/types.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/vault.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/vault.js +0 -0
- /package/{cli/dist → dist}/core/crawler/journey-generator.d.ts +0 -0
- /package/{cli/dist → dist}/core/crawler/types.js +0 -0
- /package/{cli/dist → dist}/core/dashboard/assets.d.ts +0 -0
- /package/{cli/dist → dist}/core/dashboard/assets.js +0 -0
- /package/{cli/dist → dist}/core/dashboard/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/dashboard/index.js +0 -0
- /package/{cli/dist → dist}/core/dashboard/server.d.ts +0 -0
- /package/{cli/dist → dist}/core/dashboard/server.js +0 -0
- /package/{cli/dist → dist}/core/dashboard/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/dashboard/types.js +0 -0
- /package/{cli/dist → dist}/core/discoverer/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/discoverer/index.js +0 -0
- /package/{cli/dist → dist}/core/fixtures/loader.d.ts +0 -0
- /package/{cli/dist → dist}/core/fixtures/loader.js +0 -0
- /package/{cli/dist → dist}/core/fixtures/resolver.d.ts +0 -0
- /package/{cli/dist → dist}/core/fixtures/resolver.js +0 -0
- /package/{cli/dist → dist}/core/fixtures/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/fixtures/types.js +0 -0
- /package/{cli/dist → dist}/core/flakiness/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/flakiness/index.js +0 -0
- /package/{cli/dist → dist}/core/generation/code-formatter.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/code-formatter.js +0 -0
- /package/{cli/dist → dist}/core/generation/code-generator.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/code-generator.js +0 -0
- /package/{cli/dist → dist}/core/generation/generator.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/generator.js +0 -0
- /package/{cli/dist → dist}/core/generation/pack-generator.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/pack-generator.js +0 -0
- /package/{cli/dist → dist}/core/generation/prompt-builder.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/prompt-builder.js +0 -0
- /package/{cli/dist → dist}/core/generation/source-analyzer.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/source-analyzer.js +0 -0
- /package/{cli/dist → dist}/core/generation/test-optimizer.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/test-optimizer.js +0 -0
- /package/{cli/dist → dist}/core/generation/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/types.js +0 -0
- /package/{cli/dist → dist}/core/hooks/compose.d.ts +0 -0
- /package/{cli/dist → dist}/core/hooks/compose.js +0 -0
- /package/{cli/dist → dist}/core/hooks/runner.d.ts +0 -0
- /package/{cli/dist → dist}/core/hooks/runner.js +0 -0
- /package/{cli/dist → dist}/core/pack/migrator.d.ts +0 -0
- /package/{cli/dist → dist}/core/pack/migrator.js +0 -0
- /package/{cli/dist → dist}/core/pack/validator.d.ts +0 -0
- /package/{cli/dist → dist}/core/pack-v2/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/pack-v2/index.js +0 -0
- /package/{cli/dist → dist}/core/pack-v2/loader.d.ts +0 -0
- /package/{cli/dist → dist}/core/pack-v2/loader.js +0 -0
- /package/{cli/dist → dist}/core/pack-v2/validator.d.ts +0 -0
- /package/{cli/dist → dist}/core/parallel/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/parallel/index.js +0 -0
- /package/{cli/dist → dist}/core/parallel/parallel-runner.d.ts +0 -0
- /package/{cli/dist → dist}/core/parallel/parallel-runner.js +0 -0
- /package/{cli/dist → dist}/core/pom/base-page.d.ts +0 -0
- /package/{cli/dist → dist}/core/pom/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/pom/index.js +0 -0
- /package/{cli/dist → dist}/core/pom/loader.d.ts +0 -0
- /package/{cli/dist → dist}/core/pom/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/pom/types.js +0 -0
- /package/{cli/dist → dist}/core/proof/bundle.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/bundle.js +0 -0
- /package/{cli/dist → dist}/core/proof/canonicalize.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/canonicalize.js +0 -0
- /package/{cli/dist → dist}/core/proof/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/index.js +0 -0
- /package/{cli/dist → dist}/core/proof/schema.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/schema.js +0 -0
- /package/{cli/dist → dist}/core/proof/signer.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/signer.js +0 -0
- /package/{cli/dist → dist}/core/proof/verifier.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/verifier.js +0 -0
- /package/{cli/dist → dist}/core/regression/detector.d.ts +0 -0
- /package/{cli/dist → dist}/core/regression/detector.js +0 -0
- /package/{cli/dist → dist}/core/regression/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/regression/index.js +0 -0
- /package/{cli/dist → dist}/core/regression/trend-analyzer.d.ts +0 -0
- /package/{cli/dist → dist}/core/regression/trend-analyzer.js +0 -0
- /package/{cli/dist → dist}/core/regression/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/regression/types.js +0 -0
- /package/{cli/dist → dist}/core/regression/vault.d.ts +0 -0
- /package/{cli/dist → dist}/core/regression/vault.js +0 -0
- /package/{cli/dist → dist}/core/repair/engine/fixer.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/engine/fixer.js +0 -0
- /package/{cli/dist → dist}/core/repair/engine/suggestion-engine.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/engine/suggestion-engine.js +0 -0
- /package/{cli/dist → dist}/core/repair/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/index.js +0 -0
- /package/{cli/dist → dist}/core/repair/repairer.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/repairer.js +0 -0
- /package/{cli/dist → dist}/core/repair/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/types.js +0 -0
- /package/{cli/dist → dist}/core/repair/utils/error-analyzer.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/utils/error-analyzer.js +0 -0
- /package/{cli/dist → dist}/core/reporting/html-reporter.d.ts +0 -0
- /package/{cli/dist → dist}/core/reporting/html-reporter.js +0 -0
- /package/{cli/dist → dist}/core/retry/flakiness-integration.d.ts +0 -0
- /package/{cli/dist → dist}/core/retry/flakiness-integration.js +0 -0
- /package/{cli/dist → dist}/core/retry/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/retry/index.js +0 -0
- /package/{cli/dist → dist}/core/retry/retry-engine.d.ts +0 -0
- /package/{cli/dist → dist}/core/retry/retry-engine.js +0 -0
- /package/{cli/dist → dist}/core/retry/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/retry/types.js +0 -0
- /package/{cli/dist → dist}/core/retry/vault.d.ts +0 -0
- /package/{cli/dist → dist}/core/retry/vault.js +0 -0
- /package/{cli/dist → dist}/core/schemas/pack.schema.json +0 -0
- /package/{cli/dist → dist}/core/secrets/crypto.d.ts +0 -0
- /package/{cli/dist → dist}/core/secrets/crypto.js +0 -0
- /package/{cli/dist → dist}/core/secrets/manager.d.ts +0 -0
- /package/{cli/dist → dist}/core/secrets/manager.js +0 -0
- /package/{cli/dist → dist}/core/security/redaction-patterns-extended.d.ts +0 -0
- /package/{cli/dist → dist}/core/security/redaction-patterns-extended.js +0 -0
- /package/{cli/dist → dist}/core/security/redactor.d.ts +0 -0
- /package/{cli/dist → dist}/core/security/redactor.js +0 -0
- /package/{cli/dist → dist}/core/self-healing/assertion-healer.d.ts +0 -0
- /package/{cli/dist → dist}/core/self-healing/assertion-healer.js +0 -0
- /package/{cli/dist → dist}/core/self-healing/engine.d.ts +0 -0
- /package/{cli/dist → dist}/core/self-healing/engine.js +0 -0
- /package/{cli/dist → dist}/core/self-healing/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/self-healing/index.js +0 -0
- /package/{cli/dist → dist}/core/self-healing/selector-healer.d.ts +0 -0
- /package/{cli/dist → dist}/core/self-healing/selector-healer.js +0 -0
- /package/{cli/dist → dist}/core/self-healing/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/self-healing/types.js +0 -0
- /package/{cli/dist → dist}/core/serve/diagnostics-collector.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/diagnostics-collector.js +0 -0
- /package/{cli/dist → dist}/core/serve/health-checker.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/health-checker.js +0 -0
- /package/{cli/dist → dist}/core/serve/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/index.js +0 -0
- /package/{cli/dist → dist}/core/serve/metrics-collector.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/metrics-collector.js +0 -0
- /package/{cli/dist → dist}/core/serve/process-manager.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/process-manager.js +0 -0
- /package/{cli/dist → dist}/core/serve/server.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/server.js +0 -0
- /package/{cli/dist → dist}/core/slo/config.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/config.js +0 -0
- /package/{cli/dist → dist}/core/slo/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/index.js +0 -0
- /package/{cli/dist → dist}/core/slo/sli-calculator.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/sli-calculator.js +0 -0
- /package/{cli/dist → dist}/core/slo/slo-tracker.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/slo-tracker.js +0 -0
- /package/{cli/dist → dist}/core/slo/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/types.js +0 -0
- /package/{cli/dist → dist}/core/slo/vault.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/vault.js +0 -0
- /package/{cli/dist → dist}/core/tui/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/tui/index.js +0 -0
- /package/{cli/dist → dist}/core/tui/monitor.d.ts +0 -0
- /package/{cli/dist → dist}/core/tui/monitor.js +0 -0
- /package/{cli/dist → dist}/core/tui/renderer.d.ts +0 -0
- /package/{cli/dist → dist}/core/tui/renderer.js +0 -0
- /package/{cli/dist → dist}/core/tui/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/tui/types.js +0 -0
- /package/{cli/dist → dist}/core/types/pack-v1.js +0 -0
- /package/{cli/dist → dist}/core/types/pack-v2.js +0 -0
- /package/{cli/dist → dist}/core/types/trust-score.d.ts +0 -0
- /package/{cli/dist → dist}/core/types/trust-score.js +0 -0
- /package/{cli/dist → dist}/core/vault/cas.d.ts +0 -0
- /package/{cli/dist → dist}/core/vault/cas.js +0 -0
- /package/{cli/dist → dist}/core/vault/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/vault/index.js +0 -0
- /package/{cli/dist → dist}/core/visual/visual-regression.d.ts +0 -0
- /package/{cli/dist → dist}/core/visual/visual-regression.js +0 -0
- /package/{cli/dist → dist}/core/watch/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/watch/index.js +0 -0
- /package/{cli/dist → dist}/core/watch/watch-mode.d.ts +0 -0
- /package/{cli/dist → dist}/core/watch/watch-mode.js +0 -0
- /package/{cli/dist → dist}/generators/index.d.ts +0 -0
- /package/{cli/dist → dist}/generators/index.js +0 -0
- /package/{cli/dist → dist}/generators/json-reporter.d.ts +0 -0
- /package/{cli/dist → dist}/generators/json-reporter.js +0 -0
- /package/{cli/dist → dist}/generators/test-generator.d.ts +0 -0
- /package/{cli/dist → dist}/generators/test-generator.js +0 -0
- /package/{cli/dist → dist}/index.d.ts +0 -0
- /package/{cli/dist → dist}/index.js +0 -0
- /package/{cli/dist → dist}/scanners/dom-scanner.d.ts +0 -0
- /package/{cli/dist → dist}/scanners/dom-scanner.js +0 -0
- /package/{cli/dist → dist}/scanners/index.d.ts +0 -0
- /package/{cli/dist → dist}/scanners/index.js +0 -0
- /package/{cli/dist → dist}/schemas/pack.schema.json +0 -0
- /package/{cli/dist → dist}/types/scan.d.ts +0 -0
- /package/{cli/dist → dist}/types/scan.js +0 -0
- /package/{cli/dist → dist}/utils/config.js +0 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QA360 Fixtures Module
|
|
3
|
+
*
|
|
4
|
+
* P0: Reusable test data and factory functions
|
|
5
|
+
* - Factories for creating test entities
|
|
6
|
+
* - Fake data generation
|
|
7
|
+
* - Seeded random for deterministic tests
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* User Factory
|
|
11
|
+
*/
|
|
12
|
+
export class UserFactory {
|
|
13
|
+
static counter = 1;
|
|
14
|
+
build(options) {
|
|
15
|
+
const counter = UserFactory.counter++;
|
|
16
|
+
const id = options?.overrides?.id || `user-${counter}`;
|
|
17
|
+
return {
|
|
18
|
+
id,
|
|
19
|
+
username: options?.overrides?.username || `user${counter}`,
|
|
20
|
+
email: options?.overrides?.email || `user${counter}@example.com`,
|
|
21
|
+
password: options?.overrides?.password || 'TestPassword123!',
|
|
22
|
+
firstName: options?.overrides?.firstName || 'Test',
|
|
23
|
+
lastName: options?.overrides?.lastName || `User${counter}`,
|
|
24
|
+
role: options?.overrides?.role || 'user',
|
|
25
|
+
active: options?.overrides?.active ?? true,
|
|
26
|
+
createdAt: options?.overrides?.createdAt || new Date(),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
buildMany(count, options) {
|
|
30
|
+
return Array.from({ length: count }, () => this.build(options));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create an admin user
|
|
34
|
+
*/
|
|
35
|
+
admin(options) {
|
|
36
|
+
return this.build({
|
|
37
|
+
...options,
|
|
38
|
+
overrides: { ...options?.overrides, role: 'admin' },
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create an inactive user
|
|
43
|
+
*/
|
|
44
|
+
inactive(options) {
|
|
45
|
+
return this.build({
|
|
46
|
+
...options,
|
|
47
|
+
overrides: { ...options?.overrides, active: false },
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Test Result Factory
|
|
53
|
+
*/
|
|
54
|
+
export class TestResultFactory {
|
|
55
|
+
static counter = 1;
|
|
56
|
+
build(options) {
|
|
57
|
+
const counter = TestResultFactory.counter++;
|
|
58
|
+
return {
|
|
59
|
+
id: options?.overrides?.id || `test-${counter}`,
|
|
60
|
+
name: options?.overrides?.name || `Test ${counter}`,
|
|
61
|
+
status: options?.overrides?.status || 'passed',
|
|
62
|
+
duration: options?.overrides?.duration || 100,
|
|
63
|
+
error: options?.overrides?.error,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
buildMany(count, options) {
|
|
67
|
+
return Array.from({ length: count }, () => this.build(options));
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Create a passed test
|
|
71
|
+
*/
|
|
72
|
+
passed(options) {
|
|
73
|
+
return this.build({
|
|
74
|
+
...options,
|
|
75
|
+
overrides: { ...options?.overrides, status: 'passed' },
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Create a failed test
|
|
80
|
+
*/
|
|
81
|
+
failed(options) {
|
|
82
|
+
return this.build({
|
|
83
|
+
...options,
|
|
84
|
+
overrides: {
|
|
85
|
+
...options?.overrides,
|
|
86
|
+
status: 'failed',
|
|
87
|
+
error: options?.overrides?.error || 'Test failed',
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Create a skipped test
|
|
93
|
+
*/
|
|
94
|
+
skipped(options) {
|
|
95
|
+
return this.build({
|
|
96
|
+
...options,
|
|
97
|
+
overrides: { ...options?.overrides, status: 'skipped' },
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* API Response Factory
|
|
103
|
+
*/
|
|
104
|
+
export class ApiResponseFactory {
|
|
105
|
+
build(options) {
|
|
106
|
+
return {
|
|
107
|
+
status: options?.overrides?.status || 200,
|
|
108
|
+
data: options?.overrides?.data,
|
|
109
|
+
error: options?.overrides?.error,
|
|
110
|
+
headers: options?.overrides?.headers || {},
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
buildMany(count, options) {
|
|
114
|
+
return Array.from({ length: count }, () => this.build(options));
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Create a success response
|
|
118
|
+
*/
|
|
119
|
+
success(data, options) {
|
|
120
|
+
return this.build({
|
|
121
|
+
...options,
|
|
122
|
+
overrides: { ...options?.overrides, status: 200, data },
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Create an error response
|
|
127
|
+
*/
|
|
128
|
+
error(status = 500, message, options) {
|
|
129
|
+
return this.build({
|
|
130
|
+
...options,
|
|
131
|
+
overrides: {
|
|
132
|
+
...options?.overrides,
|
|
133
|
+
status,
|
|
134
|
+
error: message || 'Internal Server Error',
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Create a not found response
|
|
140
|
+
*/
|
|
141
|
+
notFound(options) {
|
|
142
|
+
return this.error(404, 'Not Found', options);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Create an unauthorized response
|
|
146
|
+
*/
|
|
147
|
+
unauthorized(options) {
|
|
148
|
+
return this.error(401, 'Unauthorized', options);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Fake data generator with seeded random
|
|
153
|
+
*/
|
|
154
|
+
export class FakeData {
|
|
155
|
+
static seed = 12345;
|
|
156
|
+
/**
|
|
157
|
+
* Set the seed for deterministic random generation
|
|
158
|
+
*/
|
|
159
|
+
static setSeed(seed) {
|
|
160
|
+
this.seed = seed;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Seeded random number generator (Mulberry32)
|
|
164
|
+
*/
|
|
165
|
+
static random() {
|
|
166
|
+
this.seed |= 0;
|
|
167
|
+
this.seed = this.seed + 0x6D2B79F5;
|
|
168
|
+
let t = this.seed;
|
|
169
|
+
t = Math.imul(t ^ t >>> 15, t | 1);
|
|
170
|
+
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
|
171
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Generate a random integer between min and max (inclusive)
|
|
175
|
+
*/
|
|
176
|
+
static integer(min, max) {
|
|
177
|
+
return Math.floor(this.random() * (max - min + 1)) + min;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Generate a random float between min and max
|
|
181
|
+
*/
|
|
182
|
+
static float(min, max) {
|
|
183
|
+
return this.random() * (max - min) + min;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Generate a random string
|
|
187
|
+
*/
|
|
188
|
+
static string(length = 10, charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789') {
|
|
189
|
+
let result = '';
|
|
190
|
+
for (let i = 0; i < length; i++) {
|
|
191
|
+
result += charset[Math.floor(this.random() * charset.length)];
|
|
192
|
+
}
|
|
193
|
+
return result;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Generate a random email
|
|
197
|
+
*/
|
|
198
|
+
static email() {
|
|
199
|
+
const username = this.string(8).toLowerCase();
|
|
200
|
+
const domains = ['example.com', 'test.com', 'demo.com', 'mail.com'];
|
|
201
|
+
const domain = domains[this.integer(0, domains.length - 1)];
|
|
202
|
+
return `${username}@${domain}`;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Generate a random URL
|
|
206
|
+
*/
|
|
207
|
+
static url() {
|
|
208
|
+
const paths = ['users', 'posts', 'comments', 'products', 'orders'];
|
|
209
|
+
const path = paths[this.integer(0, paths.length - 1)];
|
|
210
|
+
const id = this.integer(1, 1000);
|
|
211
|
+
return `https://example.com/${path}/${id}`;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Generate a random UUID v4
|
|
215
|
+
*/
|
|
216
|
+
static uuid() {
|
|
217
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
218
|
+
const r = (this.random() * 16) | 0;
|
|
219
|
+
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
220
|
+
return v.toString(16);
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Generate a random date
|
|
225
|
+
*/
|
|
226
|
+
static date(minYear = 2020, maxYear = 2030) {
|
|
227
|
+
const year = this.integer(minYear, maxYear);
|
|
228
|
+
const month = this.integer(0, 11);
|
|
229
|
+
const day = this.integer(1, 28);
|
|
230
|
+
return new Date(year, month, day);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Generate a random boolean
|
|
234
|
+
*/
|
|
235
|
+
static boolean() {
|
|
236
|
+
return this.random() > 0.5;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Pick a random element from an array
|
|
240
|
+
*/
|
|
241
|
+
static pick(array) {
|
|
242
|
+
return array[this.integer(0, array.length - 1)];
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Generate a random name
|
|
246
|
+
*/
|
|
247
|
+
static name() {
|
|
248
|
+
const firstNames = ['Alice', 'Bob', 'Charlie', 'Diana', 'Eve', 'Frank', 'Grace', 'Henry'];
|
|
249
|
+
const lastNames = ['Smith', 'Johnson', 'Williams', 'Brown', 'Jones', 'Garcia', 'Miller', 'Davis'];
|
|
250
|
+
return `${this.pick(firstNames)} ${this.pick(lastNames)}`;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Generate a random paragraph
|
|
254
|
+
*/
|
|
255
|
+
static paragraph(sentences = 3) {
|
|
256
|
+
const words = [
|
|
257
|
+
'lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur', 'adipiscing', 'elit',
|
|
258
|
+
'sed', 'do', 'eiusmod', 'tempor', 'incididunt', 'ut', 'labore', 'et', 'dolore',
|
|
259
|
+
'magna', 'aliqua', 'ut', 'enim', 'ad', 'minim', 'veniam', 'quis', 'nostrud',
|
|
260
|
+
];
|
|
261
|
+
const result = [];
|
|
262
|
+
for (let i = 0; i < sentences; i++) {
|
|
263
|
+
const sentenceWords = this.integer(5, 15);
|
|
264
|
+
const sentence = [];
|
|
265
|
+
for (let j = 0; j < sentenceWords; j++) {
|
|
266
|
+
sentence.push(this.pick(words));
|
|
267
|
+
}
|
|
268
|
+
sentence[0] = sentence[0].charAt(0).toUpperCase() + sentence[0].slice(1);
|
|
269
|
+
result.push(sentence.join(' ') + '.');
|
|
270
|
+
}
|
|
271
|
+
return result.join(' ');
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Convenience functions
|
|
276
|
+
*/
|
|
277
|
+
export const userFactory = new UserFactory();
|
|
278
|
+
export const testResultFactory = new TestResultFactory();
|
|
279
|
+
export const apiResponseFactory = new ApiResponseFactory();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QA360 Fixtures Module
|
|
3
|
+
*
|
|
4
|
+
* P0: Reusable test data and factory functions
|
|
5
|
+
*/
|
|
6
|
+
export { UserFactory, TestResultFactory, ApiResponseFactory, FakeData, userFactory, testResultFactory, apiResponseFactory, type User, type TestResult, type ApiResponse, type Factory, type FactoryOptions, } from './factories.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* QA360 Crawler Pack Generator
|
|
3
3
|
*
|
|
4
|
-
* Crawls a website and generates a complete pack.yml
|
|
4
|
+
* Crawls a website and generates a complete pack.yml in v2 format
|
|
5
5
|
*/
|
|
6
|
-
import type { CrawlOptions, CrawlResult } from '../crawler/index.js';
|
|
6
|
+
import type { CrawlOptions, CrawlResult, CrawlPresetConfig } from '../crawler/index.js';
|
|
7
7
|
/**
|
|
8
8
|
* Crawler Pack Generator Options
|
|
9
9
|
*/
|
|
@@ -24,9 +24,19 @@ export interface CrawlerPackGeneratorOptions {
|
|
|
24
24
|
includeSecurity?: boolean;
|
|
25
25
|
/** Custom journey names */
|
|
26
26
|
journeyNames?: Record<string, string>;
|
|
27
|
+
/** Phase 1: Preset for platform-specific crawling */
|
|
28
|
+
preset?: CrawlPresetConfig;
|
|
29
|
+
/** Phase 1: Authentication configuration */
|
|
30
|
+
auth?: {
|
|
31
|
+
email?: string;
|
|
32
|
+
password?: string;
|
|
33
|
+
url?: string;
|
|
34
|
+
};
|
|
35
|
+
/** Phase 1: Scenario to focus on */
|
|
36
|
+
scenario?: 'login' | 'browse' | 'search' | 'checkout' | 'dashboard' | 'profile';
|
|
27
37
|
}
|
|
28
38
|
/**
|
|
29
|
-
* Generate pack.yml from crawled website
|
|
39
|
+
* Generate pack.yml from crawled website (Phase 1: Enhanced with preset and auth support)
|
|
30
40
|
*/
|
|
31
41
|
export declare function generatePackFromCrawl(options: CrawlerPackGeneratorOptions): Promise<{
|
|
32
42
|
success: boolean;
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QA360 Crawler Pack Generator
|
|
3
|
+
*
|
|
4
|
+
* Crawls a website and generates a complete pack.yml in v2 format
|
|
5
|
+
*/
|
|
6
|
+
import { writeFileSync, mkdirSync, existsSync } from 'fs';
|
|
7
|
+
import { resolve, dirname } from 'path';
|
|
8
|
+
import { crawlWebsite } from '../crawler/index.js';
|
|
9
|
+
/**
|
|
10
|
+
* Generate pack.yml from crawled website (Phase 1: Enhanced with preset and auth support)
|
|
11
|
+
*/
|
|
12
|
+
export async function generatePackFromCrawl(options) {
|
|
13
|
+
try {
|
|
14
|
+
console.log(`🕷️ Crawling ${options.baseUrl}...`);
|
|
15
|
+
// Build auth options if provided
|
|
16
|
+
let authConfig;
|
|
17
|
+
if (options.auth?.email && options.auth?.password) {
|
|
18
|
+
authConfig = {
|
|
19
|
+
type: 'form',
|
|
20
|
+
email: options.auth.email,
|
|
21
|
+
password: options.auth.password,
|
|
22
|
+
// Only set loginUrl if user explicitly provided one
|
|
23
|
+
// Otherwise let the crawler intelligently detect the login page
|
|
24
|
+
...(options.auth.url && {
|
|
25
|
+
loginUrl: options.auth.url.startsWith('/')
|
|
26
|
+
? `${new URL(options.baseUrl).origin}${options.auth.url}`
|
|
27
|
+
: options.auth.url
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
// Crawl the website with preset and auth (Phase 1)
|
|
32
|
+
const crawlResult = await crawlWebsite({
|
|
33
|
+
baseUrl: options.baseUrl,
|
|
34
|
+
maxDepth: options.crawl?.maxDepth || 2,
|
|
35
|
+
maxPages: options.crawl?.maxPages || 20,
|
|
36
|
+
headless: options.crawl?.headless ?? true,
|
|
37
|
+
screenshots: false,
|
|
38
|
+
timeout: 30000,
|
|
39
|
+
excludePatterns: options.crawl?.excludePatterns,
|
|
40
|
+
onlyPatterns: options.crawl?.onlyPatterns,
|
|
41
|
+
preset: options.preset,
|
|
42
|
+
auth: authConfig,
|
|
43
|
+
scenario: options.scenario,
|
|
44
|
+
});
|
|
45
|
+
if (!crawlResult.success) {
|
|
46
|
+
return {
|
|
47
|
+
success: false,
|
|
48
|
+
result: crawlResult,
|
|
49
|
+
error: 'Crawling failed',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
console.log(` ✅ Discovered ${crawlResult.siteMap.metadata.pagesCrawled} pages`);
|
|
53
|
+
console.log(` ✅ Found ${crawlResult.forms.length} forms`);
|
|
54
|
+
console.log(` ✅ Generated ${crawlResult.userJourneys.length} user journeys`);
|
|
55
|
+
// Generate pack.yml
|
|
56
|
+
const pack = generatePackFromCrawlResult(crawlResult, options);
|
|
57
|
+
// Write pack file
|
|
58
|
+
const packPath = options.output || resolve(process.cwd(), 'pack.yml');
|
|
59
|
+
const packDir = dirname(packPath);
|
|
60
|
+
if (!existsSync(packDir)) {
|
|
61
|
+
mkdirSync(packDir, { recursive: true });
|
|
62
|
+
}
|
|
63
|
+
writeFileSync(packPath, pack, 'utf-8');
|
|
64
|
+
console.log(`\n📦 Generated pack: ${packPath}`);
|
|
65
|
+
return {
|
|
66
|
+
success: true,
|
|
67
|
+
packPath,
|
|
68
|
+
result: crawlResult,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
return {
|
|
73
|
+
success: false,
|
|
74
|
+
error: error instanceof Error ? error.message : String(error),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Generate pack.yml YAML from crawl result (v2 format)
|
|
80
|
+
*/
|
|
81
|
+
function generatePackFromCrawlResult(crawlResult, options) {
|
|
82
|
+
const { siteMap, userJourneys, forms } = crawlResult;
|
|
83
|
+
const packName = options.packName || `${new URL(options.baseUrl).hostname.replace(/\./g, '-')}-tests`;
|
|
84
|
+
// Build full URLs for pages (filtering out non-HTML resources)
|
|
85
|
+
const baseUrl = options.baseUrl.replace(/\/$/, '');
|
|
86
|
+
const htmlPages = siteMap.pages.filter(p => {
|
|
87
|
+
const url = p.url || p.path;
|
|
88
|
+
// Only include HTML pages (filter out CSS, JS, images, etc.)
|
|
89
|
+
return !/\.(css|js|json|xml|pdf|zip|jpg|jpeg|png|gif|svg|ico|woff|woff2|ttf|eot)$/i.test(url);
|
|
90
|
+
});
|
|
91
|
+
const pages = htmlPages.map(p => `${baseUrl}${p.path.startsWith('/') ? '' : '/'}${p.path}`);
|
|
92
|
+
// Generate YAML (v2 format)
|
|
93
|
+
let yaml = `# QA360 Pack v2 - Generated by crawler
|
|
94
|
+
# Source: ${options.baseUrl}
|
|
95
|
+
# Generated: ${new Date().toISOString()}
|
|
96
|
+
|
|
97
|
+
version: 2
|
|
98
|
+
name: "${packName}"
|
|
99
|
+
description: "Auto-generated E2E tests for ${new URL(options.baseUrl).hostname}"
|
|
100
|
+
|
|
101
|
+
execution:
|
|
102
|
+
default_timeout: 30000
|
|
103
|
+
default_retries: 2
|
|
104
|
+
on_failure: continue
|
|
105
|
+
|
|
106
|
+
gates:
|
|
107
|
+
ui:
|
|
108
|
+
adapter: playwright-ui
|
|
109
|
+
enabled: true
|
|
110
|
+
config:
|
|
111
|
+
baseUrl: "${options.baseUrl}"
|
|
112
|
+
pages:
|
|
113
|
+
${pages.map(p => ` - "${p}"`).join('\n')}
|
|
114
|
+
`;
|
|
115
|
+
// Add a11y gate if requested
|
|
116
|
+
if (options.includeA11y) {
|
|
117
|
+
yaml += `
|
|
118
|
+
a11y:
|
|
119
|
+
adapter: playwright-ui
|
|
120
|
+
enabled: true
|
|
121
|
+
config:
|
|
122
|
+
baseUrl: "${options.baseUrl}"
|
|
123
|
+
pages:
|
|
124
|
+
${pages.map(p => ` - "${p}"`).join('\n')}
|
|
125
|
+
budgets:
|
|
126
|
+
a11y_min: 80
|
|
127
|
+
`;
|
|
128
|
+
}
|
|
129
|
+
// Add journey-based gates if user journeys were generated
|
|
130
|
+
if (userJourneys.length > 0) {
|
|
131
|
+
yaml += `
|
|
132
|
+
# User Journey Tests
|
|
133
|
+
`;
|
|
134
|
+
for (let i = 0; i < Math.min(userJourneys.length, 5); i++) {
|
|
135
|
+
const journey = userJourneys[i];
|
|
136
|
+
const gateName = journey.name.toLowerCase().replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '');
|
|
137
|
+
// Build page objects with actions from journey steps
|
|
138
|
+
const pageMap = new Map();
|
|
139
|
+
for (const step of journey.steps) {
|
|
140
|
+
const stepTyped = step;
|
|
141
|
+
const url = stepTyped.expected?.url || stepTyped.url;
|
|
142
|
+
if (url && url !== 'undefined') {
|
|
143
|
+
// Convert relative URLs to absolute
|
|
144
|
+
const absoluteUrl = url.startsWith('http') ? url : `${baseUrl}${url.startsWith('/') ? '' : '/'}${url}`;
|
|
145
|
+
if (!pageMap.has(absoluteUrl)) {
|
|
146
|
+
pageMap.set(absoluteUrl, { url: absoluteUrl, actions: [] });
|
|
147
|
+
}
|
|
148
|
+
// Add action to the page
|
|
149
|
+
const page = pageMap.get(absoluteUrl);
|
|
150
|
+
const actionType = stepTyped.action || 'navigate';
|
|
151
|
+
// Map journey actions to page actions
|
|
152
|
+
const pageAction = { type: actionType };
|
|
153
|
+
if (stepTyped.selector) {
|
|
154
|
+
pageAction.selector = stepTyped.selector;
|
|
155
|
+
}
|
|
156
|
+
if (stepTyped.value) {
|
|
157
|
+
pageAction.value = stepTyped.value;
|
|
158
|
+
}
|
|
159
|
+
if (stepTyped.wait) {
|
|
160
|
+
pageAction.options = { timeout: stepTyped.wait };
|
|
161
|
+
}
|
|
162
|
+
// Add action if it's meaningful (skip simple navigation)
|
|
163
|
+
if (actionType !== 'navigate' || stepTyped.selector || stepTyped.value) {
|
|
164
|
+
page.actions.push(pageAction);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// If no pages found, use entry point
|
|
169
|
+
if (pageMap.size === 0) {
|
|
170
|
+
pageMap.set(journey.entryPoint, { url: journey.entryPoint, actions: [] });
|
|
171
|
+
}
|
|
172
|
+
const pages = Array.from(pageMap.values());
|
|
173
|
+
// Generate YAML for pages with actions
|
|
174
|
+
if (pages.every((p) => p.actions.length === 0)) {
|
|
175
|
+
// No actions, use simple string format
|
|
176
|
+
yaml += ` journey-${i + 1}-${gateName}:
|
|
177
|
+
adapter: playwright-ui
|
|
178
|
+
enabled: true
|
|
179
|
+
config:
|
|
180
|
+
baseUrl: "${options.baseUrl}"
|
|
181
|
+
pages:
|
|
182
|
+
${pages.map((p) => ` - "${p.url}"`).join('\n')}
|
|
183
|
+
options:
|
|
184
|
+
timeout: 30000
|
|
185
|
+
`;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
// Has actions, use object format
|
|
189
|
+
yaml += ` journey-${i + 1}-${gateName}:
|
|
190
|
+
adapter: playwright-ui
|
|
191
|
+
enabled: true
|
|
192
|
+
config:
|
|
193
|
+
baseUrl: "${options.baseUrl}"
|
|
194
|
+
pages:
|
|
195
|
+
${pages.map((p) => {
|
|
196
|
+
if (p.actions.length === 0) {
|
|
197
|
+
return ` - url: "${p.url}"`;
|
|
198
|
+
}
|
|
199
|
+
const actionsYaml = p.actions.map((a) => {
|
|
200
|
+
let actionLine = ` - type: ${a.type}`;
|
|
201
|
+
if (a.selector)
|
|
202
|
+
actionLine += `\n selector: "${a.selector.replace(/"/g, '\\"')}"`;
|
|
203
|
+
if (a.value)
|
|
204
|
+
actionLine += `\n value: "${a.value.replace(/"/g, '\\"')}"`;
|
|
205
|
+
if (a.options)
|
|
206
|
+
actionLine += `\n options: ${JSON.stringify(a.options)}`;
|
|
207
|
+
return actionLine;
|
|
208
|
+
}).join('\n');
|
|
209
|
+
return ` - url: "${p.url}"\n actions:\n${actionsYaml}`;
|
|
210
|
+
}).join('\n')}
|
|
211
|
+
options:
|
|
212
|
+
timeout: 30000
|
|
213
|
+
`;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return yaml;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Quick crawl - generates pack without detailed analysis
|
|
221
|
+
*/
|
|
222
|
+
export async function quickCrawl(baseUrl, outputPath) {
|
|
223
|
+
return generatePackFromCrawl({
|
|
224
|
+
baseUrl,
|
|
225
|
+
output: outputPath,
|
|
226
|
+
crawl: {
|
|
227
|
+
maxDepth: 1,
|
|
228
|
+
maxPages: 10,
|
|
229
|
+
},
|
|
230
|
+
includeA11y: true,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
@@ -30,3 +30,5 @@ export type { TestSpec, ApiTestSpec, UiTestSpec, PerfTestSpec, UnitTestSpec, Gen
|
|
|
30
30
|
export { generateTests, generateApiTestsFromOpenAPI, generateUiTestsFromUrl, generatePerfTests, generateUnitTests, checkGenerationAvailability, } from './generator.js';
|
|
31
31
|
export { generatePackFromCrawl, quickCrawl, } from './crawler-pack-generator.js';
|
|
32
32
|
export type { CrawlerPackGeneratorOptions } from './crawler-pack-generator.js';
|
|
33
|
+
export { PRESETS, getPreset, getAllPresets, detectPresetFromUrl, getPresetList, } from '../crawler/presets.js';
|
|
34
|
+
export type { CrawlerPreset } from '../crawler/presets.js';
|
|
@@ -28,3 +28,5 @@ export { SourceAnalyzer, analyzeSourceFile, analyzeSourceDirectory, generateTest
|
|
|
28
28
|
export { generateTests, generateApiTestsFromOpenAPI, generateUiTestsFromUrl, generatePerfTests, generateUnitTests, checkGenerationAvailability, } from './generator.js';
|
|
29
29
|
// Crawler Pack Generator (UI Testing 100%)
|
|
30
30
|
export { generatePackFromCrawl, quickCrawl, } from './crawler-pack-generator.js';
|
|
31
|
+
// Universal Crawler Presets
|
|
32
|
+
export { PRESETS, getPreset, getAllPresets, detectPresetFromUrl, getPresetList, } from '../crawler/presets.js';
|
|
@@ -75,6 +75,7 @@ export * from './pack-v2/index.js';
|
|
|
75
75
|
export { PackLoaderV2, PackValidatorV2, PackLoadResult } from './pack-v2/index.js';
|
|
76
76
|
export type { PackMigrationResultV2, ValidationError } from './pack-v2/index.js';
|
|
77
77
|
export * from './auth/index.js';
|
|
78
|
+
export * from './upload/index.js';
|
|
78
79
|
export * from './generation/index.js';
|
|
79
80
|
export { QA360Server } from './serve/server.js';
|
|
80
81
|
export type { ServeConfig } from './serve/server.js';
|
|
@@ -101,6 +102,7 @@ export { HTMLReporter, generateHTMLReport } from './reporting/index.js';
|
|
|
101
102
|
export type { ReportData, TestReport, StepReport, } from './reporting/index.js';
|
|
102
103
|
export type { ScreenshotArtifact as ReportScreenshotArtifact, VideoArtifact as ReportVideoArtifact, TraceArtifact as ReportTraceArtifact, } from './reporting/index.js';
|
|
103
104
|
export * from './parallel/index.js';
|
|
105
|
+
export * from './sharding/test-sharding.js';
|
|
104
106
|
export * from './visual/index.js';
|
|
105
107
|
export * from './fixtures/index.js';
|
|
106
108
|
export { VitestAdapter } from './adapters/vitest-adapter.js';
|
|
@@ -45,6 +45,8 @@ export * from './pack-v2/index.js';
|
|
|
45
45
|
export { PackLoaderV2, PackValidatorV2 } from './pack-v2/index.js';
|
|
46
46
|
// Authentication Module
|
|
47
47
|
export * from './auth/index.js';
|
|
48
|
+
// Upload Module (P1 - File upload utilities)
|
|
49
|
+
export * from './upload/index.js';
|
|
48
50
|
// Generation Module (Phase 4 - AI Test Generation)
|
|
49
51
|
export * from './generation/index.js';
|
|
50
52
|
// Server & Observability
|
|
@@ -87,6 +89,8 @@ export * from './artifacts/index.js';
|
|
|
87
89
|
export { HTMLReporter, generateHTMLReport } from './reporting/index.js';
|
|
88
90
|
// Parallel Module (Vision 2.0 - Parallel Test Execution)
|
|
89
91
|
export * from './parallel/index.js';
|
|
92
|
+
// Test Sharding Module (P0 - Split tests across workers)
|
|
93
|
+
export * from './sharding/test-sharding.js';
|
|
90
94
|
// Visual Regression Module (Vision 2.0 - Visual Testing)
|
|
91
95
|
export * from './visual/index.js';
|
|
92
96
|
// Data Fixtures System (v2.2 - Playwright/NFLS best practice)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QA360 Network Module
|
|
3
|
+
*
|
|
4
|
+
* P0 Features: Network simulation and control for testing edge cases
|
|
5
|
+
*/
|
|
6
|
+
export { NetworkSimulator, createNetworkSimulator, simulateNetwork, setOffline, simulateHTTPError, NetworkProfiles, type NetworkSimulationOptions, type HTTPErrorConfig, } from './network-simulator.js';
|
|
7
|
+
export { NetworkManager, createNetworkManager, BlockPatterns, MockResponses, blockAnalytics, mockAllAPI, waitForAPIRequest, waitForAPIResponse, type BlockRouteConfig, type MockRouteConfig, type WaitForRequestOptions, type WaitForResponseOptions, } from './network-manager.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QA360 Network Module
|
|
3
|
+
*
|
|
4
|
+
* P0 Features: Network simulation and control for testing edge cases
|
|
5
|
+
*/
|
|
6
|
+
export { NetworkSimulator, createNetworkSimulator, simulateNetwork, setOffline, simulateHTTPError, NetworkProfiles, } from './network-simulator.js';
|
|
7
|
+
export { NetworkManager, createNetworkManager, BlockPatterns, MockResponses, blockAnalytics, mockAllAPI, waitForAPIRequest, waitForAPIResponse, } from './network-manager.js';
|