@skyramp/mcp 0.4.1 → 0.4.2-rc.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/build/adapters/jestAdapter.js +23 -5
- package/build/adapters/mochaAdapter.js +7 -1
- package/build/adapters/playwrightAdapter.js +3 -1
- package/build/adapters/pytestAdapter.js +14 -3
- package/build/commands/localDevTestChangesCommand.js +1 -0
- package/build/commands/recommendTestsAndExecuteCommand.js +5 -6
- package/build/commands/testThisEndpointCommand.js +16 -4
- package/build/index.js +34 -4
- package/build/playwright/blueprintDigest.js +28 -7
- package/build/playwright/registerPlaywrightTools.js +33 -28
- package/build/playwright/traceRecordingPrompt.js +9 -2
- package/build/prompts/code-reuse.js +95 -29
- package/build/prompts/fix-error-prompt.d.ts +9 -1
- package/build/prompts/fix-error-prompt.js +31 -28
- package/build/prompts/local-dev/local-dev-plan.d.ts +3 -0
- package/build/prompts/local-dev/local-dev-plan.js +3 -1
- package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
- package/build/prompts/local-dev/local-dev-prompts.js +30 -3
- package/build/prompts/modularization/integration-test-modularization.js +13 -6
- package/build/prompts/modularization/ui-test-modularization.js +1 -1
- package/build/prompts/personas.js +1 -1
- package/build/prompts/pom-aware-code-reuse.js +7 -9
- package/build/prompts/reuse-hand-off.d.ts +64 -0
- package/build/prompts/reuse-hand-off.js +130 -0
- package/build/prompts/shared-helper-policy.d.ts +88 -2
- package/build/prompts/shared-helper-policy.js +145 -11
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +1 -1
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +1 -1
- package/build/prompts/sut-setup/shared.d.ts +4 -1
- package/build/prompts/sut-setup/shared.js +2 -2
- package/build/prompts/test-maintenance/actionsInstructions.d.ts +19 -11
- package/build/prompts/test-maintenance/actionsInstructions.js +47 -26
- package/build/prompts/test-maintenance/drift-analysis-prompt.js +3 -2
- package/build/prompts/test-maintenance/driftAnalysisSections.js +5 -3
- package/build/prompts/test-maintenance/driftAnalysisShared.js +4 -2
- package/build/prompts/test-maintenance/uiDriftAnalysisSections.js +7 -4
- package/build/prompts/test-recommendation/recommendationSections.js +19 -8
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +5 -2
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +10 -7
- package/build/prompts/testbot/testbot-prompts.js +123 -55
- package/build/recommendation/answers.js +18 -9
- package/build/recommendation/pullRequestText.js +1 -1
- package/build/recommendation/registerPlan.js +31 -17
- package/build/recommendation/subjectStep.d.ts +8 -10
- package/build/recommendation/subjectStep.js +17 -16
- package/build/recommendation/types.d.ts +71 -17
- package/build/recommendation/types.js +9 -15
- package/build/recommendation/verifierContracts.d.ts +7 -3
- package/build/recommendation/verifierContracts.js +8 -4
- package/build/recommendation/verifiers/changedFile.js +11 -13
- package/build/recommendation/verifiers/citedPath.d.ts +8 -0
- package/build/recommendation/verifiers/citedPath.js +16 -2
- package/build/recommendation/verifiers/coverage.d.ts +2 -2
- package/build/recommendation/verifiers/coverage.js +190 -134
- package/build/recommendation/verifiers/defects.js +56 -16
- package/build/recommendation/verifiers/deliveredMatchesPlan.d.ts +7 -1
- package/build/recommendation/verifiers/deliveredMatchesPlan.js +28 -14
- package/build/recommendation/verifiers/endpointGrounded.js +14 -8
- package/build/recommendation/verifiers/existingCoverage.d.ts +6 -0
- package/build/recommendation/verifiers/existingCoverage.js +30 -21
- package/build/recommendation/verifiers/expectedOutcome.js +17 -8
- package/build/recommendation/verifiers/expectedValueSourced.js +54 -43
- package/build/recommendation/verifiers/issueTraceability.d.ts +5 -0
- package/build/recommendation/verifiers/issueTraceability.js +64 -7
- package/build/recommendation/verifiers/removedElementGuarded.js +19 -11
- package/build/recommendation/verifiers/reportedCategory.js +9 -4
- package/build/recommendation/verifiers/requirementSourced.js +34 -21
- package/build/recommendation/verifiers/screenRoute.js +15 -10
- package/build/recommendation/verifiers/statedDifference.js +15 -8
- package/build/recommendation/verifiers/uiElementGrounded.js +50 -16
- package/build/resources/analysisResources.js +7 -3
- package/build/resources/progressResource.js +4 -2
- package/build/resources/sutSetupResource.js +20 -2
- package/build/resources/testbotResource.js +19 -1
- package/build/services/AnalyticsService.js +3 -1
- package/build/services/ScenarioGenerationService.js +5 -5
- package/build/services/TestDiscoveryService.js +21 -5
- package/build/services/TestExecutionService.js +63 -21
- package/build/services/TestGenerationService.d.ts +1 -1
- package/build/services/TestGenerationService.js +43 -24
- package/build/skills/enhanceAssertionsSkill.d.ts +45 -0
- package/build/skills/enhanceAssertionsSkill.js +103 -0
- package/build/skills/fixTestImportErrorsSkill.d.ts +2 -2
- package/build/skills/fixTestImportErrorsSkill.js +2 -2
- package/build/skills/skillFiles.d.ts +38 -0
- package/build/skills/skillFiles.js +94 -0
- package/build/skills/validateAssertionAlignmentSkill.d.ts +34 -0
- package/build/skills/validateAssertionAlignmentSkill.js +59 -0
- package/build/tool-phases.js +4 -0
- package/build/tools/auth/loginTool.js +3 -1
- package/build/tools/auth/logoutTool.js +3 -1
- package/build/tools/code-refactor/alignAssertionsTool.d.ts +2 -0
- package/build/tools/code-refactor/alignAssertionsTool.js +51 -0
- package/build/tools/code-refactor/assertion-state.d.ts +1 -1
- package/build/tools/code-refactor/assertion-state.js +1 -1
- package/build/tools/code-refactor/assertionOperations.d.ts +44 -0
- package/build/tools/code-refactor/assertionOperations.js +82 -0
- package/build/tools/code-refactor/assertionSkillTools.d.ts +3 -0
- package/build/tools/code-refactor/assertionSkillTools.js +86 -0
- package/build/tools/code-refactor/codeReuseTool.js +27 -3
- package/build/tools/code-refactor/enhanceAssertionsTool.js +19 -83
- package/build/tools/code-refactor/gate-markers.d.ts +51 -0
- package/build/tools/code-refactor/gate-markers.js +95 -0
- package/build/tools/code-refactor/retrofit-state.d.ts +3 -1
- package/build/tools/code-refactor/retrofit-state.js +44 -2
- package/build/tools/code-refactor/reuse-outcome.d.ts +23 -1
- package/build/tools/code-refactor/reuse-outcome.js +36 -13
- package/build/tools/code-refactor/reuse-state.d.ts +90 -16
- package/build/tools/code-refactor/reuse-state.js +191 -61
- package/build/tools/code-refactor/utils-verify-gates.d.ts +4 -0
- package/build/tools/code-refactor/utils-verify-gates.js +252 -27
- package/build/tools/code-refactor/verify-gates.d.ts +15 -1
- package/build/tools/code-refactor/verify-gates.js +36 -4
- package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
- package/build/tools/enrichTestWithMocksTool.js +9 -5
- package/build/tools/executeSkyrampTestTool.d.ts +22 -1
- package/build/tools/executeSkyrampTestTool.js +571 -271
- package/build/tools/execution-video-state.js +1 -1
- package/build/tools/fixErrorTool.js +5 -6
- package/build/tools/generate-tests/batchMockGenerationTool.js +1 -1
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +114 -73
- package/build/tools/generate-tests/generateContractRestTool.js +34 -16
- package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -0
- package/build/tools/generate-tests/generateE2ERestTool.js +9 -1
- package/build/tools/generate-tests/generateIntegrationRestTool.js +22 -7
- package/build/tools/generate-tests/generateMockRestTool.js +3 -1
- package/build/tools/generate-tests/generateUIRestTool.d.ts +2 -0
- package/build/tools/generate-tests/generateUIRestTool.js +11 -2
- package/build/tools/generate-tests/loadTestSchema.js +1 -3
- package/build/tools/generate-tests/planGuard.js +6 -3
- package/build/tools/generate-tests/scenarioFileIdentity.js +4 -1
- package/build/tools/generate-tests/scenarioLint.js +17 -5
- package/build/tools/generate-tests/trace-reuse-guard.js +5 -2
- package/build/tools/generateEnrichedIntegrationTestTool.js +9 -3
- package/build/tools/one-click/oneClickTool.js +3 -1
- package/build/tools/preflightMockCheckTool.js +23 -7
- package/build/tools/runExistingTestsTool.d.ts +1 -1
- package/build/tools/runExistingTestsTool.js +43 -21
- package/build/tools/submitReportTool.d.ts +51 -12
- package/build/tools/submitReportTool.js +860 -161
- package/build/tools/test-management/actionsTool.js +210 -51
- package/build/tools/test-management/analyzeChangesTool.d.ts +4 -5
- package/build/tools/test-management/analyzeChangesTool.js +127 -68
- package/build/tools/test-management/analyzeTestHealthTool.js +35 -13
- package/build/tools/test-management/registerTestPlanTool.d.ts +44 -34
- package/build/tools/test-management/registerTestPlanTool.js +255 -111
- package/build/tools/test-management/resolveScreenTool.js +33 -9
- package/build/tools/trace/startTraceCollectionTool.js +3 -1
- package/build/tools/trace/stopTraceCollectionTool.js +41 -5
- package/build/tools/verifyTestDependenciesTool.d.ts +3 -0
- package/build/tools/verifyTestDependenciesTool.js +54 -0
- package/build/tools/workspace/initScanWorkspaceTool.js +9 -3
- package/build/tools/workspace/initializeWorkspaceTool.js +3 -1
- package/build/types/AssertionOutcome.d.ts +1 -1
- package/build/types/EnhanceType.d.ts +6 -0
- package/build/types/EnhanceType.js +1 -0
- package/build/types/ExternalTestExecution.d.ts +2 -2
- package/build/types/RepositoryAnalysis.d.ts +0 -40
- package/build/types/ReuseOutcome.d.ts +96 -4
- package/build/types/ReuseOutcome.js +16 -0
- package/build/types/StepMethod.js +20 -6
- package/build/types/TestAnalysis.d.ts +10 -2
- package/build/types/TestExecution.d.ts +45 -0
- package/build/types/TestRecommendation.d.ts +1 -1
- package/build/types/TestRecommendation.js +4 -1
- package/build/types/TestTypes.d.ts +13 -0
- package/build/types/TestTypes.js +34 -3
- package/build/types/TestbotPromptOptions.d.ts +9 -1
- package/build/types/TestbotReport.d.ts +45 -9
- package/build/utils/AnalysisStateManager.d.ts +137 -27
- package/build/utils/AnalysisStateManager.js +227 -43
- package/build/utils/assertion-verify/api-shared-lints.js +34 -16
- package/build/utils/assertion-verify/metrics.js +39 -6
- package/build/utils/assertion-verify/ui-lints.js +4 -2
- package/build/utils/branchDiff.js +47 -12
- package/build/utils/canonicalJson.js +3 -1
- package/build/utils/dartRouteExtractor.js +36 -7
- package/build/utils/fixAttempts.d.ts +26 -0
- package/build/utils/fixAttempts.js +109 -0
- package/build/utils/frontendSelectors.js +23 -4
- package/build/utils/generatedTestRecord.d.ts +19 -0
- package/build/utils/generatedTestRecord.js +61 -0
- package/build/utils/gitStaging.js +7 -2
- package/build/utils/initAgent.js +26 -6
- package/build/utils/language-helper.js +39 -45
- package/build/utils/pathMatching.js +2 -1
- package/build/utils/pathSignatures.js +6 -2
- package/build/utils/planMatchKeys.d.ts +2 -2
- package/build/utils/planMatchKeys.js +20 -14
- package/build/utils/pom-catalog-parse.js +7 -2
- package/build/utils/pom-scope/import-expansion.js +6 -1
- package/build/utils/pom-scope/index.js +50 -12
- package/build/utils/pom-scope/scoring.js +13 -3
- package/build/utils/pom-scope/selector-extractor.js +16 -3
- package/build/utils/pom-scope/strip.d.ts +8 -0
- package/build/utils/pom-scope/strip.js +238 -0
- package/build/utils/pom-scope/testIdDiscovery.js +14 -2
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.d.ts +1 -1
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.js +4 -2
- package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.js +3 -1
- package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.js +3 -1
- package/build/utils/pom-verify/bindings.js +5 -1
- package/build/utils/pom-verify/calls.js +9 -2
- package/build/utils/pom-verify/verify.js +27 -5
- package/build/utils/pr-comment-parser.js +20 -7
- package/build/utils/proxy-terminal.d.ts +19 -1
- package/build/utils/proxy-terminal.js +346 -21
- package/build/utils/removedUiElements.js +1 -1
- package/build/utils/reportLanguage.js +35 -7
- package/build/utils/reportVerification.d.ts +14 -8
- package/build/utils/reportVerification.js +19 -19
- package/build/utils/repositorySlug.d.ts +32 -0
- package/build/utils/repositorySlug.js +77 -0
- package/build/utils/reuseRouting.js +6 -2
- package/build/utils/runSerialized.d.ts +3 -0
- package/build/utils/runSerialized.js +39 -0
- package/build/utils/screenRoutes.js +74 -18
- package/build/utils/sourceRouteExtractor.js +13 -6
- package/build/utils/telemetry.d.ts +1 -0
- package/build/utils/telemetry.js +8 -5
- package/build/utils/testDependencyPolicy.d.ts +9 -0
- package/build/utils/testDependencyPolicy.js +788 -0
- package/build/utils/testExecutionRecord.d.ts +90 -0
- package/build/utils/testExecutionRecord.js +267 -0
- package/build/utils/testFileClassification.js +3 -1
- package/build/utils/trace-parser.js +62 -14
- package/build/utils/urlPath.js +3 -1
- package/build/utils/utils-verify/action-key.d.ts +4 -0
- package/build/utils/utils-verify/action-key.js +2 -2
- package/build/utils/utils-verify/allow.d.ts +122 -3
- package/build/utils/utils-verify/allow.js +146 -21
- package/build/utils/utils-verify/body-reach.d.ts +120 -0
- package/build/utils/utils-verify/body-reach.js +335 -0
- package/build/utils/utils-verify/call-sites.d.ts +6 -1
- package/build/utils/utils-verify/call-sites.js +72 -8
- package/build/utils/utils-verify/delivered-imports.d.ts +43 -0
- package/build/utils/utils-verify/delivered-imports.js +84 -0
- package/build/utils/utils-verify/fixed-sleep.d.ts +96 -0
- package/build/utils/utils-verify/fixed-sleep.js +461 -0
- package/build/utils/utils-verify/in-house.d.ts +93 -0
- package/build/utils/utils-verify/in-house.js +719 -0
- package/build/utils/utils-verify/incumbent.d.ts +3 -0
- package/build/utils/utils-verify/incumbent.js +75 -0
- package/build/utils/utils-verify/index.d.ts +1 -0
- package/build/utils/utils-verify/index.js +1 -0
- package/build/utils/utils-verify/language-spec.d.ts +26 -10
- package/build/utils/utils-verify/language-spec.js +217 -20
- package/build/utils/utils-verify/locate.d.ts +26 -0
- package/build/utils/utils-verify/locate.js +125 -23
- package/build/utils/utils-verify/module-name.d.ts +40 -0
- package/build/utils/utils-verify/module-name.js +98 -0
- package/build/utils/utils-verify/parse.d.ts +46 -6
- package/build/utils/utils-verify/parse.js +176 -38
- package/build/utils/utils-verify/retrofit-equivalence.d.ts +5 -0
- package/build/utils/utils-verify/retrofit-equivalence.js +4 -2
- package/build/utils/utils-verify/stage.d.ts +5 -0
- package/build/utils/utils-verify/stage.js +47 -2
- package/build/utils/utils-verify/status-once.d.ts +62 -0
- package/build/utils/utils-verify/status-once.js +207 -0
- package/build/utils/utils-verify/typecheck.d.ts +61 -0
- package/build/utils/utils-verify/typecheck.js +338 -0
- package/build/utils/utils-verify/verify.d.ts +76 -1
- package/build/utils/utils-verify/verify.js +516 -44
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/utils/workspaceAuth.js +107 -37
- package/build/workspace/queryParamResolution.js +11 -4
- package/build/workspace/workspace.js +7 -7
- package/node_modules/playwright/ThirdPartyNotices.txt +19 -19
- package/node_modules/playwright/lib/mcp/skyramp/assertTool.js +8 -2
- package/node_modules/playwright/lib/mcp/skyramp/common/cssValue.js +87 -0
- package/node_modules/playwright/lib/mcp/skyramp/loadTraceTool.js +31 -0
- package/node_modules/playwright/lib/mcp/skyramp/skyRampImport.js +3 -0
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +181 -15
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +24 -0
- package/node_modules/playwright/lib/transform/babelBundleImpl.js +2353 -190
- package/node_modules/playwright/node_modules/playwright-core/ThirdPartyNotices.txt +62 -34
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/.package-lock.json +72 -41
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.mjs +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/package.json +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/README.md +16 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/index.js +4 -20
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/read.js +17 -17
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/json.js +60 -32
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/raw.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/text.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/urlencoded.js +16 -20
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/utils.js +18 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/README.md +71 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/package.json +23 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/CHANGELOG.md +21 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/isObject.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/package.json +6 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/tsconfig.json +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/index.js +266 -45
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/utils.js +396 -92
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/equal.test.js +31 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/parse.test.js +7 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security-normalization.test.js +101 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security.test.js +301 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/CHANGELOG.md +7 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/index.d.ts +0 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/package.json +4 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/client.js +30 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/utils.js +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/context.js +32 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/accepts/accepts.js +36 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/ssg.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/utils.js +30 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/hono-base.js +10 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/base.js +44 -23
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/components.js +25 -26
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/context.js +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/render.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/hooks/index.js +16 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cache/index.js +103 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/compress/index.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cors/index.js +17 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/digest.js +47 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/index.js +7 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +16 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/request.js +20 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +65 -59
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +71 -128
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +14 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/node.js +47 -70
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/utils.js +27 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/accept.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/body.js +21 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/cookie.js +4 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/stream.js +12 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/url.js +19 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/client.js +30 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/utils.js +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/context.js +32 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/accepts/accepts.js +36 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/proxy/index.js +4 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/ssg.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/utils.js +30 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/streaming/sse.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/hono-base.js +10 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/base.js +41 -23
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/components.js +26 -27
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/context.js +6 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/render.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/server.js +5 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/hooks/index.js +16 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/intrinsic-element/components.js +4 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/streaming.js +5 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cache/index.js +103 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/compress/index.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cors/index.js +17 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/csrf/index.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/digest.js +47 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/index.js +7 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwk/jwk.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwt/jwt.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/language/language.js +10 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/method-not-allowed/index.js +68 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/pretty-json/index.js +3 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +16 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/request.js +21 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/linear-router/router.js +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/pattern-router/router.js +3 -9
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/node.js +61 -58
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/router.js +77 -129
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/trie.js +14 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/node.js +47 -70
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/router.js +3 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/utils.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/client/types.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/context.d.ts +6 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/hono-base.d.ts +4 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/base.d.ts +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/index.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/server.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/hooks/index.d.ts +8 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/index.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cache/index.d.ts +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +2 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/node.d.ts +1 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/router.d.ts +0 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/utils.d.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/headers.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/url.d.ts +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/accept.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/body.js +21 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/cookie.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/ipaddr.js +5 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/stream.js +12 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/url.js +17 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/package.json +11 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/README.md +173 -143
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js +79 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.d.ts +78 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js +119 -24
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.d.ts +151 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js +316 -90
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js +50 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/package.json +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/CHANGELOG.md +26 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/README.md +19 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/dist/qs.js +25 -25
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/parse.js +16 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/utils.js +57 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/package.json +8 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/parse.js +419 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/stringify.js +317 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/utils.js +206 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/README.md +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/index.js +5 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/package.json +10 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/index.js +8 -18
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/LICENSE +22 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/README.md +71 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/package.json +52 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/package.json +9 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/package-lock.json +72 -41
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.package-lock.json +6 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/README.md +23 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/index.js +265 -86
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/README.md +173 -143
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js +79 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.d.ts +78 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js +119 -24
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.d.ts +151 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js +316 -90
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js +50 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/package.json +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/package-lock.json +6 -6
- package/node_modules/playwright/node_modules/playwright-core/lib/cli/program.js +18 -9
- package/node_modules/playwright/node_modules/playwright-core/lib/mcpBundleImpl/index.js +47 -47
- package/node_modules/playwright/node_modules/playwright-core/lib/server/codegen/skyramp/jsonlReader.js +3 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +42 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/utilsBundleImpl/index.js +121 -121
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.B7KbSQcC.js → index.BAkLd5DX.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +1 -1
- package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/cli/program.ts +31 -9
- package/node_modules/playwright/node_modules/playwright-core/src/server/codegen/skyramp/jsonlReader.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts +57 -1
- package/node_modules/playwright/package.json +2 -2
- package/package.json +7 -6
- package/plugin/prompts/code-reuse/hand-off.md +30 -0
- package/plugin/prompts/generate-tests/generation.md +1 -1
- package/plugin/prompts/plan-tests.md +14 -14
- package/plugin/prompts/testbot-task1.md +4 -2
- package/plugin/skills/enhance-assertions/SKILL.md +25 -0
- package/plugin/skills/enhance-assertions/reference/contract.md +51 -0
- package/plugin/skills/enhance-assertions/reference/integration.md +58 -0
- package/plugin/skills/enhance-assertions/reference/shared-rules.md +220 -0
- package/plugin/skills/enhance-assertions/reference/ui.md +373 -0
- package/plugin/skills/fix-test-import-errors/SKILL.md +44 -50
- package/plugin/skills/validate-assertion-alignment-post-execution/SKILL.md +32 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/reference/checks.md +44 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/reference/evidence.md +47 -0
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.js +0 -29
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.js +0 -36
- package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +0 -16
- package/build/prompts/enhance-assertions/sharedAssertionRules.js +0 -284
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.js +0 -388
- package/node_modules/playwright/node_modules/playwright-core/.DS_Store +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as x,r,a as C,W as F,j as e,D as z,b as I,c as P,d as A,e as O,f as V}from"./assets/defaultSettingsView-Bwr1eMKC.js";const $=()=>{const[o,c]=r.useState(!1),[n,l]=r.useState(),[h,u]=r.useState(),[p,b]=r.useState(N),[f,j]=r.useState({done:0,total:0}),[k,v]=r.useState(!1),[y,m]=r.useState(null),[T,R]=r.useState(null),[U,E]=r.useState(!1),g=r.useCallback(t=>{const s=new URL(window.location.href);if(!t.length)return;const i=t.item(0),a=URL.createObjectURL(i);s.searchParams.append("trace",a);const d=s.toString();window.history.pushState({},"",d),l(a),u(i.name),v(!1),m(null)},[]);r.useEffect(()=>{const t=async s=>{var a;if(!((a=s.clipboardData)!=null&&a.files.length))return;const i=["application/zip","application/x-zip-compressed"];for(const d of s.clipboardData.files)if(!i.includes(d.type))return;s.preventDefault(),g(s.clipboardData.files)};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),r.useEffect(()=>{const t=s=>{const{method:i,params:a}=s.data;if(i!=="load"||!((a==null?void 0:a.trace)instanceof Blob))return;const d=new File([a.trace],"trace.zip",{type:"application/zip"}),w=new DataTransfer;w.items.add(d),g(w.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const W=r.useCallback(t=>{t.preventDefault(),g(t.dataTransfer.files)},[g]),M=r.useCallback(t=>{t.preventDefault(),t.target.files&&g(t.target.files)},[g]);r.useEffect(()=>{const t=new URL(window.location.href).searchParams,s=t.get("trace");if(c(t.has("isServer")),s!=null&&s.startsWith("file:")){R(s||null);return}if(t.has("isServer")){const i=new URLSearchParams(window.location.search).get("ws"),a=new URL(`../${i}`,window.location.toString());a.protocol=window.location.protocol==="https:"?"wss:":"ws:";const d=new C(new F(a));d.onLoadTraceRequested(async w=>{l(w.traceUrl),v(!1),m(null)}),d.initialize({}).catch(()=>{})}else s&&!s.startsWith("blob:")&&l(s)},[]);const S=r.useCallback(async t=>{const s=new URLSearchParams;s.set("trace",t);const i=await fetch(`contexts?${s.toString()}`);if(!i.ok){const{error:w}=await i.json();return m(w),w}const a=await i.json(),d=new x(t,a);j({done:0,total:0}),m(null),b(d)},[]);r.useEffect(()=>{(async()=>{if(!n){b(N);return}const t=s=>{s.data.method==="progress"&&j(s.data.params)};try{navigator.serviceWorker.addEventListener("message",t),j({done:0,total:1});let s=await S(n);s!=null&&s.includes("please grant permission for Local Network Access")&&(await fetch(n,{method:"HEAD",headers:{"x-pw-serviceworker":"skip"}}),s=await S(n)),s&&(o||l(void 0))}finally{navigator.serviceWorker.removeEventListener("message",t)}})()},[o,n,h,S]);const D=f.done!==f.total&&f.total!==0&&!y;r.useEffect(()=>{if(D){const t=setTimeout(()=>{E(!0)},200);return()=>clearTimeout(t)}else E(!1)},[D]);const L=!!(!o&&!k&&!T&&(!n||y));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),t.dataTransfer.types.includes("Files")&&v(!0)},children:[e.jsxs("div",{className:"hbox header",...L?{inert:!0}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),p.title&&e.jsx("div",{className:"title",children:p.title}),e.jsx("div",{className:"spacer"}),e.jsx(z,{icon:"settings-gear",title:"Settings",dialogDataTestId:"settings-toolbar-dialog",children:e.jsx(I,{location:"trace-viewer"})})]}),e.jsx(P,{model:p,inert:L}),T&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses Service Workers to show traces. To view trace:"}),e.jsxs("div",{style:{paddingTop:20},children:[e.jsxs("div",{children:["1. Click ",e.jsx("a",{href:T,children:"here"})," to put your trace into the download shelf"]}),e.jsxs("div",{children:["2. Go to ",e.jsx("a",{href:"https://trace.playwright.dev",children:"trace.playwright.dev"})]}),e.jsx("div",{children:"3. Drop the trace from the download shelf into the page"})]})]}),e.jsx(A,{open:U,isModal:!0,className:"progress-dialog",children:e.jsxs("div",{className:"progress-content",children:[e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Loading Playwright Trace..."}),e.jsx("div",{className:"progress-wrapper",children:e.jsx("div",{className:"inner-progress",style:{width:f.total?100*f.done/f.total+"%":0}})})]})}),L&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{className:"processing-error",role:"alert",children:y}),e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Drop Playwright Trace to load"}),e.jsx("div",{children:"or"}),e.jsx("button",{onClick:()=>{const t=document.createElement("input");t.type="file",t.click(),t.addEventListener("change",s=>M(s))},type:"button",children:"Select file"}),e.jsx("div",{className:"info",children:"Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere, it opens it locally."}),e.jsxs("div",{className:"version",children:["Playwright v","1.58.2-skyramp.8.14.
|
|
1
|
+
import{T as x,r,a as C,W as F,j as e,D as z,b as I,c as P,d as A,e as O,f as V}from"./assets/defaultSettingsView-Bwr1eMKC.js";const $=()=>{const[o,c]=r.useState(!1),[n,l]=r.useState(),[h,u]=r.useState(),[p,b]=r.useState(N),[f,j]=r.useState({done:0,total:0}),[k,v]=r.useState(!1),[y,m]=r.useState(null),[T,R]=r.useState(null),[U,E]=r.useState(!1),g=r.useCallback(t=>{const s=new URL(window.location.href);if(!t.length)return;const i=t.item(0),a=URL.createObjectURL(i);s.searchParams.append("trace",a);const d=s.toString();window.history.pushState({},"",d),l(a),u(i.name),v(!1),m(null)},[]);r.useEffect(()=>{const t=async s=>{var a;if(!((a=s.clipboardData)!=null&&a.files.length))return;const i=["application/zip","application/x-zip-compressed"];for(const d of s.clipboardData.files)if(!i.includes(d.type))return;s.preventDefault(),g(s.clipboardData.files)};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),r.useEffect(()=>{const t=s=>{const{method:i,params:a}=s.data;if(i!=="load"||!((a==null?void 0:a.trace)instanceof Blob))return;const d=new File([a.trace],"trace.zip",{type:"application/zip"}),w=new DataTransfer;w.items.add(d),g(w.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const W=r.useCallback(t=>{t.preventDefault(),g(t.dataTransfer.files)},[g]),M=r.useCallback(t=>{t.preventDefault(),t.target.files&&g(t.target.files)},[g]);r.useEffect(()=>{const t=new URL(window.location.href).searchParams,s=t.get("trace");if(c(t.has("isServer")),s!=null&&s.startsWith("file:")){R(s||null);return}if(t.has("isServer")){const i=new URLSearchParams(window.location.search).get("ws"),a=new URL(`../${i}`,window.location.toString());a.protocol=window.location.protocol==="https:"?"wss:":"ws:";const d=new C(new F(a));d.onLoadTraceRequested(async w=>{l(w.traceUrl),v(!1),m(null)}),d.initialize({}).catch(()=>{})}else s&&!s.startsWith("blob:")&&l(s)},[]);const S=r.useCallback(async t=>{const s=new URLSearchParams;s.set("trace",t);const i=await fetch(`contexts?${s.toString()}`);if(!i.ok){const{error:w}=await i.json();return m(w),w}const a=await i.json(),d=new x(t,a);j({done:0,total:0}),m(null),b(d)},[]);r.useEffect(()=>{(async()=>{if(!n){b(N);return}const t=s=>{s.data.method==="progress"&&j(s.data.params)};try{navigator.serviceWorker.addEventListener("message",t),j({done:0,total:1});let s=await S(n);s!=null&&s.includes("please grant permission for Local Network Access")&&(await fetch(n,{method:"HEAD",headers:{"x-pw-serviceworker":"skip"}}),s=await S(n)),s&&(o||l(void 0))}finally{navigator.serviceWorker.removeEventListener("message",t)}})()},[o,n,h,S]);const D=f.done!==f.total&&f.total!==0&&!y;r.useEffect(()=>{if(D){const t=setTimeout(()=>{E(!0)},200);return()=>clearTimeout(t)}else E(!1)},[D]);const L=!!(!o&&!k&&!T&&(!n||y));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),t.dataTransfer.types.includes("Files")&&v(!0)},children:[e.jsxs("div",{className:"hbox header",...L?{inert:!0}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),p.title&&e.jsx("div",{className:"title",children:p.title}),e.jsx("div",{className:"spacer"}),e.jsx(z,{icon:"settings-gear",title:"Settings",dialogDataTestId:"settings-toolbar-dialog",children:e.jsx(I,{location:"trace-viewer"})})]}),e.jsx(P,{model:p,inert:L}),T&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses Service Workers to show traces. To view trace:"}),e.jsxs("div",{style:{paddingTop:20},children:[e.jsxs("div",{children:["1. Click ",e.jsx("a",{href:T,children:"here"})," to put your trace into the download shelf"]}),e.jsxs("div",{children:["2. Go to ",e.jsx("a",{href:"https://trace.playwright.dev",children:"trace.playwright.dev"})]}),e.jsx("div",{children:"3. Drop the trace from the download shelf into the page"})]})]}),e.jsx(A,{open:U,isModal:!0,className:"progress-dialog",children:e.jsxs("div",{className:"progress-content",children:[e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Loading Playwright Trace..."}),e.jsx("div",{className:"progress-wrapper",children:e.jsx("div",{className:"inner-progress",style:{width:f.total?100*f.done/f.total+"%":0}})})]})}),L&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{className:"processing-error",role:"alert",children:y}),e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Drop Playwright Trace to load"}),e.jsx("div",{children:"or"}),e.jsx("button",{onClick:()=>{const t=document.createElement("input");t.type="file",t.click(),t.addEventListener("change",s=>M(s))},type:"button",children:"Select file"}),e.jsx("div",{className:"info",children:"Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere, it opens it locally."}),e.jsxs("div",{className:"version",children:["Playwright v","1.58.2-skyramp.8.14.11"]})]}),o&&!n&&e.jsx("div",{className:"drop-target",children:e.jsx("div",{className:"title",children:"Select test to see the trace"})}),k&&e.jsx("div",{className:"drop-target",onDragLeave:()=>{v(!1)},onDrop:t=>W(t),children:e.jsx("div",{className:"title",children:"Release to analyse the Playwright Trace"})})]})},N=new x("",[]),q=({traceJson:o})=>{const[c,n]=r.useState(void 0),[l,h]=r.useState(0),u=r.useRef(null);return r.useEffect(()=>(u.current&&clearTimeout(u.current),u.current=setTimeout(async()=>{try{const p=await B(o);n(p)}catch{const p=new x("",[]);n(p)}finally{h(l+1)}},500),()=>{u.current&&clearTimeout(u.current)}),[o,l]),e.jsx(P,{isLive:!0,model:c})};async function B(o){const c=new URLSearchParams;c.set("trace",o);const l=await(await fetch(`contexts?${c.toString()}`)).json();return new x(o,l)}(async()=>{const o=new URLSearchParams(window.location.search);if(O(),window.location.protocol!=="file:"){if(o.get("isUnderTest")==="true"&&await new Promise(h=>setTimeout(h,1e3)),!navigator.serviceWorker)throw new Error(`Service workers are not supported.
|
|
2
2
|
Make sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(h=>{navigator.serviceWorker.oncontrollerchange=()=>h()}),setInterval(function(){fetch("ping")},1e4)}const c=o.get("trace"),l=(c==null?void 0:c.endsWith(".json"))?e.jsx(q,{traceJson:c}):e.jsx($,{});V.createRoot(document.querySelector("#root")).render(l)})();
|
package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
|
|
8
8
|
<link rel="manifest" href="./manifest.webmanifest">
|
|
9
9
|
<title>Playwright Trace Viewer</title>
|
|
10
|
-
<script type="module" crossorigin src="./index.
|
|
10
|
+
<script type="module" crossorigin src="./index.BAkLd5DX.js"></script>
|
|
11
11
|
<link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-Bwr1eMKC.js">
|
|
12
12
|
<link rel="stylesheet" crossorigin href="./defaultSettingsView.7ch9cixO.css">
|
|
13
13
|
<link rel="stylesheet" crossorigin href="./index.BVu7tZDe.css">
|
|
@@ -536,13 +536,18 @@ async function launchContext(options: Options, extraOptions: LaunchOptions): Pro
|
|
|
536
536
|
context = await browser.newContext(contextOptions);
|
|
537
537
|
}
|
|
538
538
|
|
|
539
|
-
let closingBrowser
|
|
540
|
-
|
|
539
|
+
let closingBrowser: Promise<void> | undefined;
|
|
540
|
+
function closeBrowser(): Promise<void> {
|
|
541
541
|
// We can come here multiple times. For example, saving storage creates
|
|
542
542
|
// a temporary page and we call closeBrowser again when that page closes.
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
543
|
+
// Returning the same promise rather than returning early matters: a caller
|
|
544
|
+
// that arrives while a close is already flushing has to wait for the real
|
|
545
|
+
// completion, or it can exit the process mid-write and truncate the HAR.
|
|
546
|
+
closingBrowser ??= doCloseBrowser();
|
|
547
|
+
return closingBrowser;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
async function doCloseBrowser() {
|
|
546
551
|
if (options.saveStorage)
|
|
547
552
|
await context.storageState({ path: options.saveStorage }).catch(e => null);
|
|
548
553
|
if (options.saveHar)
|
|
@@ -560,10 +565,27 @@ async function launchContext(options: Options, extraOptions: LaunchOptions): Pro
|
|
|
560
565
|
closeBrowser().catch(() => {});
|
|
561
566
|
});
|
|
562
567
|
});
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
568
|
+
const closeAndExit = async () => {
|
|
569
|
+
// Nothing installs an unhandledRejection handler in playwright-core, so a
|
|
570
|
+
// rejecting close would otherwise escape this listener: the process exits 1
|
|
571
|
+
// on the bare rejection and never reaches the deterministic exit below.
|
|
572
|
+
try {
|
|
573
|
+
await closeBrowser();
|
|
574
|
+
} catch (e) {
|
|
575
|
+
console.error(`Failed to close the browser cleanly: ${e.message}`);
|
|
576
|
+
} finally {
|
|
577
|
+
gracefullyProcessExitDoNotHang(130);
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
process.on('SIGINT', closeAndExit);
|
|
581
|
+
// The Skyramp Go CLI cannot send SIGINT to one child on Windows:
|
|
582
|
+
// os.Process.Signal implements only Kill there, and GenerateConsoleCtrlEvent
|
|
583
|
+
// can target a process group solely with CTRL_BREAK_EVENT, which node raises
|
|
584
|
+
// as SIGBREAK. Without this the recorder dies on the default SIGBREAK action,
|
|
585
|
+
// closeBrowser never runs, and the HAR is never written - context.close()
|
|
586
|
+
// above is the only thing that writes it.
|
|
587
|
+
if (process.platform === 'win32')
|
|
588
|
+
process.on('SIGBREAK', closeAndExit);
|
|
567
589
|
|
|
568
590
|
const timeout = options.timeout ? parseInt(options.timeout, 10) : 0;
|
|
569
591
|
context.setDefaultTimeout(timeout);
|
|
@@ -118,6 +118,7 @@ const _ACTION_NAMES = new Set<string>([
|
|
|
118
118
|
'navigate', 'openPage', 'press', 'select', 'uncheck',
|
|
119
119
|
'setInputFiles', 'assertText', 'assertValue', 'assertChecked',
|
|
120
120
|
'assertVisible', 'assertDisabled', 'assertCount', 'assertHidden', 'assertSnapshot', 'visualSnapshot', 'assertTableCell',
|
|
121
|
+
'assertCSS', 'assertClass', 'assertAttribute',
|
|
121
122
|
'dragTo', 'diagramNodeAdd', 'diagramLinkAdd', 'selectArea', 'tableSnapshot', 'domSnapshot', 'fileChooser',
|
|
122
123
|
'penTool', 'mouse.wheel', 'mouse.move', 'mouse.down', 'mouse.up',
|
|
123
124
|
'modalOpen', 'modalClose', 'waitForTimeout', 'evaluate',
|
package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { serializeExpectedTextValues } from '../../utils';
|
|
17
|
+
import { escapeRegExp, serializeExpectedTextValues } from '../../utils';
|
|
18
18
|
import { toKeyboardModifiers } from '../codegen/language';
|
|
19
19
|
import { buildFullSelector, mainFrameForAction } from './recorderUtils';
|
|
20
20
|
import { Progress, ProgressController } from '../progress';
|
|
@@ -184,6 +184,62 @@ async function performActionImpl(progress: Progress, mainFrame: Frame, actionInC
|
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
// Assertion kinds recorded by the Skyramp MCP fork and accepted by the
|
|
188
|
+
// Skyramp JSONL reader (assertHidden — SKYR-4305; assertDisabled,
|
|
189
|
+
// assertCount — SKYR-4260/4261; assertCSS, assertClass, assertAttribute —
|
|
190
|
+
// SKYR-4462). They are not in @recorder/actions, so the fields are read off
|
|
191
|
+
// the raw action. Replayed through the same injected expect the generated
|
|
192
|
+
// test's matcher uses (toBeHidden / toBeEnabled / toHaveCount / toHaveCSS /
|
|
193
|
+
// toHaveClass / toHaveAttribute), so a drifted trace fails here as it would
|
|
194
|
+
// in the test.
|
|
195
|
+
const raw = action as any;
|
|
196
|
+
if (raw.name === 'assertHidden') {
|
|
197
|
+
await mainFrame.expect(progress, selector, { selector, expression: 'to.be.hidden', isNot: false });
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (raw.name === 'assertDisabled') {
|
|
201
|
+
await mainFrame.expect(progress, selector, { selector, expression: raw.disabled === false ? 'to.be.enabled' : 'to.be.disabled', isNot: false });
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (raw.name === 'assertCount') {
|
|
205
|
+
await mainFrame.expect(progress, selector, { selector, expression: 'to.have.count', expectedNumber: Number(raw.count), isNot: false });
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (raw.name === 'assertCSS') {
|
|
209
|
+
await mainFrame.expect(progress, selector, {
|
|
210
|
+
selector,
|
|
211
|
+
expression: 'to.have.css',
|
|
212
|
+
expressionArg: String(raw.cssName),
|
|
213
|
+
expectedText: serializeExpectedTextValues([String(raw.cssValue)], { matchSubstring: false, normalizeWhiteSpace: false }),
|
|
214
|
+
isNot: false,
|
|
215
|
+
});
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
if (raw.name === 'assertClass') {
|
|
219
|
+
// One class the element carries, as the generated toHaveClass(/(^|\s)name(\s|$)/).
|
|
220
|
+
await mainFrame.expect(progress, selector, {
|
|
221
|
+
selector,
|
|
222
|
+
expression: 'to.have.class',
|
|
223
|
+
expectedText: serializeExpectedTextValues([new RegExp(`(^|\\s)${escapeRegExp(String(raw.className))}(\\s|$)`)]),
|
|
224
|
+
isNot: false,
|
|
225
|
+
});
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (raw.name === 'assertAttribute') {
|
|
229
|
+
// `to.have.attribute.value` (not `to.have.attribute`, which is presence-only
|
|
230
|
+
// and ignores expectedText) — the matcher the generated toHaveAttribute(name,
|
|
231
|
+
// value) uses, so replay checks the recorded value, not just that the
|
|
232
|
+
// attribute exists.
|
|
233
|
+
await mainFrame.expect(progress, selector, {
|
|
234
|
+
selector,
|
|
235
|
+
expression: 'to.have.attribute.value',
|
|
236
|
+
expressionArg: String(raw.attrName),
|
|
237
|
+
expectedText: serializeExpectedTextValues([String(raw.attrValue)], { matchSubstring: false, normalizeWhiteSpace: false }),
|
|
238
|
+
isNot: false,
|
|
239
|
+
});
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
|
|
187
243
|
throw new Error('Internal error: unexpected action ' + (action as any).name);
|
|
188
244
|
}
|
|
189
245
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyramp/playwright",
|
|
3
|
-
"version": "1.58.2-skyramp.8.14.
|
|
3
|
+
"version": "1.58.2-skyramp.8.14.11",
|
|
4
4
|
"description": "Skyramp's fork of Playwright with trace recording for UI test generation",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"test": "vitest run"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"vitest": "^
|
|
74
|
+
"vitest": "^5.0.0"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"playwright-core": "1.58.2"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyramp/mcp",
|
|
3
|
-
"version": "0.4.1",
|
|
3
|
+
"version": "0.4.2-rc.1",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./build/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"mcp": "./build/index.js"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"prepare": "node scripts/swap-modified-core.mjs && npm run build",
|
|
24
|
+
"prepare": "node scripts/swap-modified-core.mjs && node scripts/install-git-hooks.mjs && npm run build",
|
|
25
25
|
"clean-build": "rm -rf build && npm run build",
|
|
26
26
|
"build": "tsc && chmod 755 build/index.js",
|
|
27
27
|
"build:prod": "tsc --sourceMap false && chmod 755 build/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"lint": "eslint src --ext .ts --max-warnings 0",
|
|
36
36
|
"lint:fix": "eslint src --ext .ts --fix",
|
|
37
37
|
"typecheck": "tsc --noEmit -p tsconfig.typecheck.json",
|
|
38
|
-
"test": "node --experimental-vm-modules node_modules/.bin/jest",
|
|
39
|
-
"test:coverage": "node --experimental-vm-modules node_modules/.bin/jest --coverage"
|
|
38
|
+
"test": "node --experimental-vm-modules --max-old-space-size=4096 node_modules/.bin/jest",
|
|
39
|
+
"test:coverage": "node --experimental-vm-modules --max-old-space-size=4096 node_modules/.bin/jest --coverage"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
42
|
"build/**/*.js",
|
|
@@ -71,13 +71,14 @@
|
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@modelcontextprotocol/sdk": "^1.24.3",
|
|
73
73
|
"@playwright/test": "^1.55.0",
|
|
74
|
-
"@skyramp/skyramp": "1.3.
|
|
74
|
+
"@skyramp/skyramp": "1.3.46",
|
|
75
75
|
"dockerode": "^5.0.0",
|
|
76
76
|
"fast-glob": "^3.3.3",
|
|
77
77
|
"js-yaml": "^4.1.1",
|
|
78
78
|
"picomatch": "^4.0.5",
|
|
79
|
-
"playwright": "file:vendor/skyramp-playwright-1.58.2-skyramp.8.14.
|
|
79
|
+
"playwright": "file:vendor/skyramp-playwright-1.58.2-skyramp.8.14.11.tgz",
|
|
80
80
|
"simple-git": "^3.30.0",
|
|
81
|
+
"smol-toml": "^1.8.0",
|
|
81
82
|
"ts-is-record": "^3.0.5",
|
|
82
83
|
"typescript": "^5.8.3",
|
|
83
84
|
"zod": "^3.25.3"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Code-reuse hand-off
|
|
2
|
+
|
|
3
|
+
The steps a test owes when its generation or its maintenance armed the
|
|
4
|
+
modularize → reuse chain. `buildModularizeFirstNextSteps` in
|
|
5
|
+
`src/prompts/reuse-hand-off.ts` renders them, in this order, for both callers.
|
|
6
|
+
|
|
7
|
+
`{testType}` is the test's type. `{reuseArgs}` is the argument clause of the
|
|
8
|
+
`skyramp_reuse_code` call, rendered by `reuseCodeArgsClause`. `{enhanceCall}`
|
|
9
|
+
routes assertion enhancement through the skill when skills are loaded and the
|
|
10
|
+
legacy tool otherwise.
|
|
11
|
+
|
|
12
|
+
## Enhance first
|
|
13
|
+
|
|
14
|
+
{enhanceCall} — BEFORE modularization, while the file's selectors are still inline.
|
|
15
|
+
|
|
16
|
+
## Modularize
|
|
17
|
+
|
|
18
|
+
Call `skyramp_modularization` with `testFile`, `testType: "{testType}"`, and `isTraceBased: true`, and apply the returned instructions — this extracts the test's steps into named helper functions, which is what makes cross-test reuse possible.
|
|
19
|
+
|
|
20
|
+
## Reuse
|
|
21
|
+
|
|
22
|
+
Immediately after writing the modularized file — as your very NEXT skyramp tool call — call `skyramp_reuse_code` with {reuseArgs}. The modularization call does NOT count as this step: reuse is a separate tool and MUST be invoked even when you expect it to find nothing. Follow the returned steps to completion. Sibling tests offering nothing to reuse is a normal outcome — the returned steps still move THIS test's own helpers into the shared utils file and import them back, so the test file IS expected to change; finish those steps, then continue (do NOT retry).
|
|
23
|
+
|
|
24
|
+
## Ordering with the enhancer
|
|
25
|
+
|
|
26
|
+
three sub-steps, STRICTLY SEQUENTIAL (never in the same tool-call batch)
|
|
27
|
+
|
|
28
|
+
## Ordering without the enhancer
|
|
29
|
+
|
|
30
|
+
two sub-steps, STRICTLY SEQUENTIAL (never in the same tool-call batch), BOTH BEFORE `skyramp_enhance_assertions`
|
|
@@ -98,7 +98,7 @@ Each of these is about the test file you are writing. Correct it in the file.
|
|
|
98
98
|
- A test never leaves a record it did not create in a different state from the one it found. A seeded record may be the starting state of a mutation test when the test restores it afterwards (a reset endpoint, or the reverse mutation) or when the mutation under test is the one that should be REFUSED, which leaves the record unchanged.
|
|
99
99
|
- A field the diff adds to a record appears in every expected body of that record, in new and in updated tests.
|
|
100
100
|
- A timestamp is parsed and compared as a time, never indexed as characters.
|
|
101
|
-
- A case that declares `derived` asserts a value the test computes from the values it sent, by the rule the case states; it does not pin a number.
|
|
101
|
+
- A test case that declares `derived` asserts a value the test computes from the values it sent, by the rule the test case states; it does not pin a number.
|
|
102
102
|
- A test declared to fail asserts the fixed behaviour, not today's status code. A `why` saying the test turns green after a fix has to be true of every assertion in the file, not just the last one.
|
|
103
103
|
|
|
104
104
|
## Verification checklist
|
|
@@ -7,7 +7,7 @@ You decide what to test. The tools give you the diff and the existing tests; the
|
|
|
7
7
|
|
|
8
8
|
A **change** is one thing the pull request should make happen, or reject, for a user or a caller. Say on each change whether it is on the API, on a page, or both.
|
|
9
9
|
|
|
10
|
-
A **behaviour** is one rule about one endpoint or one page. One change can carry two behaviours, one on the API and one on the page. A test may prove several behaviours. Every behaviour has at least one test that proves it. Rejections the application already handles share one test, one case each; a case a defect breaks gets its own test that expects to fail. Declare on each change the inputs that prove it: what the route must accept and what it must reject.
|
|
10
|
+
A **behaviour** is one rule about one endpoint or one page. One change can carry two behaviours, one on the API and one on the page. A test may prove several behaviours. Every behaviour has at least one test that proves it. Rejections the application already handles share one test, one test case each; a test case a defect breaks gets its own test that expects to fail. Declare on each change the inputs that prove it: what the route must accept and what it must reject.
|
|
11
11
|
|
|
12
12
|
## The procedure
|
|
13
13
|
|
|
@@ -19,19 +19,19 @@ Do the steps in this order.
|
|
|
19
19
|
Keep each line through the rest of the procedure. Do not fold a change into another one or drop it because no test covers it.
|
|
20
20
|
For each edit in the diff, write one line: what it makes different for a user or a caller.
|
|
21
21
|
For each requirement the title, the description or a requirements file states, write one line, even when no edit in the diff serves it.
|
|
22
|
-
4. **Declare the cases each request must refuse.**
|
|
23
|
-
- For each input a request takes, declare one case with a value the request must reject. Declare it even when the code does not reject that value today.
|
|
24
|
-
- For each list a request takes, declare one case that is valid except for one item in the list. Give the case one `param` and one `value`: the invalid item. The step that sends the case carries the rest of the list.
|
|
25
|
-
- For a request that edits a record, declare one case that is a valid edit with one invalid value added. Give the case one `param` and one `value`: the invalid value. The step that sends the case carries the rest of the edit.
|
|
26
|
-
- If a request must reject a value because of a record that already exists, declare that case too.
|
|
27
|
-
- For each state a record can be in that the request must refuse, declare one case that puts the record in that state first and then sends the request.
|
|
22
|
+
4. **Declare the test cases each request must refuse.**
|
|
23
|
+
- For each input a request takes, declare one test case with a value the request must reject. Declare it even when the code does not reject that value today.
|
|
24
|
+
- For each list a request takes, declare one test case that is valid except for one item in the list. Give the test case one `param` and one `value`: the invalid item. The step that sends the test case carries the rest of the list.
|
|
25
|
+
- For a request that edits a record, declare one test case that is a valid edit with one invalid value added. Give the test case one `param` and one `value`: the invalid value. The step that sends the test case carries the rest of the edit.
|
|
26
|
+
- If a request must reject a value because of a record that already exists, declare that test case too.
|
|
27
|
+
- For each state a record can be in that the request must refuse, declare one test case that puts the record in that state first and then sends the request.
|
|
28
28
|
- A request that names a record by id, in the path, in a query parameter, or in the body, must reject a record that does not exist or does not belong to the parent.
|
|
29
|
-
- A record that belongs to another user is its own case, even when the answer is the same.
|
|
30
|
-
- For each rule the pull request states, declare the cases that catch a wrong implementation: each bound, one value past each bound, one value far past a bound, and each value the rule forbids. Take their values from the rule, not from an example.
|
|
31
|
-
- A reject case expects the request to be refused and the record to be unchanged. Declare an exact status code or error text only when the pull request or a requirements file states it.
|
|
29
|
+
- A record that belongs to another user is its own test case, even when the answer is the same.
|
|
30
|
+
- For each rule the pull request states, declare the test cases that catch a wrong implementation: each bound, one value past each bound, one value far past a bound, and each value the rule forbids. Take their values from the rule, not from an example.
|
|
31
|
+
- A reject test case expects the request to be refused and the record to be unchanged. Declare an exact status code or error text only when the pull request or a requirements file states it.
|
|
32
32
|
5. **Declare what each response value must be.**
|
|
33
33
|
- For each value the response carries that this change decides, declare what that value must be and where you read it: the pull request title or description, a requirements file the description names, or a rule the application already follows in code this pull request did not change.
|
|
34
|
-
- Quote a value only when it holds for every input the case can send: a fixed constant, a bound, or one of the allowed names. A value the inputs decide is `derived`, even when the source shows it in an example.
|
|
34
|
+
- Quote a value only when it holds for every input the test case can send: a fixed constant, a bound, or one of the allowed names. A value the inputs decide is `derived`, even when the source shows it in an example.
|
|
35
35
|
- If no source states the value, declare none and assert its shape instead.
|
|
36
36
|
- Never take the value from the running application: that is the one source a defect cannot contradict.
|
|
37
37
|
6. **Find where each change is served.** Read the code that declares routes and pages, and write each route's full path with its mount prefix. Follow the callers of a changed file that has no route of its own to the endpoint or page that runs it. Read the code that writes each stored value the new code reads; any rule on that value is a rejection to list.
|
|
@@ -50,9 +50,9 @@ Do the steps in this order.
|
|
|
50
50
|
11. **Declare each planned test.** The tool schema says what goes in each field, `defects` included.
|
|
51
51
|
- A test that expects a rejection sends an accepted request first and asserts it succeeds. That request and its assertion are the test's setup.
|
|
52
52
|
- Two planned tests on one endpoint each say how they differ.
|
|
53
|
-
- A test that expects to fail proves one case: its first assertion after setup is the one the defect breaks, and a red step stops every step after it. Declare one such test per case the defect breaks, so each case reports on its own.
|
|
54
|
-
- Accepted cases may share one test that expects to pass.
|
|
55
|
-
- A test that expects to fail asserts a value the code does not return today. Before you declare that test, put that value on the case it sends, as `expectedValue`, and name where you read it, as `expectedFrom`. If the source states the rule and never writes the number, put the rule in `derived` and leave `expectedValue` out.
|
|
53
|
+
- A test that expects to fail proves one test case: its first assertion after setup is the one the defect breaks, and a red step stops every step after it. Declare one such test per test case the defect breaks, so each test case reports on its own.
|
|
54
|
+
- Accepted test cases may share one test that expects to pass.
|
|
55
|
+
- A test that expects to fail asserts a value the code does not return today. Before you declare that test, put that value on the test case it sends, as `expectedValue`, and name where you read it, as `expectedFrom`. If the source states the rule and never writes the number, put the rule in `derived` and leave `expectedValue` out.
|
|
56
56
|
12. **Register the whole plan in one call to `skyramp_register_test_plan`.** The call carries `changes`, `defects` and `plannedTests`.
|
|
57
57
|
13. **Answer each objection, or change the plan and register it again.**
|
|
58
58
|
An answer that says a state cannot be produced says what you tried.
|
|
@@ -39,10 +39,12 @@ does and does not cover are in the UI recommendation grounding section of the ex
|
|
|
39
39
|
|
|
40
40
|
## Analyze the change
|
|
41
41
|
|
|
42
|
-
{analyzeStep}. Call `skyramp_analyze_changes` with `repositoryPath`: "{repositoryPath}", `scope`: "branch_diff"{analyzeCountArgs}{baseBranchArg}{prNumberArg}{testsRepoDirArg}.
|
|
42
|
+
{analyzeStep}. Call `skyramp_analyze_changes` with `repositoryPath`: "{repositoryPath}", `repository`: "{primaryRepo}", `scope`: "branch_diff"{analyzeCountArgs}{baseBranchArg}{prNumberArg}{testsRepoDirArg}.
|
|
43
43
|
|
|
44
44
|
**Follow all instructions returned by `skyramp_analyze_changes`.**{uiCredentialsNote}
|
|
45
45
|
|
|
46
|
+
**Every later tool call names its repository.** `skyramp_analyze_test_health`, `skyramp_actions`, `skyramp_execute_test` and `skyramp_run_existing_tests` each take a `repository` argument beside the `stateFile` path `skyramp_analyze_changes` returned. It selects the section of the run state the tool reads and writes, so pass it on every such call. For a test in the primary repo, pass `{primaryRepo}`.
|
|
47
|
+
|
|
46
48
|
|
|
47
49
|
**Feature context check:** After you capture a blueprint, cross-check whether it actually shows the changed feature. Look at the diff — what component, field, or UI element was changed? If that component only renders in a specific context (a particular collection type, a non-empty list, a specific user role, a form that only appears after a prior action), and the blueprint you captured doesn't contain it, navigate to the right context before using this blueprint for recommendations. A blueprint that doesn't show the changed feature produces recommendations that test the wrong thing — for example, recommending tests against a system collection when the PR changed behavior on custom collections. If you cannot reach the right context from the diff and the workspace config, leave the planned test's element list empty, name the page you opened, and note it in `issuesFound`.
|
|
48
50
|
|
|
@@ -62,7 +64,7 @@ Log in once via the credentials in your <ui-credentials> context before you navi
|
|
|
62
64
|
- **({onFailureStep})** If analysis of a related repo fails (e.g. workspace init or diff error), record a one-line `issuesFound` note and CONTINUE — a missing related repo must not block the primary analysis.
|
|
63
65
|
Keep ALL returned diffs and recommendations from every repo in your working context. **Correlate** cross-repo changes when forming recommendations and the business case — e.g. an API contract changed in one repo and consumed by another, a request/response shape that must stay compatible across the boundary.
|
|
64
66
|
|
|
65
|
-
**One state file, per-repo sections.** There is exactly ONE state file for the whole run (created automatically and reused across calls). Each `skyramp_analyze_changes` call writes its repo's section into it
|
|
67
|
+
**One state file, per-repo sections.** There is exactly ONE state file for the whole run (created automatically and reused across calls). Each `skyramp_analyze_changes` call writes its repo's section into it, keyed by `repository`. The run declares its primary when it starts, so the root section is the primary's whichever call runs first. When you maintain or act on a related repo's tests, pass that repo's `repository` value on the call, exactly as step {analyzeStep} says to pass `{primaryRepo}` for the primary repo's tests.
|
|
66
68
|
|
|
67
69
|
**Cross-repo test generation ({generateTask} spans all repos).** Draft your planned tests from the analysis of the primary AND every related repo together, and register them as ONE plan. When you generate a test for a related repo's endpoint:
|
|
68
70
|
- **Execute it only if that repo's service is already running and reachable.** The workflow's setup may have started multiple services; before generating an API test for a related repo, confirm its `base_url` (from that repo's workspace/Execution Plan) responds. If the service is unreachable, still GENERATE the test but mark its `testResults` status as `Skipped` with details "service not running in this run" — do NOT count an unreachable service as a failure.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: enhance-assertions
|
|
3
|
+
description: Add and strengthen response-body assertions in a Skyramp test file, end to end — records the baseline, applies the rules, then verifies. Use for a freshly generated or newly maintained contract, integration, or UI test. Arguments: test type, mode, then the file path.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Enhance assertions in a Skyramp test file
|
|
7
|
+
|
|
8
|
+
`$ARGUMENTS` is a positional list: `$0` is the test type (`contract`, `integration`, or `ui`), `$1` is the mode (`generation` or `maintenance`), and the rest is the path of the test file, normally `$2`.
|
|
9
|
+
|
|
10
|
+
The two fixed values come first on purpose. Arguments split on spaces, so a path containing a space lands in `$2` onward; when `$2` looks truncated, take the path from `$ARGUMENTS` after the first two values.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
1. Call the `skyramp_enhance_assertions_snapshot` tool with `testFile` `$2`, `testType` `$0`, and `enhanceType` `$1`. It records the baseline the verification in step 6 measures against, and returns no instructions — this skill carries them. If it refuses, fix what it reports and call it again before editing anything.
|
|
15
|
+
2. Read `reference/shared-rules.md`. Its "Scope by mode" section says which test functions `$1` puts in scope. For `contract` and `integration`, the rest of that file is the shared rule set. For `ui`, skip the rest — `reference/ui.md` replaces it.
|
|
16
|
+
3. Read `reference/$0.md`.
|
|
17
|
+
4. Output the `<thinking>` block that the "Pre-Edit Assertion Analysis" section asks for.
|
|
18
|
+
5. Edit `$2` in place. Add assertion lines only. Do not restructure, reformat, reorder, add comments, or change imports, signatures, or variable names.
|
|
19
|
+
6. Call the `skyramp_verify_enhance_assertions` tool with the same three arguments. Fix every violation it reports and call it again until it passes.
|
|
20
|
+
|
|
21
|
+
Steps 1 and 6 are both required. The baseline must exist before the edits, or the verification cannot tell a strengthened assertion from a weakened one.
|
|
22
|
+
|
|
23
|
+
The goal is a test that FAILS when the app has a bug, not one that replays what happened.
|
|
24
|
+
|
|
25
|
+
Each test evaluates ONE behaviour. Assert that behaviour and the values it depends on, exactly, and leave the rest of the response alone — the rules say how to assert a value, not how many values to assert. An assertion on a field the behaviour does not depend on makes the test fail for reasons the test is not about, and buries what the test is for.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Contract test assertions
|
|
2
|
+
|
|
3
|
+
Apply everything in `reference/shared-rules.md`, plus the rule and the scope below.
|
|
4
|
+
|
|
5
|
+
## Additional assertion rules
|
|
6
|
+
|
|
7
|
+
### Chained values from inline request data (`chained-values`)
|
|
8
|
+
|
|
9
|
+
Every value used in an assertion must come from what is written inline in the test function — the request body, path, or query parameters.
|
|
10
|
+
|
|
11
|
+
- Do not reference data set up in `beforeAll` or any other setup helper.
|
|
12
|
+
- When an ID was sent in the request body, path, or query, assert its exact value in the response. Since the sent value is already known, asserting only that it is non-null is not sufficient.
|
|
13
|
+
- Reserve `is not None` / `not.toBeNull()` for server-generated IDs only.
|
|
14
|
+
- Apply the same rule to all other fields and to array items: use inline request body values as the expected values, not setup helper data.
|
|
15
|
+
- The behaviour this test claims must be proven from `expected_response_body`, the inline request body, or path/query literals — do not rely on the integration test to cover it.
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
expect(getResponseValue(productGetResponse, "id"), 'id').toBe(getResponseValue(productsPostResponse, "id"));
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
- Only modify test functions — do not touch `beforeAll`, `afterAll`, or any setup or teardown helper.
|
|
24
|
+
- Only add assertions clearly supported by `expected_response_body`, inline request / path / query literals, codebase evidence, or the test generation recommendations received for this test. Do not invent constraints.
|
|
25
|
+
- A response no behaviour in this file depends on needs its status code and nothing more.
|
|
26
|
+
- Add new assertions immediately after the existing status-code assertion — do not move or remove anything.
|
|
27
|
+
- Do not reference `beforeAll` / `afterAll` provisioning data in any assertion — every assertion value must come from the inline request body, path, query, prior response, or `expected_response_body`.
|
|
28
|
+
|
|
29
|
+
## Pre-edit checklist template
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
[
|
|
33
|
+
{
|
|
34
|
+
"step": "<METHOD> <path> → <responseVar>",
|
|
35
|
+
"response_status": "success | no_body | error",
|
|
36
|
+
"behaviour_under_test": "<the one-line behaviour this response is evidence for, or none>",
|
|
37
|
+
"rule_checklist": {
|
|
38
|
+
"behaviour-under-test": [],
|
|
39
|
+
"req-fields-echo-back": [],
|
|
40
|
+
"error-path": [],
|
|
41
|
+
"known-values": [],
|
|
42
|
+
"array-items": [],
|
|
43
|
+
"varying-values": [],
|
|
44
|
+
"exact-json-paths": [],
|
|
45
|
+
"computed-fields": [],
|
|
46
|
+
"nullable-present": [],
|
|
47
|
+
"chained-values": []
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Integration test assertions
|
|
2
|
+
|
|
3
|
+
Apply everything in `reference/shared-rules.md`, plus the rule and the scope below.
|
|
4
|
+
|
|
5
|
+
## Additional assertion rules
|
|
6
|
+
|
|
7
|
+
### Chained values across steps — chain, never hardcode (`chained-values`)
|
|
8
|
+
|
|
9
|
+
Every ID used in a later step must come from a prior step's response using the SDK helper — never hardcode an ID or declare it as a constant before the response that provides it.
|
|
10
|
+
|
|
11
|
+
- After a POST creates a resource, GET and PATCH steps should assert that the returned ID matches the one from the POST response.
|
|
12
|
+
- When a non-ID response value (such as a collection name, slug, or timestamp) is reused in a later request, extract it from the prior response instead of hardcoding it.
|
|
13
|
+
- After any POST, PATCH, DELETE, sort, reorder, or bulk operation, re-assert the chained, stable, and computed values on the follow-up read step: a follow-up GET after DELETE should return 404 or show the item absent; a follow-up GET after PATCH should assert the new value; a follow-up GET after sort/reorder should confirm the new ordering with chained IDs.
|
|
14
|
+
- After a POST creates a resource and a GET retrieves the collection, assert that the created item appears in the list by its chained ID with its exact stable fields — do not stop at a null-check on the array or the id alone.
|
|
15
|
+
- When one response field describes a count or summary of a collection returned by a related endpoint (for example, `active_session_count` from `/users/me` and the array length from `/users/me/sessions`), assert that relationship by comparing both extracted values — never hardcode the same number in two places.
|
|
16
|
+
- A state change the test is for ("Updates X", "Increments Y" — from the recommendation it came from, or from the test name when that name says more than `test_integration`) must be proven across the calls that carry it — do not rely on the contract test to cover it.
|
|
17
|
+
|
|
18
|
+
```javascript
|
|
19
|
+
expect(getResponseValue(productGetResponse, "id"), 'id').toBe(getResponseValue(productsPostResponse, "id"));
|
|
20
|
+
const collection = getValue(collectionsPostResponse, "data.collection");
|
|
21
|
+
expect(getValue(sessionsResponse, "data").length).toBe(getValue(meResponse, "data.active_session_count"));
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
const orderId = getResponseValue(ordersPostResponse, "id");
|
|
26
|
+
await skyramp.sendRequest(`/orders/${orderId}`);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Scope
|
|
30
|
+
|
|
31
|
+
- Apply to every `send_request` / `sendRequest` call that returns a body.
|
|
32
|
+
- Only add assertions clearly supported by the request body, prior response values, field names, codebase evidence, or the test generation recommendations received for this test. Do not invent constraints.
|
|
33
|
+
- A response no behaviour in this file depends on needs its status code and nothing more.
|
|
34
|
+
- Add new assertions immediately after the existing status-code assertion — do not move or remove anything.
|
|
35
|
+
|
|
36
|
+
## Pre-edit checklist template
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
[
|
|
40
|
+
{
|
|
41
|
+
"step": "<METHOD> <path> → <responseVar>",
|
|
42
|
+
"response_status": "success | no_body | error",
|
|
43
|
+
"behaviour_under_test": "<the one-line behaviour this response is evidence for, or none>",
|
|
44
|
+
"rule_checklist": {
|
|
45
|
+
"behaviour-under-test": [],
|
|
46
|
+
"req-fields-echo-back": [],
|
|
47
|
+
"error-path": [],
|
|
48
|
+
"known-values": [],
|
|
49
|
+
"array-items": [],
|
|
50
|
+
"varying-values": [],
|
|
51
|
+
"exact-json-paths": [],
|
|
52
|
+
"computed-fields": [],
|
|
53
|
+
"nullable-present": [],
|
|
54
|
+
"chained-values": []
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
```
|