@seontechnologies/playwright-utils 3.10.0
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/LICENSE +21 -0
- package/README.md +727 -0
- package/dist/cjs/api-request/api-request-fixture.d.ts +47 -0
- package/dist/cjs/api-request/api-request-fixture.d.ts.map +1 -0
- package/dist/cjs/api-request/api-request-fixture.js +26 -0
- package/dist/cjs/api-request/api-request-fixture.js.map +1 -0
- package/dist/cjs/api-request/api-request.d.ts +108 -0
- package/dist/cjs/api-request/api-request.d.ts.map +1 -0
- package/dist/cjs/api-request/api-request.js +326 -0
- package/dist/cjs/api-request/api-request.js.map +1 -0
- package/dist/cjs/api-request/fixtures.d.ts +3 -0
- package/dist/cjs/api-request/fixtures.d.ts.map +1 -0
- package/dist/cjs/api-request/fixtures.js +13 -0
- package/dist/cjs/api-request/fixtures.js.map +1 -0
- package/dist/cjs/api-request/index.d.ts +7 -0
- package/dist/cjs/api-request/index.d.ts.map +1 -0
- package/dist/cjs/api-request/index.js +11 -0
- package/dist/cjs/api-request/index.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/core.d.ts +13 -0
- package/dist/cjs/api-request/schema-validation/core.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/core.js +55 -0
- package/dist/cjs/api-request/schema-validation/core.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/fixture.d.ts +20 -0
- package/dist/cjs/api-request/schema-validation/fixture.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/fixture.js +17 -0
- package/dist/cjs/api-request/schema-validation/fixture.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/index.d.ts +6 -0
- package/dist/cjs/api-request/schema-validation/index.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/index.js +13 -0
- package/dist/cjs/api-request/schema-validation/index.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/file-loader.d.ts +50 -0
- package/dist/cjs/api-request/schema-validation/internal/file-loader.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/file-loader.js +126 -0
- package/dist/cjs/api-request/schema-validation/internal/file-loader.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/openapi-handler.d.ts +43 -0
- package/dist/cjs/api-request/schema-validation/internal/openapi-handler.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/openapi-handler.js +147 -0
- package/dist/cjs/api-request/schema-validation/internal/openapi-handler.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/promise-extension.d.ts +10 -0
- package/dist/cjs/api-request/schema-validation/internal/promise-extension.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/promise-extension.js +14 -0
- package/dist/cjs/api-request/schema-validation/internal/promise-extension.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/response-extension.d.ts +18 -0
- package/dist/cjs/api-request/schema-validation/internal/response-extension.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/response-extension.js +212 -0
- package/dist/cjs/api-request/schema-validation/internal/response-extension.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/result-builder.d.ts +62 -0
- package/dist/cjs/api-request/schema-validation/internal/result-builder.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/result-builder.js +140 -0
- package/dist/cjs/api-request/schema-validation/internal/result-builder.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/safe-error-serializer.d.ts +58 -0
- package/dist/cjs/api-request/schema-validation/internal/safe-error-serializer.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/safe-error-serializer.js +221 -0
- package/dist/cjs/api-request/schema-validation/internal/safe-error-serializer.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/schema-processors.d.ts +38 -0
- package/dist/cjs/api-request/schema-validation/internal/schema-processors.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/schema-processors.js +341 -0
- package/dist/cjs/api-request/schema-validation/internal/schema-processors.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/shape-validator.d.ts +96 -0
- package/dist/cjs/api-request/schema-validation/internal/shape-validator.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/shape-validator.js +180 -0
- package/dist/cjs/api-request/schema-validation/internal/shape-validator.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/validation-engine.d.ts +63 -0
- package/dist/cjs/api-request/schema-validation/internal/validation-engine.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/internal/validation-engine.js +395 -0
- package/dist/cjs/api-request/schema-validation/internal/validation-engine.js.map +1 -0
- package/dist/cjs/api-request/schema-validation/types.d.ts +92 -0
- package/dist/cjs/api-request/schema-validation/types.d.ts.map +1 -0
- package/dist/cjs/api-request/schema-validation/types.js +16 -0
- package/dist/cjs/api-request/schema-validation/types.js.map +1 -0
- package/dist/cjs/api-request/ui-display.d.ts +42 -0
- package/dist/cjs/api-request/ui-display.d.ts.map +1 -0
- package/dist/cjs/api-request/ui-display.js +370 -0
- package/dist/cjs/api-request/ui-display.js.map +1 -0
- package/dist/cjs/auth-session/apply-user-cookies-to-browser-context.d.ts +17 -0
- package/dist/cjs/auth-session/apply-user-cookies-to-browser-context.d.ts.map +1 -0
- package/dist/cjs/auth-session/apply-user-cookies-to-browser-context.js +49 -0
- package/dist/cjs/auth-session/apply-user-cookies-to-browser-context.js.map +1 -0
- package/dist/cjs/auth-session/core.d.ts +56 -0
- package/dist/cjs/auth-session/core.d.ts.map +1 -0
- package/dist/cjs/auth-session/core.js +271 -0
- package/dist/cjs/auth-session/core.js.map +1 -0
- package/dist/cjs/auth-session/fixtures.d.ts +83 -0
- package/dist/cjs/auth-session/fixtures.d.ts.map +1 -0
- package/dist/cjs/auth-session/fixtures.js +147 -0
- package/dist/cjs/auth-session/fixtures.js.map +1 -0
- package/dist/cjs/auth-session/global-setup-helper.d.ts +18 -0
- package/dist/cjs/auth-session/global-setup-helper.d.ts.map +1 -0
- package/dist/cjs/auth-session/global-setup-helper.js +26 -0
- package/dist/cjs/auth-session/global-setup-helper.js.map +1 -0
- package/dist/cjs/auth-session/index.d.ts +15 -0
- package/dist/cjs/auth-session/index.d.ts.map +1 -0
- package/dist/cjs/auth-session/index.js +45 -0
- package/dist/cjs/auth-session/index.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-configure.d.ts +19 -0
- package/dist/cjs/auth-session/internal/auth-configure.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-configure.js +117 -0
- package/dist/cjs/auth-session/internal/auth-configure.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-global-setup.d.ts +33 -0
- package/dist/cjs/auth-session/internal/auth-global-setup.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-global-setup.js +152 -0
- package/dist/cjs/auth-session/internal/auth-global-setup.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-provider-validator.d.ts +36 -0
- package/dist/cjs/auth-session/internal/auth-provider-validator.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-provider-validator.js +273 -0
- package/dist/cjs/auth-session/internal/auth-provider-validator.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-provider.d.ts +92 -0
- package/dist/cjs/auth-session/internal/auth-provider.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-provider.js +40 -0
- package/dist/cjs/auth-session/internal/auth-provider.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-session.d.ts +76 -0
- package/dist/cjs/auth-session/internal/auth-session.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-session.js +651 -0
- package/dist/cjs/auth-session/internal/auth-session.js.map +1 -0
- package/dist/cjs/auth-session/internal/auth-storage-utils.d.ts +62 -0
- package/dist/cjs/auth-session/internal/auth-storage-utils.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/auth-storage-utils.js +314 -0
- package/dist/cjs/auth-session/internal/auth-storage-utils.js.map +1 -0
- package/dist/cjs/auth-session/internal/cache-manager.d.ts +116 -0
- package/dist/cjs/auth-session/internal/cache-manager.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/cache-manager.js +267 -0
- package/dist/cjs/auth-session/internal/cache-manager.js.map +1 -0
- package/dist/cjs/auth-session/internal/types.d.ts +132 -0
- package/dist/cjs/auth-session/internal/types.d.ts.map +1 -0
- package/dist/cjs/auth-session/internal/types.js +4 -0
- package/dist/cjs/auth-session/internal/types.js.map +1 -0
- package/dist/cjs/burn-in/core/analyzer.d.ts +36 -0
- package/dist/cjs/burn-in/core/analyzer.d.ts.map +1 -0
- package/dist/cjs/burn-in/core/analyzer.js +329 -0
- package/dist/cjs/burn-in/core/analyzer.js.map +1 -0
- package/dist/cjs/burn-in/core/config.d.ts +4 -0
- package/dist/cjs/burn-in/core/config.d.ts.map +1 -0
- package/dist/cjs/burn-in/core/config.js +107 -0
- package/dist/cjs/burn-in/core/config.js.map +1 -0
- package/dist/cjs/burn-in/core/types.d.ts +24 -0
- package/dist/cjs/burn-in/core/types.d.ts.map +1 -0
- package/dist/cjs/burn-in/core/types.js +3 -0
- package/dist/cjs/burn-in/core/types.js.map +1 -0
- package/dist/cjs/burn-in/index.d.ts +3 -0
- package/dist/cjs/burn-in/index.d.ts.map +1 -0
- package/dist/cjs/burn-in/index.js +7 -0
- package/dist/cjs/burn-in/index.js.map +1 -0
- package/dist/cjs/burn-in/runner.d.ts +13 -0
- package/dist/cjs/burn-in/runner.d.ts.map +1 -0
- package/dist/cjs/burn-in/runner.js +61 -0
- package/dist/cjs/burn-in/runner.js.map +1 -0
- package/dist/cjs/file-utils/core/csv-reader.d.ts +35 -0
- package/dist/cjs/file-utils/core/csv-reader.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/csv-reader.js +206 -0
- package/dist/cjs/file-utils/core/csv-reader.js.map +1 -0
- package/dist/cjs/file-utils/core/file-downloader.d.ts +19 -0
- package/dist/cjs/file-utils/core/file-downloader.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/file-downloader.js +49 -0
- package/dist/cjs/file-utils/core/file-downloader.js.map +1 -0
- package/dist/cjs/file-utils/core/pdf-reader.d.ts +42 -0
- package/dist/cjs/file-utils/core/pdf-reader.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/pdf-reader.js +135 -0
- package/dist/cjs/file-utils/core/pdf-reader.js.map +1 -0
- package/dist/cjs/file-utils/core/types.d.ts +138 -0
- package/dist/cjs/file-utils/core/types.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/types.js +72 -0
- package/dist/cjs/file-utils/core/types.js.map +1 -0
- package/dist/cjs/file-utils/core/xlsx-reader.d.ts +31 -0
- package/dist/cjs/file-utils/core/xlsx-reader.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/xlsx-reader.js +216 -0
- package/dist/cjs/file-utils/core/xlsx-reader.js.map +1 -0
- package/dist/cjs/file-utils/core/zip-reader.d.ts +26 -0
- package/dist/cjs/file-utils/core/zip-reader.d.ts.map +1 -0
- package/dist/cjs/file-utils/core/zip-reader.js +95 -0
- package/dist/cjs/file-utils/core/zip-reader.js.map +1 -0
- package/dist/cjs/file-utils/file-utils-fixture.d.ts +16 -0
- package/dist/cjs/file-utils/file-utils-fixture.d.ts.map +1 -0
- package/dist/cjs/file-utils/file-utils-fixture.js +65 -0
- package/dist/cjs/file-utils/file-utils-fixture.js.map +1 -0
- package/dist/cjs/file-utils/fixtures.d.ts +2 -0
- package/dist/cjs/file-utils/fixtures.d.ts.map +1 -0
- package/dist/cjs/file-utils/fixtures.js +6 -0
- package/dist/cjs/file-utils/fixtures.js.map +1 -0
- package/dist/cjs/file-utils/index.d.ts +9 -0
- package/dist/cjs/file-utils/index.d.ts.map +1 -0
- package/dist/cjs/file-utils/index.js +25 -0
- package/dist/cjs/file-utils/index.js.map +1 -0
- package/dist/cjs/index.d.ts +13 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +45 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/intercept-network-call/core/fulfill-network-call.d.ts +10 -0
- package/dist/cjs/intercept-network-call/core/fulfill-network-call.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/core/fulfill-network-call.js +88 -0
- package/dist/cjs/intercept-network-call/core/fulfill-network-call.js.map +1 -0
- package/dist/cjs/intercept-network-call/core/observe-network-call.d.ts +4 -0
- package/dist/cjs/intercept-network-call/core/observe-network-call.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/core/observe-network-call.js +56 -0
- package/dist/cjs/intercept-network-call/core/observe-network-call.js.map +1 -0
- package/dist/cjs/intercept-network-call/core/types.d.ts +28 -0
- package/dist/cjs/intercept-network-call/core/types.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/core/types.js +28 -0
- package/dist/cjs/intercept-network-call/core/types.js.map +1 -0
- package/dist/cjs/intercept-network-call/core/utils/matches-request.d.ts +9 -0
- package/dist/cjs/intercept-network-call/core/utils/matches-request.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/core/utils/matches-request.js +32 -0
- package/dist/cjs/intercept-network-call/core/utils/matches-request.js.map +1 -0
- package/dist/cjs/intercept-network-call/fixtures.d.ts +2 -0
- package/dist/cjs/intercept-network-call/fixtures.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/fixtures.js +6 -0
- package/dist/cjs/intercept-network-call/fixtures.js.map +1 -0
- package/dist/cjs/intercept-network-call/index.d.ts +5 -0
- package/dist/cjs/intercept-network-call/index.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/index.js +11 -0
- package/dist/cjs/intercept-network-call/index.js.map +1 -0
- package/dist/cjs/intercept-network-call/intercept-network-call-fixture.d.ts +7 -0
- package/dist/cjs/intercept-network-call/intercept-network-call-fixture.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/intercept-network-call-fixture.js +18 -0
- package/dist/cjs/intercept-network-call/intercept-network-call-fixture.js.map +1 -0
- package/dist/cjs/intercept-network-call/intercept-network-call.d.ts +21 -0
- package/dist/cjs/intercept-network-call/intercept-network-call.d.ts.map +1 -0
- package/dist/cjs/intercept-network-call/intercept-network-call.js +59 -0
- package/dist/cjs/intercept-network-call/intercept-network-call.js.map +1 -0
- package/dist/cjs/internal/index.d.ts +2 -0
- package/dist/cjs/internal/index.d.ts.map +1 -0
- package/dist/cjs/internal/index.js +18 -0
- package/dist/cjs/internal/index.js.map +1 -0
- package/dist/cjs/internal/logger.d.ts +25 -0
- package/dist/cjs/internal/logger.d.ts.map +1 -0
- package/dist/cjs/internal/logger.js +33 -0
- package/dist/cjs/internal/logger.js.map +1 -0
- package/dist/cjs/log/config.d.ts +28 -0
- package/dist/cjs/log/config.d.ts.map +1 -0
- package/dist/cjs/log/config.js +165 -0
- package/dist/cjs/log/config.js.map +1 -0
- package/dist/cjs/log/fixtures.d.ts +2 -0
- package/dist/cjs/log/fixtures.d.ts.map +1 -0
- package/dist/cjs/log/fixtures.js +6 -0
- package/dist/cjs/log/fixtures.js.map +1 -0
- package/dist/cjs/log/formatters/colors.d.ts +13 -0
- package/dist/cjs/log/formatters/colors.d.ts.map +1 -0
- package/dist/cjs/log/formatters/colors.js +16 -0
- package/dist/cjs/log/formatters/colors.js.map +1 -0
- package/dist/cjs/log/formatters/format-message-base.d.ts +57 -0
- package/dist/cjs/log/formatters/format-message-base.d.ts.map +1 -0
- package/dist/cjs/log/formatters/format-message-base.js +198 -0
- package/dist/cjs/log/formatters/format-message-base.js.map +1 -0
- package/dist/cjs/log/formatters/format-message.d.ts +13 -0
- package/dist/cjs/log/formatters/format-message.d.ts.map +1 -0
- package/dist/cjs/log/formatters/format-message.js +127 -0
- package/dist/cjs/log/formatters/format-message.js.map +1 -0
- package/dist/cjs/log/index.d.ts +4 -0
- package/dist/cjs/log/index.d.ts.map +1 -0
- package/dist/cjs/log/index.js +14 -0
- package/dist/cjs/log/index.js.map +1 -0
- package/dist/cjs/log/log-fixture.d.ts +5 -0
- package/dist/cjs/log/log-fixture.d.ts.map +1 -0
- package/dist/cjs/log/log-fixture.js +23 -0
- package/dist/cjs/log/log-fixture.js.map +1 -0
- package/dist/cjs/log/log-organizer.d.ts +17 -0
- package/dist/cjs/log/log-organizer.d.ts.map +1 -0
- package/dist/cjs/log/log-organizer.js +81 -0
- package/dist/cjs/log/log-organizer.js.map +1 -0
- package/dist/cjs/log/log.d.ts +20 -0
- package/dist/cjs/log/log.d.ts.map +1 -0
- package/dist/cjs/log/log.js +268 -0
- package/dist/cjs/log/log.js.map +1 -0
- package/dist/cjs/log/outputs/add-test-header.d.ts +14 -0
- package/dist/cjs/log/outputs/add-test-header.d.ts.map +1 -0
- package/dist/cjs/log/outputs/add-test-header.js +92 -0
- package/dist/cjs/log/outputs/add-test-header.js.map +1 -0
- package/dist/cjs/log/outputs/context.d.ts +73 -0
- package/dist/cjs/log/outputs/context.d.ts.map +1 -0
- package/dist/cjs/log/outputs/context.js +156 -0
- package/dist/cjs/log/outputs/context.js.map +1 -0
- package/dist/cjs/log/outputs/create-log-file-path.d.ts +6 -0
- package/dist/cjs/log/outputs/create-log-file-path.d.ts.map +1 -0
- package/dist/cjs/log/outputs/create-log-file-path.js +118 -0
- package/dist/cjs/log/outputs/create-log-file-path.js.map +1 -0
- package/dist/cjs/log/outputs/log-to-console.d.ts +4 -0
- package/dist/cjs/log/outputs/log-to-console.d.ts.map +1 -0
- package/dist/cjs/log/outputs/log-to-console.js +26 -0
- package/dist/cjs/log/outputs/log-to-console.js.map +1 -0
- package/dist/cjs/log/outputs/log-to-file.d.ts +23 -0
- package/dist/cjs/log/outputs/log-to-file.d.ts.map +1 -0
- package/dist/cjs/log/outputs/log-to-file.js +198 -0
- package/dist/cjs/log/outputs/log-to-file.js.map +1 -0
- package/dist/cjs/log/test-step.d.ts +42 -0
- package/dist/cjs/log/test-step.d.ts.map +1 -0
- package/dist/cjs/log/test-step.js +110 -0
- package/dist/cjs/log/test-step.js.map +1 -0
- package/dist/cjs/log/types.d.ts +81 -0
- package/dist/cjs/log/types.d.ts.map +1 -0
- package/dist/cjs/log/types.js +13 -0
- package/dist/cjs/log/types.js.map +1 -0
- package/dist/cjs/log/utils/async.d.ts +6 -0
- package/dist/cjs/log/utils/async.d.ts.map +1 -0
- package/dist/cjs/log/utils/async.js +15 -0
- package/dist/cjs/log/utils/async.js.map +1 -0
- package/dist/cjs/log/utils/flag.d.ts +12 -0
- package/dist/cjs/log/utils/flag.d.ts.map +1 -0
- package/dist/cjs/log/utils/flag.js +19 -0
- package/dist/cjs/log/utils/flag.js.map +1 -0
- package/dist/cjs/log/utils/options.d.ts +14 -0
- package/dist/cjs/log/utils/options.d.ts.map +1 -0
- package/dist/cjs/log/utils/options.js +86 -0
- package/dist/cjs/log/utils/options.js.map +1 -0
- package/dist/cjs/log/utils/playwright-step-utils.d.ts +5 -0
- package/dist/cjs/log/utils/playwright-step-utils.d.ts.map +1 -0
- package/dist/cjs/log/utils/playwright-step-utils.js +48 -0
- package/dist/cjs/log/utils/playwright-step-utils.js.map +1 -0
- package/dist/cjs/network-error-monitor/fixtures.d.ts +91 -0
- package/dist/cjs/network-error-monitor/fixtures.d.ts.map +1 -0
- package/dist/cjs/network-error-monitor/fixtures.js +299 -0
- package/dist/cjs/network-error-monitor/fixtures.js.map +1 -0
- package/dist/cjs/network-recorder/core/har-builder.d.ts +122 -0
- package/dist/cjs/network-recorder/core/har-builder.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/har-builder.js +159 -0
- package/dist/cjs/network-recorder/core/har-builder.js.map +1 -0
- package/dist/cjs/network-recorder/core/har-manager.d.ts +74 -0
- package/dist/cjs/network-recorder/core/har-manager.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/har-manager.js +243 -0
- package/dist/cjs/network-recorder/core/har-manager.js.map +1 -0
- package/dist/cjs/network-recorder/core/har-playback-handler.d.ts +10 -0
- package/dist/cjs/network-recorder/core/har-playback-handler.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/har-playback-handler.js +291 -0
- package/dist/cjs/network-recorder/core/har-playback-handler.js.map +1 -0
- package/dist/cjs/network-recorder/core/index.d.ts +9 -0
- package/dist/cjs/network-recorder/core/index.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/index.js +35 -0
- package/dist/cjs/network-recorder/core/index.js.map +1 -0
- package/dist/cjs/network-recorder/core/mode-detector.d.ts +64 -0
- package/dist/cjs/network-recorder/core/mode-detector.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/mode-detector.js +191 -0
- package/dist/cjs/network-recorder/core/mode-detector.js.map +1 -0
- package/dist/cjs/network-recorder/core/network-recorder.d.ts +90 -0
- package/dist/cjs/network-recorder/core/network-recorder.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/network-recorder.js +260 -0
- package/dist/cjs/network-recorder/core/network-recorder.js.map +1 -0
- package/dist/cjs/network-recorder/core/stateful-api-mock.d.ts +31 -0
- package/dist/cjs/network-recorder/core/stateful-api-mock.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/stateful-api-mock.js +160 -0
- package/dist/cjs/network-recorder/core/stateful-api-mock.js.map +1 -0
- package/dist/cjs/network-recorder/core/types.d.ts +192 -0
- package/dist/cjs/network-recorder/core/types.d.ts.map +1 -0
- package/dist/cjs/network-recorder/core/types.js +54 -0
- package/dist/cjs/network-recorder/core/types.js.map +1 -0
- package/dist/cjs/network-recorder/fixtures.d.ts +2 -0
- package/dist/cjs/network-recorder/fixtures.d.ts.map +1 -0
- package/dist/cjs/network-recorder/fixtures.js +6 -0
- package/dist/cjs/network-recorder/fixtures.js.map +1 -0
- package/dist/cjs/network-recorder/index.d.ts +6 -0
- package/dist/cjs/network-recorder/index.d.ts.map +1 -0
- package/dist/cjs/network-recorder/index.js +22 -0
- package/dist/cjs/network-recorder/index.js.map +1 -0
- package/dist/cjs/network-recorder/network-recorder-fixture.d.ts +78 -0
- package/dist/cjs/network-recorder/network-recorder-fixture.d.ts.map +1 -0
- package/dist/cjs/network-recorder/network-recorder-fixture.js +79 -0
- package/dist/cjs/network-recorder/network-recorder-fixture.js.map +1 -0
- package/dist/cjs/network-recorder/network-recorder.d.ts +11 -0
- package/dist/cjs/network-recorder/network-recorder.d.ts.map +1 -0
- package/dist/cjs/network-recorder/network-recorder.js +32 -0
- package/dist/cjs/network-recorder/network-recorder.js.map +1 -0
- package/dist/cjs/recurse/fixtures.d.ts +2 -0
- package/dist/cjs/recurse/fixtures.d.ts.map +1 -0
- package/dist/cjs/recurse/fixtures.js +6 -0
- package/dist/cjs/recurse/fixtures.js.map +1 -0
- package/dist/cjs/recurse/index.d.ts +2 -0
- package/dist/cjs/recurse/index.d.ts.map +1 -0
- package/dist/cjs/recurse/index.js +18 -0
- package/dist/cjs/recurse/index.js.map +1 -0
- package/dist/cjs/recurse/recurse-fixture.d.ts +35 -0
- package/dist/cjs/recurse/recurse-fixture.d.ts.map +1 -0
- package/dist/cjs/recurse/recurse-fixture.js +14 -0
- package/dist/cjs/recurse/recurse-fixture.js.map +1 -0
- package/dist/cjs/recurse/recurse.d.ts +108 -0
- package/dist/cjs/recurse/recurse.d.ts.map +1 -0
- package/dist/cjs/recurse/recurse.js +298 -0
- package/dist/cjs/recurse/recurse.js.map +1 -0
- package/dist/esm/api-request/api-request-fixture.d.ts +47 -0
- package/dist/esm/api-request/api-request-fixture.d.ts.map +1 -0
- package/dist/esm/api-request/api-request-fixture.js +26 -0
- package/dist/esm/api-request/api-request-fixture.js.map +1 -0
- package/dist/esm/api-request/api-request.d.ts +108 -0
- package/dist/esm/api-request/api-request.d.ts.map +1 -0
- package/dist/esm/api-request/api-request.js +326 -0
- package/dist/esm/api-request/api-request.js.map +1 -0
- package/dist/esm/api-request/fixtures.d.ts +3 -0
- package/dist/esm/api-request/fixtures.d.ts.map +1 -0
- package/dist/esm/api-request/fixtures.js +13 -0
- package/dist/esm/api-request/fixtures.js.map +1 -0
- package/dist/esm/api-request/index.d.ts +7 -0
- package/dist/esm/api-request/index.d.ts.map +1 -0
- package/dist/esm/api-request/index.js +11 -0
- package/dist/esm/api-request/index.js.map +1 -0
- package/dist/esm/api-request/schema-validation/core.d.ts +13 -0
- package/dist/esm/api-request/schema-validation/core.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/core.js +55 -0
- package/dist/esm/api-request/schema-validation/core.js.map +1 -0
- package/dist/esm/api-request/schema-validation/fixture.d.ts +20 -0
- package/dist/esm/api-request/schema-validation/fixture.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/fixture.js +17 -0
- package/dist/esm/api-request/schema-validation/fixture.js.map +1 -0
- package/dist/esm/api-request/schema-validation/index.d.ts +6 -0
- package/dist/esm/api-request/schema-validation/index.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/index.js +13 -0
- package/dist/esm/api-request/schema-validation/index.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/file-loader.d.ts +50 -0
- package/dist/esm/api-request/schema-validation/internal/file-loader.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/file-loader.js +126 -0
- package/dist/esm/api-request/schema-validation/internal/file-loader.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/openapi-handler.d.ts +43 -0
- package/dist/esm/api-request/schema-validation/internal/openapi-handler.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/openapi-handler.js +147 -0
- package/dist/esm/api-request/schema-validation/internal/openapi-handler.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/promise-extension.d.ts +10 -0
- package/dist/esm/api-request/schema-validation/internal/promise-extension.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/promise-extension.js +14 -0
- package/dist/esm/api-request/schema-validation/internal/promise-extension.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/response-extension.d.ts +18 -0
- package/dist/esm/api-request/schema-validation/internal/response-extension.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/response-extension.js +212 -0
- package/dist/esm/api-request/schema-validation/internal/response-extension.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/result-builder.d.ts +62 -0
- package/dist/esm/api-request/schema-validation/internal/result-builder.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/result-builder.js +140 -0
- package/dist/esm/api-request/schema-validation/internal/result-builder.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/safe-error-serializer.d.ts +58 -0
- package/dist/esm/api-request/schema-validation/internal/safe-error-serializer.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/safe-error-serializer.js +221 -0
- package/dist/esm/api-request/schema-validation/internal/safe-error-serializer.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/schema-processors.d.ts +38 -0
- package/dist/esm/api-request/schema-validation/internal/schema-processors.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/schema-processors.js +341 -0
- package/dist/esm/api-request/schema-validation/internal/schema-processors.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/shape-validator.d.ts +96 -0
- package/dist/esm/api-request/schema-validation/internal/shape-validator.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/shape-validator.js +180 -0
- package/dist/esm/api-request/schema-validation/internal/shape-validator.js.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/validation-engine.d.ts +63 -0
- package/dist/esm/api-request/schema-validation/internal/validation-engine.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/internal/validation-engine.js +395 -0
- package/dist/esm/api-request/schema-validation/internal/validation-engine.js.map +1 -0
- package/dist/esm/api-request/schema-validation/types.d.ts +92 -0
- package/dist/esm/api-request/schema-validation/types.d.ts.map +1 -0
- package/dist/esm/api-request/schema-validation/types.js +16 -0
- package/dist/esm/api-request/schema-validation/types.js.map +1 -0
- package/dist/esm/api-request/ui-display.d.ts +42 -0
- package/dist/esm/api-request/ui-display.d.ts.map +1 -0
- package/dist/esm/api-request/ui-display.js +370 -0
- package/dist/esm/api-request/ui-display.js.map +1 -0
- package/dist/esm/auth-session/apply-user-cookies-to-browser-context.d.ts +17 -0
- package/dist/esm/auth-session/apply-user-cookies-to-browser-context.d.ts.map +1 -0
- package/dist/esm/auth-session/apply-user-cookies-to-browser-context.js +49 -0
- package/dist/esm/auth-session/apply-user-cookies-to-browser-context.js.map +1 -0
- package/dist/esm/auth-session/core.d.ts +56 -0
- package/dist/esm/auth-session/core.d.ts.map +1 -0
- package/dist/esm/auth-session/core.js +271 -0
- package/dist/esm/auth-session/core.js.map +1 -0
- package/dist/esm/auth-session/fixtures.d.ts +83 -0
- package/dist/esm/auth-session/fixtures.d.ts.map +1 -0
- package/dist/esm/auth-session/fixtures.js +147 -0
- package/dist/esm/auth-session/fixtures.js.map +1 -0
- package/dist/esm/auth-session/global-setup-helper.d.ts +18 -0
- package/dist/esm/auth-session/global-setup-helper.d.ts.map +1 -0
- package/dist/esm/auth-session/global-setup-helper.js +26 -0
- package/dist/esm/auth-session/global-setup-helper.js.map +1 -0
- package/dist/esm/auth-session/index.d.ts +15 -0
- package/dist/esm/auth-session/index.d.ts.map +1 -0
- package/dist/esm/auth-session/index.js +45 -0
- package/dist/esm/auth-session/index.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-configure.d.ts +19 -0
- package/dist/esm/auth-session/internal/auth-configure.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-configure.js +117 -0
- package/dist/esm/auth-session/internal/auth-configure.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-global-setup.d.ts +33 -0
- package/dist/esm/auth-session/internal/auth-global-setup.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-global-setup.js +152 -0
- package/dist/esm/auth-session/internal/auth-global-setup.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-provider-validator.d.ts +36 -0
- package/dist/esm/auth-session/internal/auth-provider-validator.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-provider-validator.js +240 -0
- package/dist/esm/auth-session/internal/auth-provider-validator.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-provider.d.ts +92 -0
- package/dist/esm/auth-session/internal/auth-provider.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-provider.js +40 -0
- package/dist/esm/auth-session/internal/auth-provider.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-session.d.ts +76 -0
- package/dist/esm/auth-session/internal/auth-session.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-session.js +651 -0
- package/dist/esm/auth-session/internal/auth-session.js.map +1 -0
- package/dist/esm/auth-session/internal/auth-storage-utils.d.ts +62 -0
- package/dist/esm/auth-session/internal/auth-storage-utils.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/auth-storage-utils.js +314 -0
- package/dist/esm/auth-session/internal/auth-storage-utils.js.map +1 -0
- package/dist/esm/auth-session/internal/cache-manager.d.ts +116 -0
- package/dist/esm/auth-session/internal/cache-manager.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/cache-manager.js +267 -0
- package/dist/esm/auth-session/internal/cache-manager.js.map +1 -0
- package/dist/esm/auth-session/internal/types.d.ts +132 -0
- package/dist/esm/auth-session/internal/types.d.ts.map +1 -0
- package/dist/esm/auth-session/internal/types.js +4 -0
- package/dist/esm/auth-session/internal/types.js.map +1 -0
- package/dist/esm/burn-in/core/analyzer.d.ts +36 -0
- package/dist/esm/burn-in/core/analyzer.d.ts.map +1 -0
- package/dist/esm/burn-in/core/analyzer.js +329 -0
- package/dist/esm/burn-in/core/analyzer.js.map +1 -0
- package/dist/esm/burn-in/core/config.d.ts +4 -0
- package/dist/esm/burn-in/core/config.d.ts.map +1 -0
- package/dist/esm/burn-in/core/config.js +107 -0
- package/dist/esm/burn-in/core/config.js.map +1 -0
- package/dist/esm/burn-in/core/types.d.ts +24 -0
- package/dist/esm/burn-in/core/types.d.ts.map +1 -0
- package/dist/esm/burn-in/core/types.js +3 -0
- package/dist/esm/burn-in/core/types.js.map +1 -0
- package/dist/esm/burn-in/index.d.ts +3 -0
- package/dist/esm/burn-in/index.d.ts.map +1 -0
- package/dist/esm/burn-in/index.js +7 -0
- package/dist/esm/burn-in/index.js.map +1 -0
- package/dist/esm/burn-in/runner.d.ts +13 -0
- package/dist/esm/burn-in/runner.d.ts.map +1 -0
- package/dist/esm/burn-in/runner.js +61 -0
- package/dist/esm/burn-in/runner.js.map +1 -0
- package/dist/esm/file-utils/core/csv-reader.d.ts +35 -0
- package/dist/esm/file-utils/core/csv-reader.d.ts.map +1 -0
- package/dist/esm/file-utils/core/csv-reader.js +206 -0
- package/dist/esm/file-utils/core/csv-reader.js.map +1 -0
- package/dist/esm/file-utils/core/file-downloader.d.ts +19 -0
- package/dist/esm/file-utils/core/file-downloader.d.ts.map +1 -0
- package/dist/esm/file-utils/core/file-downloader.js +49 -0
- package/dist/esm/file-utils/core/file-downloader.js.map +1 -0
- package/dist/esm/file-utils/core/pdf-reader.d.ts +42 -0
- package/dist/esm/file-utils/core/pdf-reader.d.ts.map +1 -0
- package/dist/esm/file-utils/core/pdf-reader.js +135 -0
- package/dist/esm/file-utils/core/pdf-reader.js.map +1 -0
- package/dist/esm/file-utils/core/types.d.ts +138 -0
- package/dist/esm/file-utils/core/types.d.ts.map +1 -0
- package/dist/esm/file-utils/core/types.js +72 -0
- package/dist/esm/file-utils/core/types.js.map +1 -0
- package/dist/esm/file-utils/core/xlsx-reader.d.ts +31 -0
- package/dist/esm/file-utils/core/xlsx-reader.d.ts.map +1 -0
- package/dist/esm/file-utils/core/xlsx-reader.js +216 -0
- package/dist/esm/file-utils/core/xlsx-reader.js.map +1 -0
- package/dist/esm/file-utils/core/zip-reader.d.ts +26 -0
- package/dist/esm/file-utils/core/zip-reader.d.ts.map +1 -0
- package/dist/esm/file-utils/core/zip-reader.js +95 -0
- package/dist/esm/file-utils/core/zip-reader.js.map +1 -0
- package/dist/esm/file-utils/file-utils-fixture.d.ts +16 -0
- package/dist/esm/file-utils/file-utils-fixture.d.ts.map +1 -0
- package/dist/esm/file-utils/file-utils-fixture.js +65 -0
- package/dist/esm/file-utils/file-utils-fixture.js.map +1 -0
- package/dist/esm/file-utils/fixtures.d.ts +2 -0
- package/dist/esm/file-utils/fixtures.d.ts.map +1 -0
- package/dist/esm/file-utils/fixtures.js +6 -0
- package/dist/esm/file-utils/fixtures.js.map +1 -0
- package/dist/esm/file-utils/index.d.ts +9 -0
- package/dist/esm/file-utils/index.d.ts.map +1 -0
- package/dist/esm/file-utils/index.js +25 -0
- package/dist/esm/file-utils/index.js.map +1 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +45 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/intercept-network-call/core/fulfill-network-call.d.ts +10 -0
- package/dist/esm/intercept-network-call/core/fulfill-network-call.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/core/fulfill-network-call.js +88 -0
- package/dist/esm/intercept-network-call/core/fulfill-network-call.js.map +1 -0
- package/dist/esm/intercept-network-call/core/observe-network-call.d.ts +4 -0
- package/dist/esm/intercept-network-call/core/observe-network-call.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/core/observe-network-call.js +56 -0
- package/dist/esm/intercept-network-call/core/observe-network-call.js.map +1 -0
- package/dist/esm/intercept-network-call/core/types.d.ts +28 -0
- package/dist/esm/intercept-network-call/core/types.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/core/types.js +28 -0
- package/dist/esm/intercept-network-call/core/types.js.map +1 -0
- package/dist/esm/intercept-network-call/core/utils/matches-request.d.ts +9 -0
- package/dist/esm/intercept-network-call/core/utils/matches-request.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/core/utils/matches-request.js +32 -0
- package/dist/esm/intercept-network-call/core/utils/matches-request.js.map +1 -0
- package/dist/esm/intercept-network-call/fixtures.d.ts +2 -0
- package/dist/esm/intercept-network-call/fixtures.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/fixtures.js +6 -0
- package/dist/esm/intercept-network-call/fixtures.js.map +1 -0
- package/dist/esm/intercept-network-call/index.d.ts +5 -0
- package/dist/esm/intercept-network-call/index.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/index.js +11 -0
- package/dist/esm/intercept-network-call/index.js.map +1 -0
- package/dist/esm/intercept-network-call/intercept-network-call-fixture.d.ts +7 -0
- package/dist/esm/intercept-network-call/intercept-network-call-fixture.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/intercept-network-call-fixture.js +18 -0
- package/dist/esm/intercept-network-call/intercept-network-call-fixture.js.map +1 -0
- package/dist/esm/intercept-network-call/intercept-network-call.d.ts +21 -0
- package/dist/esm/intercept-network-call/intercept-network-call.d.ts.map +1 -0
- package/dist/esm/intercept-network-call/intercept-network-call.js +59 -0
- package/dist/esm/intercept-network-call/intercept-network-call.js.map +1 -0
- package/dist/esm/internal/index.d.ts +2 -0
- package/dist/esm/internal/index.d.ts.map +1 -0
- package/dist/esm/internal/index.js +18 -0
- package/dist/esm/internal/index.js.map +1 -0
- package/dist/esm/internal/logger.d.ts +25 -0
- package/dist/esm/internal/logger.d.ts.map +1 -0
- package/dist/esm/internal/logger.js +33 -0
- package/dist/esm/internal/logger.js.map +1 -0
- package/dist/esm/log/config.d.ts +28 -0
- package/dist/esm/log/config.d.ts.map +1 -0
- package/dist/esm/log/config.js +165 -0
- package/dist/esm/log/config.js.map +1 -0
- package/dist/esm/log/fixtures.d.ts +2 -0
- package/dist/esm/log/fixtures.d.ts.map +1 -0
- package/dist/esm/log/fixtures.js +6 -0
- package/dist/esm/log/fixtures.js.map +1 -0
- package/dist/esm/log/formatters/colors.d.ts +13 -0
- package/dist/esm/log/formatters/colors.d.ts.map +1 -0
- package/dist/esm/log/formatters/colors.js +16 -0
- package/dist/esm/log/formatters/colors.js.map +1 -0
- package/dist/esm/log/formatters/format-message-base.d.ts +57 -0
- package/dist/esm/log/formatters/format-message-base.d.ts.map +1 -0
- package/dist/esm/log/formatters/format-message-base.js +198 -0
- package/dist/esm/log/formatters/format-message-base.js.map +1 -0
- package/dist/esm/log/formatters/format-message.d.ts +13 -0
- package/dist/esm/log/formatters/format-message.d.ts.map +1 -0
- package/dist/esm/log/formatters/format-message.js +127 -0
- package/dist/esm/log/formatters/format-message.js.map +1 -0
- package/dist/esm/log/index.d.ts +4 -0
- package/dist/esm/log/index.d.ts.map +1 -0
- package/dist/esm/log/index.js +14 -0
- package/dist/esm/log/index.js.map +1 -0
- package/dist/esm/log/log-fixture.d.ts +5 -0
- package/dist/esm/log/log-fixture.d.ts.map +1 -0
- package/dist/esm/log/log-fixture.js +23 -0
- package/dist/esm/log/log-fixture.js.map +1 -0
- package/dist/esm/log/log-organizer.d.ts +17 -0
- package/dist/esm/log/log-organizer.d.ts.map +1 -0
- package/dist/esm/log/log-organizer.js +81 -0
- package/dist/esm/log/log-organizer.js.map +1 -0
- package/dist/esm/log/log.d.ts +20 -0
- package/dist/esm/log/log.d.ts.map +1 -0
- package/dist/esm/log/log.js +268 -0
- package/dist/esm/log/log.js.map +1 -0
- package/dist/esm/log/outputs/add-test-header.d.ts +14 -0
- package/dist/esm/log/outputs/add-test-header.d.ts.map +1 -0
- package/dist/esm/log/outputs/add-test-header.js +92 -0
- package/dist/esm/log/outputs/add-test-header.js.map +1 -0
- package/dist/esm/log/outputs/context.d.ts +73 -0
- package/dist/esm/log/outputs/context.d.ts.map +1 -0
- package/dist/esm/log/outputs/context.js +156 -0
- package/dist/esm/log/outputs/context.js.map +1 -0
- package/dist/esm/log/outputs/create-log-file-path.d.ts +6 -0
- package/dist/esm/log/outputs/create-log-file-path.d.ts.map +1 -0
- package/dist/esm/log/outputs/create-log-file-path.js +118 -0
- package/dist/esm/log/outputs/create-log-file-path.js.map +1 -0
- package/dist/esm/log/outputs/log-to-console.d.ts +4 -0
- package/dist/esm/log/outputs/log-to-console.d.ts.map +1 -0
- package/dist/esm/log/outputs/log-to-console.js +26 -0
- package/dist/esm/log/outputs/log-to-console.js.map +1 -0
- package/dist/esm/log/outputs/log-to-file.d.ts +23 -0
- package/dist/esm/log/outputs/log-to-file.d.ts.map +1 -0
- package/dist/esm/log/outputs/log-to-file.js +198 -0
- package/dist/esm/log/outputs/log-to-file.js.map +1 -0
- package/dist/esm/log/test-step.d.ts +42 -0
- package/dist/esm/log/test-step.d.ts.map +1 -0
- package/dist/esm/log/test-step.js +110 -0
- package/dist/esm/log/test-step.js.map +1 -0
- package/dist/esm/log/types.d.ts +81 -0
- package/dist/esm/log/types.d.ts.map +1 -0
- package/dist/esm/log/types.js +13 -0
- package/dist/esm/log/types.js.map +1 -0
- package/dist/esm/log/utils/async.d.ts +6 -0
- package/dist/esm/log/utils/async.d.ts.map +1 -0
- package/dist/esm/log/utils/async.js +15 -0
- package/dist/esm/log/utils/async.js.map +1 -0
- package/dist/esm/log/utils/flag.d.ts +12 -0
- package/dist/esm/log/utils/flag.d.ts.map +1 -0
- package/dist/esm/log/utils/flag.js +19 -0
- package/dist/esm/log/utils/flag.js.map +1 -0
- package/dist/esm/log/utils/options.d.ts +14 -0
- package/dist/esm/log/utils/options.d.ts.map +1 -0
- package/dist/esm/log/utils/options.js +86 -0
- package/dist/esm/log/utils/options.js.map +1 -0
- package/dist/esm/log/utils/playwright-step-utils.d.ts +5 -0
- package/dist/esm/log/utils/playwright-step-utils.d.ts.map +1 -0
- package/dist/esm/log/utils/playwright-step-utils.js +48 -0
- package/dist/esm/log/utils/playwright-step-utils.js.map +1 -0
- package/dist/esm/network-error-monitor/fixtures.d.ts +91 -0
- package/dist/esm/network-error-monitor/fixtures.d.ts.map +1 -0
- package/dist/esm/network-error-monitor/fixtures.js +299 -0
- package/dist/esm/network-error-monitor/fixtures.js.map +1 -0
- package/dist/esm/network-recorder/core/har-builder.d.ts +122 -0
- package/dist/esm/network-recorder/core/har-builder.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/har-builder.js +159 -0
- package/dist/esm/network-recorder/core/har-builder.js.map +1 -0
- package/dist/esm/network-recorder/core/har-manager.d.ts +74 -0
- package/dist/esm/network-recorder/core/har-manager.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/har-manager.js +243 -0
- package/dist/esm/network-recorder/core/har-manager.js.map +1 -0
- package/dist/esm/network-recorder/core/har-playback-handler.d.ts +10 -0
- package/dist/esm/network-recorder/core/har-playback-handler.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/har-playback-handler.js +291 -0
- package/dist/esm/network-recorder/core/har-playback-handler.js.map +1 -0
- package/dist/esm/network-recorder/core/index.d.ts +9 -0
- package/dist/esm/network-recorder/core/index.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/index.js +35 -0
- package/dist/esm/network-recorder/core/index.js.map +1 -0
- package/dist/esm/network-recorder/core/mode-detector.d.ts +64 -0
- package/dist/esm/network-recorder/core/mode-detector.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/mode-detector.js +191 -0
- package/dist/esm/network-recorder/core/mode-detector.js.map +1 -0
- package/dist/esm/network-recorder/core/network-recorder.d.ts +90 -0
- package/dist/esm/network-recorder/core/network-recorder.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/network-recorder.js +260 -0
- package/dist/esm/network-recorder/core/network-recorder.js.map +1 -0
- package/dist/esm/network-recorder/core/stateful-api-mock.d.ts +31 -0
- package/dist/esm/network-recorder/core/stateful-api-mock.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/stateful-api-mock.js +160 -0
- package/dist/esm/network-recorder/core/stateful-api-mock.js.map +1 -0
- package/dist/esm/network-recorder/core/types.d.ts +192 -0
- package/dist/esm/network-recorder/core/types.d.ts.map +1 -0
- package/dist/esm/network-recorder/core/types.js +54 -0
- package/dist/esm/network-recorder/core/types.js.map +1 -0
- package/dist/esm/network-recorder/fixtures.d.ts +2 -0
- package/dist/esm/network-recorder/fixtures.d.ts.map +1 -0
- package/dist/esm/network-recorder/fixtures.js +6 -0
- package/dist/esm/network-recorder/fixtures.js.map +1 -0
- package/dist/esm/network-recorder/index.d.ts +6 -0
- package/dist/esm/network-recorder/index.d.ts.map +1 -0
- package/dist/esm/network-recorder/index.js +22 -0
- package/dist/esm/network-recorder/index.js.map +1 -0
- package/dist/esm/network-recorder/network-recorder-fixture.d.ts +78 -0
- package/dist/esm/network-recorder/network-recorder-fixture.d.ts.map +1 -0
- package/dist/esm/network-recorder/network-recorder-fixture.js +79 -0
- package/dist/esm/network-recorder/network-recorder-fixture.js.map +1 -0
- package/dist/esm/network-recorder/network-recorder.d.ts +11 -0
- package/dist/esm/network-recorder/network-recorder.d.ts.map +1 -0
- package/dist/esm/network-recorder/network-recorder.js +32 -0
- package/dist/esm/network-recorder/network-recorder.js.map +1 -0
- package/dist/esm/recurse/fixtures.d.ts +2 -0
- package/dist/esm/recurse/fixtures.d.ts.map +1 -0
- package/dist/esm/recurse/fixtures.js +6 -0
- package/dist/esm/recurse/fixtures.js.map +1 -0
- package/dist/esm/recurse/index.d.ts +2 -0
- package/dist/esm/recurse/index.d.ts.map +1 -0
- package/dist/esm/recurse/index.js +18 -0
- package/dist/esm/recurse/index.js.map +1 -0
- package/dist/esm/recurse/recurse-fixture.d.ts +35 -0
- package/dist/esm/recurse/recurse-fixture.d.ts.map +1 -0
- package/dist/esm/recurse/recurse-fixture.js +14 -0
- package/dist/esm/recurse/recurse-fixture.js.map +1 -0
- package/dist/esm/recurse/recurse.d.ts +108 -0
- package/dist/esm/recurse/recurse.d.ts.map +1 -0
- package/dist/esm/recurse/recurse.js +298 -0
- package/dist/esm/recurse/recurse.js.map +1 -0
- package/dist/types/api-request/api-request-fixture.d.ts +47 -0
- package/dist/types/api-request/api-request-fixture.d.ts.map +1 -0
- package/dist/types/api-request/api-request.d.ts +108 -0
- package/dist/types/api-request/api-request.d.ts.map +1 -0
- package/dist/types/api-request/fixtures.d.ts +3 -0
- package/dist/types/api-request/fixtures.d.ts.map +1 -0
- package/dist/types/api-request/index.d.ts +7 -0
- package/dist/types/api-request/index.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/core.d.ts +13 -0
- package/dist/types/api-request/schema-validation/core.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/fixture.d.ts +20 -0
- package/dist/types/api-request/schema-validation/fixture.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/index.d.ts +6 -0
- package/dist/types/api-request/schema-validation/index.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/file-loader.d.ts +50 -0
- package/dist/types/api-request/schema-validation/internal/file-loader.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/openapi-handler.d.ts +43 -0
- package/dist/types/api-request/schema-validation/internal/openapi-handler.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/promise-extension.d.ts +10 -0
- package/dist/types/api-request/schema-validation/internal/promise-extension.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/response-extension.d.ts +18 -0
- package/dist/types/api-request/schema-validation/internal/response-extension.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/result-builder.d.ts +62 -0
- package/dist/types/api-request/schema-validation/internal/result-builder.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/safe-error-serializer.d.ts +58 -0
- package/dist/types/api-request/schema-validation/internal/safe-error-serializer.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/schema-processors.d.ts +38 -0
- package/dist/types/api-request/schema-validation/internal/schema-processors.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/shape-validator.d.ts +96 -0
- package/dist/types/api-request/schema-validation/internal/shape-validator.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/internal/validation-engine.d.ts +63 -0
- package/dist/types/api-request/schema-validation/internal/validation-engine.d.ts.map +1 -0
- package/dist/types/api-request/schema-validation/types.d.ts +92 -0
- package/dist/types/api-request/schema-validation/types.d.ts.map +1 -0
- package/dist/types/api-request/ui-display.d.ts +42 -0
- package/dist/types/api-request/ui-display.d.ts.map +1 -0
- package/dist/types/auth-session/apply-user-cookies-to-browser-context.d.ts +17 -0
- package/dist/types/auth-session/apply-user-cookies-to-browser-context.d.ts.map +1 -0
- package/dist/types/auth-session/core.d.ts +56 -0
- package/dist/types/auth-session/core.d.ts.map +1 -0
- package/dist/types/auth-session/fixtures.d.ts +83 -0
- package/dist/types/auth-session/fixtures.d.ts.map +1 -0
- package/dist/types/auth-session/global-setup-helper.d.ts +18 -0
- package/dist/types/auth-session/global-setup-helper.d.ts.map +1 -0
- package/dist/types/auth-session/index.d.ts +15 -0
- package/dist/types/auth-session/index.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-configure.d.ts +19 -0
- package/dist/types/auth-session/internal/auth-configure.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-global-setup.d.ts +33 -0
- package/dist/types/auth-session/internal/auth-global-setup.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-provider-validator.d.ts +36 -0
- package/dist/types/auth-session/internal/auth-provider-validator.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-provider.d.ts +92 -0
- package/dist/types/auth-session/internal/auth-provider.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-session.d.ts +76 -0
- package/dist/types/auth-session/internal/auth-session.d.ts.map +1 -0
- package/dist/types/auth-session/internal/auth-storage-utils.d.ts +62 -0
- package/dist/types/auth-session/internal/auth-storage-utils.d.ts.map +1 -0
- package/dist/types/auth-session/internal/cache-manager.d.ts +116 -0
- package/dist/types/auth-session/internal/cache-manager.d.ts.map +1 -0
- package/dist/types/auth-session/internal/types.d.ts +132 -0
- package/dist/types/auth-session/internal/types.d.ts.map +1 -0
- package/dist/types/burn-in/core/analyzer.d.ts +36 -0
- package/dist/types/burn-in/core/analyzer.d.ts.map +1 -0
- package/dist/types/burn-in/core/config.d.ts +4 -0
- package/dist/types/burn-in/core/config.d.ts.map +1 -0
- package/dist/types/burn-in/core/types.d.ts +24 -0
- package/dist/types/burn-in/core/types.d.ts.map +1 -0
- package/dist/types/burn-in/index.d.ts +3 -0
- package/dist/types/burn-in/index.d.ts.map +1 -0
- package/dist/types/burn-in/runner.d.ts +13 -0
- package/dist/types/burn-in/runner.d.ts.map +1 -0
- package/dist/types/file-utils/core/csv-reader.d.ts +35 -0
- package/dist/types/file-utils/core/csv-reader.d.ts.map +1 -0
- package/dist/types/file-utils/core/file-downloader.d.ts +19 -0
- package/dist/types/file-utils/core/file-downloader.d.ts.map +1 -0
- package/dist/types/file-utils/core/pdf-reader.d.ts +42 -0
- package/dist/types/file-utils/core/pdf-reader.d.ts.map +1 -0
- package/dist/types/file-utils/core/types.d.ts +138 -0
- package/dist/types/file-utils/core/types.d.ts.map +1 -0
- package/dist/types/file-utils/core/xlsx-reader.d.ts +31 -0
- package/dist/types/file-utils/core/xlsx-reader.d.ts.map +1 -0
- package/dist/types/file-utils/core/zip-reader.d.ts +26 -0
- package/dist/types/file-utils/core/zip-reader.d.ts.map +1 -0
- package/dist/types/file-utils/file-utils-fixture.d.ts +16 -0
- package/dist/types/file-utils/file-utils-fixture.d.ts.map +1 -0
- package/dist/types/file-utils/fixtures.d.ts +2 -0
- package/dist/types/file-utils/fixtures.d.ts.map +1 -0
- package/dist/types/file-utils/index.d.ts +9 -0
- package/dist/types/file-utils/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/intercept-network-call/core/fulfill-network-call.d.ts +10 -0
- package/dist/types/intercept-network-call/core/fulfill-network-call.d.ts.map +1 -0
- package/dist/types/intercept-network-call/core/observe-network-call.d.ts +4 -0
- package/dist/types/intercept-network-call/core/observe-network-call.d.ts.map +1 -0
- package/dist/types/intercept-network-call/core/types.d.ts +28 -0
- package/dist/types/intercept-network-call/core/types.d.ts.map +1 -0
- package/dist/types/intercept-network-call/core/utils/matches-request.d.ts +9 -0
- package/dist/types/intercept-network-call/core/utils/matches-request.d.ts.map +1 -0
- package/dist/types/intercept-network-call/fixtures.d.ts +2 -0
- package/dist/types/intercept-network-call/fixtures.d.ts.map +1 -0
- package/dist/types/intercept-network-call/index.d.ts +5 -0
- package/dist/types/intercept-network-call/index.d.ts.map +1 -0
- package/dist/types/intercept-network-call/intercept-network-call-fixture.d.ts +7 -0
- package/dist/types/intercept-network-call/intercept-network-call-fixture.d.ts.map +1 -0
- package/dist/types/intercept-network-call/intercept-network-call.d.ts +21 -0
- package/dist/types/intercept-network-call/intercept-network-call.d.ts.map +1 -0
- package/dist/types/internal/index.d.ts +2 -0
- package/dist/types/internal/index.d.ts.map +1 -0
- package/dist/types/internal/logger.d.ts +25 -0
- package/dist/types/internal/logger.d.ts.map +1 -0
- package/dist/types/log/config.d.ts +28 -0
- package/dist/types/log/config.d.ts.map +1 -0
- package/dist/types/log/fixtures.d.ts +2 -0
- package/dist/types/log/fixtures.d.ts.map +1 -0
- package/dist/types/log/formatters/colors.d.ts +13 -0
- package/dist/types/log/formatters/colors.d.ts.map +1 -0
- package/dist/types/log/formatters/format-message-base.d.ts +57 -0
- package/dist/types/log/formatters/format-message-base.d.ts.map +1 -0
- package/dist/types/log/formatters/format-message.d.ts +13 -0
- package/dist/types/log/formatters/format-message.d.ts.map +1 -0
- package/dist/types/log/index.d.ts +4 -0
- package/dist/types/log/index.d.ts.map +1 -0
- package/dist/types/log/log-fixture.d.ts +5 -0
- package/dist/types/log/log-fixture.d.ts.map +1 -0
- package/dist/types/log/log-organizer.d.ts +17 -0
- package/dist/types/log/log-organizer.d.ts.map +1 -0
- package/dist/types/log/log.d.ts +20 -0
- package/dist/types/log/log.d.ts.map +1 -0
- package/dist/types/log/outputs/add-test-header.d.ts +14 -0
- package/dist/types/log/outputs/add-test-header.d.ts.map +1 -0
- package/dist/types/log/outputs/context.d.ts +73 -0
- package/dist/types/log/outputs/context.d.ts.map +1 -0
- package/dist/types/log/outputs/create-log-file-path.d.ts +6 -0
- package/dist/types/log/outputs/create-log-file-path.d.ts.map +1 -0
- package/dist/types/log/outputs/log-to-console.d.ts +4 -0
- package/dist/types/log/outputs/log-to-console.d.ts.map +1 -0
- package/dist/types/log/outputs/log-to-file.d.ts +23 -0
- package/dist/types/log/outputs/log-to-file.d.ts.map +1 -0
- package/dist/types/log/test-step.d.ts +42 -0
- package/dist/types/log/test-step.d.ts.map +1 -0
- package/dist/types/log/types.d.ts +81 -0
- package/dist/types/log/types.d.ts.map +1 -0
- package/dist/types/log/utils/async.d.ts +6 -0
- package/dist/types/log/utils/async.d.ts.map +1 -0
- package/dist/types/log/utils/flag.d.ts +12 -0
- package/dist/types/log/utils/flag.d.ts.map +1 -0
- package/dist/types/log/utils/options.d.ts +14 -0
- package/dist/types/log/utils/options.d.ts.map +1 -0
- package/dist/types/log/utils/playwright-step-utils.d.ts +5 -0
- package/dist/types/log/utils/playwright-step-utils.d.ts.map +1 -0
- package/dist/types/network-error-monitor/fixtures.d.ts +91 -0
- package/dist/types/network-error-monitor/fixtures.d.ts.map +1 -0
- package/dist/types/network-recorder/core/har-builder.d.ts +122 -0
- package/dist/types/network-recorder/core/har-builder.d.ts.map +1 -0
- package/dist/types/network-recorder/core/har-manager.d.ts +74 -0
- package/dist/types/network-recorder/core/har-manager.d.ts.map +1 -0
- package/dist/types/network-recorder/core/har-playback-handler.d.ts +10 -0
- package/dist/types/network-recorder/core/har-playback-handler.d.ts.map +1 -0
- package/dist/types/network-recorder/core/index.d.ts +9 -0
- package/dist/types/network-recorder/core/index.d.ts.map +1 -0
- package/dist/types/network-recorder/core/mode-detector.d.ts +64 -0
- package/dist/types/network-recorder/core/mode-detector.d.ts.map +1 -0
- package/dist/types/network-recorder/core/network-recorder.d.ts +90 -0
- package/dist/types/network-recorder/core/network-recorder.d.ts.map +1 -0
- package/dist/types/network-recorder/core/stateful-api-mock.d.ts +31 -0
- package/dist/types/network-recorder/core/stateful-api-mock.d.ts.map +1 -0
- package/dist/types/network-recorder/core/types.d.ts +192 -0
- package/dist/types/network-recorder/core/types.d.ts.map +1 -0
- package/dist/types/network-recorder/fixtures.d.ts +2 -0
- package/dist/types/network-recorder/fixtures.d.ts.map +1 -0
- package/dist/types/network-recorder/index.d.ts +6 -0
- package/dist/types/network-recorder/index.d.ts.map +1 -0
- package/dist/types/network-recorder/network-recorder-fixture.d.ts +78 -0
- package/dist/types/network-recorder/network-recorder-fixture.d.ts.map +1 -0
- package/dist/types/network-recorder/network-recorder.d.ts +11 -0
- package/dist/types/network-recorder/network-recorder.d.ts.map +1 -0
- package/dist/types/recurse/fixtures.d.ts +2 -0
- package/dist/types/recurse/fixtures.d.ts.map +1 -0
- package/dist/types/recurse/index.d.ts +2 -0
- package/dist/types/recurse/index.d.ts.map +1 -0
- package/dist/types/recurse/recurse-fixture.d.ts +35 -0
- package/dist/types/recurse/recurse-fixture.d.ts.map +1 -0
- package/dist/types/recurse/recurse.d.ts +108 -0
- package/dist/types/recurse/recurse.d.ts.map +1 -0
- package/package.json +238 -0
package/README.md
ADDED
|
@@ -0,0 +1,727 @@
|
|
|
1
|
+
# Playwright Utils
|
|
2
|
+
|
|
3
|
+
A collection of utilities for Playwright tests at SEON Technologies, designed to make testing more efficient and maintainable.
|
|
4
|
+
|
|
5
|
+
All utilities can be used as Playwright fixtures by importing the test object.
|
|
6
|
+
|
|
7
|
+
## Design Principles
|
|
8
|
+
|
|
9
|
+
Why this library was created:
|
|
10
|
+
|
|
11
|
+
- To bring consistent reusable Playwright utilities to projects at SEON.
|
|
12
|
+
- To implement common testing patterns as **standardized fixtures**, to avoid duplication and boilerplate.
|
|
13
|
+
- To follow a **functional-first** design: the core logic is always a standalone function that can be used directly, while fixtures provide convenience.
|
|
14
|
+
- To support **typed API requests**, **polling patterns**, **auth session management**, **logging**, and **network interception** with clear APIs.
|
|
15
|
+
- To make it easy to adopt and extend the utilities in other projects, without coupling tightly to any single app.
|
|
16
|
+
|
|
17
|
+
Design patterns used:
|
|
18
|
+
|
|
19
|
+
- **Fixture pattern**: all utilities can be consumed as fixtures to provide maximum flexibility.
|
|
20
|
+
- **Functional core, fixture shell**: utilities can be used both directly and as fixtures.
|
|
21
|
+
- **Decoupled logging and reporting**: logging is built to integrate cleanly into Playwright reports.
|
|
22
|
+
- **Composable auth sessions**: auth session utilities can handle complex multi-user auth in a reusable way.
|
|
23
|
+
- **Test-focused network interception**: network interception is designed for real-world test needs, not just simple mocking.
|
|
24
|
+
- **Typed API request utility**: apiRequest provides a reusable, typed client for API tests and Playwright request fixture usage.
|
|
25
|
+
|
|
26
|
+
This library is not a general-purpose Playwright wrapper. It is designed to cover the most common test automation needs at SEON and to serve as a foundation for further project-specific extensions.
|
|
27
|
+
|
|
28
|
+
- [Playwright Utils](#playwright-utils)
|
|
29
|
+
- [Design Principles](#design-principles)
|
|
30
|
+
- [Installation](#installation)
|
|
31
|
+
- [Module Format Support](#module-format-support)
|
|
32
|
+
- [Development](#development)
|
|
33
|
+
- [Testing Strategy](#testing-strategy)
|
|
34
|
+
- [Available Utilities](#available-utilities)
|
|
35
|
+
- [API Request](#api-request)
|
|
36
|
+
- [Recurse (Polling)](#recurse-polling)
|
|
37
|
+
- [Logging](#logging)
|
|
38
|
+
- [Network Interception](#network-interception)
|
|
39
|
+
- [Auth Session](#auth-session)
|
|
40
|
+
- [Implementation Steps](#implementation-steps)
|
|
41
|
+
- [File Utilities](#file-utilities)
|
|
42
|
+
- [Network Recorder](#network-recorder)
|
|
43
|
+
- [Burn-in](#burn-in)
|
|
44
|
+
- [Network Error Monitor](#network-error-monitor)
|
|
45
|
+
- [Testing the Package Locally](#testing-the-package-locally)
|
|
46
|
+
- [Release and Publishing](#release-and-publishing)
|
|
47
|
+
- [Publishing via GitHub UI (Recommended)](#publishing-via-github-ui-recommended)
|
|
48
|
+
- [Publishing Locally](#publishing-locally)
|
|
49
|
+
|
|
50
|
+
## Installation
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm i -D @seontechnologies/playwright-utils
|
|
54
|
+
pnpm i -D @seontechnologies/playwright-utils
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
> **Note:** This package requires `@playwright/test` as a peer dependency. It should already be installed in your repository.
|
|
58
|
+
|
|
59
|
+
## Module Format Support
|
|
60
|
+
|
|
61
|
+
This package supports both CommonJS and ES Modules formats:
|
|
62
|
+
|
|
63
|
+
- **CommonJS**: For projects using `require()` syntax or CommonJS module resolution
|
|
64
|
+
- **ES Modules**: For projects using `import` syntax with ES modules
|
|
65
|
+
|
|
66
|
+
The package automatically detects which format to use based on your project's configuration. This means:
|
|
67
|
+
|
|
68
|
+
- You can use this package in both legacy CommonJS projects and modern ESM projects
|
|
69
|
+
- No need to change import paths or add file extensions
|
|
70
|
+
- TypeScript type definitions work for both formats
|
|
71
|
+
|
|
72
|
+
Example usage:
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
// Works in both CommonJS and ESM environments
|
|
76
|
+
import { log } from '@seontechnologies/playwright-utils'
|
|
77
|
+
|
|
78
|
+
// Subpath imports also work in both formats
|
|
79
|
+
import { recurse } from '@seontechnologies/playwright-utils/recurse'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Development
|
|
83
|
+
|
|
84
|
+
Quick start (this repo):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
git clone https://github.com/seontechnologies/playwright-utils.git
|
|
88
|
+
|
|
89
|
+
cd playwright-utils
|
|
90
|
+
|
|
91
|
+
nvm use
|
|
92
|
+
|
|
93
|
+
npm install
|
|
94
|
+
|
|
95
|
+
# start docker
|
|
96
|
+
# running the app initially may require docker to download things for a few minutes
|
|
97
|
+
npm run start:sample-app
|
|
98
|
+
|
|
99
|
+
# open a new tab, and run a test
|
|
100
|
+
# run with UI, with headless, and if you want also the IDE
|
|
101
|
+
npm run test:pw-ui
|
|
102
|
+
npm run test:pw
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Install dependencies
|
|
107
|
+
npm i
|
|
108
|
+
|
|
109
|
+
# Development commands
|
|
110
|
+
npm run lint # Run ESLint
|
|
111
|
+
npm run typecheck # Run TypeScript checks
|
|
112
|
+
npm run fix:format # Fix code formatting with Prettier
|
|
113
|
+
npm run test # Run unit tests
|
|
114
|
+
npm run validate # Run all the above in parallel
|
|
115
|
+
|
|
116
|
+
# Start the sample app (for testing apiRequest, recurse, auth-session)
|
|
117
|
+
npm run start:sample-app
|
|
118
|
+
|
|
119
|
+
# Playwright tests
|
|
120
|
+
npm run test:pw # Run Playwright tests
|
|
121
|
+
npm run test:pw-ui # Run Playwright tests with UI
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Testing Strategy
|
|
125
|
+
|
|
126
|
+
The overall testing approach:
|
|
127
|
+
|
|
128
|
+
1. **Deployed Apps Tests** - Some tests use Playwright's deployed apps to keep things familiar (`log`, `interceptNetworkCall`):
|
|
129
|
+
- `playwright/tests/network-mock-original.spec.ts`
|
|
130
|
+
- `playwright/tests/todo-with-logs.spec.ts`
|
|
131
|
+
- `playwright/tests/network-mock-intercept-network-call.spec.ts`
|
|
132
|
+
|
|
133
|
+
1. **Sample App Tests** - The `./sample-app` provides a more complex environment to test:
|
|
134
|
+
- API request automation
|
|
135
|
+
- Recursion and retry patterns
|
|
136
|
+
- Authentication flows
|
|
137
|
+
- Future: feature flag testing, email testing, etc.
|
|
138
|
+
|
|
139
|
+
To start the sample app backend and frontend; `npm run start:sample-app`.
|
|
140
|
+
|
|
141
|
+
The sample app uses `"@seontechnologies/playwright-utils": "*"` in its package.json so that changes to the library are immediately available for testing without requiring republishing or package updates.
|
|
142
|
+
|
|
143
|
+
## Available Utilities
|
|
144
|
+
|
|
145
|
+
The library provides the following utilities, each with both direct function imports and Playwright fixtures:
|
|
146
|
+
|
|
147
|
+
### [API Request](./docs/api-request.md)
|
|
148
|
+
|
|
149
|
+
A typed, flexible HTTP client for making API requests in tests.
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
// Direct import
|
|
153
|
+
import { apiRequest } from '@seontechnologies/playwright-utils'
|
|
154
|
+
|
|
155
|
+
test('example', async ({ request }) => {
|
|
156
|
+
const { status, body } = await apiRequest({
|
|
157
|
+
request, // need to pass in request context when using this way
|
|
158
|
+
method: 'GET',
|
|
159
|
+
path: '/api/users/123'
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
// As a fixture
|
|
164
|
+
import { test } from '@seontechnologies/playwright-utils/fixtures'
|
|
165
|
+
// or use your own main fixture (with mergeTests) and import from there
|
|
166
|
+
|
|
167
|
+
test('example', async ({ apiRequest }) => {
|
|
168
|
+
const { status, body } = await apiRequest({
|
|
169
|
+
method: 'GET',
|
|
170
|
+
path: '/api/users/123'
|
|
171
|
+
})
|
|
172
|
+
})
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
[→ API Request Documentation](./docs/api-request.md)
|
|
176
|
+
|
|
177
|
+
### [Recurse (Polling)](./docs/recurse.md)
|
|
178
|
+
|
|
179
|
+
A powerful polling utility for waiting on asynchronous conditions.
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
// note that there is no need to pass in request or page context from Playwright
|
|
183
|
+
|
|
184
|
+
// Direct import
|
|
185
|
+
import { recurse } from '@seontechnologies/playwright-utils/recurse'
|
|
186
|
+
|
|
187
|
+
test('example', async ({}) => {
|
|
188
|
+
const result = await recurse(
|
|
189
|
+
() => fetchData(),
|
|
190
|
+
(data) => data.status === 'ready',
|
|
191
|
+
{ timeout: 30000 }
|
|
192
|
+
)
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
// As a fixture
|
|
196
|
+
import { test } from '@seontechnologies/playwright-utils/fixtures'
|
|
197
|
+
// or use your own main fixture (with mergeTests) and import from there
|
|
198
|
+
|
|
199
|
+
test('example', async ({ recurse }) => {
|
|
200
|
+
const result = await recurse({
|
|
201
|
+
command: () => fetchData(),
|
|
202
|
+
predicate: (data) => data.status === 'ready',
|
|
203
|
+
options: { timeout: 30000 }
|
|
204
|
+
})
|
|
205
|
+
})
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
[→ Recurse Documentation](./docs/recurse.md)
|
|
209
|
+
|
|
210
|
+
### [Logging](./docs/log.md)
|
|
211
|
+
|
|
212
|
+
A specialized logging utility that integrates with Playwright's test reports.
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
// Direct import
|
|
216
|
+
import { log } from '@seontechnologies/playwright-utils'
|
|
217
|
+
|
|
218
|
+
await log.info('Information message')
|
|
219
|
+
await log.step('Starting a new test step')
|
|
220
|
+
await log.error('Something went wrong', false) // Disable console output
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
// As a fixture
|
|
225
|
+
import { test } from '@seontechnologies/playwright-utils/log/fixtures'
|
|
226
|
+
|
|
227
|
+
test('example', async ({ log }) => {
|
|
228
|
+
await log({
|
|
229
|
+
message: 'Starting test',
|
|
230
|
+
level: 'step'
|
|
231
|
+
})
|
|
232
|
+
})
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
[→ Logging Documentation](./docs/log.md)
|
|
236
|
+
|
|
237
|
+
### [Network Interception](./docs/intercept-network-call.md)
|
|
238
|
+
|
|
239
|
+
A powerful utility for intercepting, observing, and mocking network requests in Playwright tests.
|
|
240
|
+
|
|
241
|
+
```typescript
|
|
242
|
+
// Direct import
|
|
243
|
+
import { interceptNetworkCall } from '@seontechnologies/playwright-utils'
|
|
244
|
+
|
|
245
|
+
test('Spy on the network', async ({ page }) => {
|
|
246
|
+
// Set up the interception before navigating
|
|
247
|
+
const networkCall = interceptNetworkCall({
|
|
248
|
+
page,
|
|
249
|
+
method: 'GET', // GET is optional
|
|
250
|
+
url: '**/api/users'
|
|
251
|
+
})
|
|
252
|
+
|
|
253
|
+
await page.goto('/users-page')
|
|
254
|
+
|
|
255
|
+
// Wait for the intercepted response and access the result
|
|
256
|
+
const { responseJson, status } = await networkCall
|
|
257
|
+
|
|
258
|
+
expect(responseJson.length).toBeGreaterThan(0)
|
|
259
|
+
expect(status).toBe(200)
|
|
260
|
+
})
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
```typescript
|
|
264
|
+
// As a fixture
|
|
265
|
+
import { test } from '@seontechnologies/playwright-utils/fixtures'
|
|
266
|
+
|
|
267
|
+
test('Stub the network', async ({ page, interceptNetworkCall }) => {
|
|
268
|
+
// With fixture, you don't need to pass the page object
|
|
269
|
+
const mockResponse = interceptNetworkCall({
|
|
270
|
+
method: 'GET',
|
|
271
|
+
url: '**/api/users',
|
|
272
|
+
fulfillResponse: {
|
|
273
|
+
status: 200,
|
|
274
|
+
body: { data: [{ id: 1, name: 'Test User' }] }
|
|
275
|
+
}
|
|
276
|
+
})
|
|
277
|
+
|
|
278
|
+
await page.goto('/users-page')
|
|
279
|
+
|
|
280
|
+
// Wait for the intercepted response
|
|
281
|
+
await mockResponse
|
|
282
|
+
|
|
283
|
+
expect(responseJson.data[0].name).toBe('Test User')
|
|
284
|
+
})
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
```typescript
|
|
288
|
+
// Conditional request handling
|
|
289
|
+
test('Modify responses', async ({ page, interceptNetworkCall }) => {
|
|
290
|
+
await interceptNetworkCall({
|
|
291
|
+
url: '/api/data',
|
|
292
|
+
handler: async (route, request) => {
|
|
293
|
+
if (request.method() === 'POST') {
|
|
294
|
+
// Handle POST requests
|
|
295
|
+
await route.fulfill({
|
|
296
|
+
status: 200,
|
|
297
|
+
body: JSON.stringify({ success: true })
|
|
298
|
+
})
|
|
299
|
+
} else {
|
|
300
|
+
// Continue with other requests
|
|
301
|
+
await route.continue()
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
})
|
|
305
|
+
})
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
[→ Network Interception Documentation](./docs/intercept-network-call.md)
|
|
309
|
+
|
|
310
|
+
### [Auth Session](./docs/auth-session.md)
|
|
311
|
+
|
|
312
|
+
An authentication session management system for Playwright tests that persists tokens between test runs:
|
|
313
|
+
|
|
314
|
+
- Faster tests with persistent token storage
|
|
315
|
+
- User-based, on the fly authentication support
|
|
316
|
+
- Support for both UI and API testing
|
|
317
|
+
|
|
318
|
+
#### Implementation Steps
|
|
319
|
+
|
|
320
|
+
1. **Configure Global Setup** - Create `playwright/support/global-setup.ts` and add it to your Playwright config
|
|
321
|
+
- Sets up authentication storage and initializes the auth provider
|
|
322
|
+
- Nearly identical across all applications
|
|
323
|
+
|
|
324
|
+
```typescript
|
|
325
|
+
// 1. Configure Global Setup (playwright/support/global-setup.ts)
|
|
326
|
+
import {
|
|
327
|
+
authStorageInit,
|
|
328
|
+
setAuthProvider,
|
|
329
|
+
configureAuthSession,
|
|
330
|
+
authGlobalInit
|
|
331
|
+
} from '@seontechnologies/playwright-utils/auth-session'
|
|
332
|
+
import myCustomProvider from './auth/custom-auth-provider'
|
|
333
|
+
|
|
334
|
+
async function globalSetup() {
|
|
335
|
+
// Ensure storage directories exist
|
|
336
|
+
authStorageInit()
|
|
337
|
+
|
|
338
|
+
// STEP 1: Configure auth storage settings
|
|
339
|
+
configureAuthSession({
|
|
340
|
+
// store auth tokens anywhere you want, and remember to gitignore the directory
|
|
341
|
+
authStoragePath: process.cwd() + '/playwright/auth-sessions',
|
|
342
|
+
debug: true
|
|
343
|
+
})
|
|
344
|
+
|
|
345
|
+
// STEP 2: Set up custom auth provider
|
|
346
|
+
// This defines HOW authentication tokens are acquired and used
|
|
347
|
+
setAuthProvider(myCustomProvider)
|
|
348
|
+
|
|
349
|
+
// Optional: pre-fetch all tokens in the beginning
|
|
350
|
+
await authGlobalInit()
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export default globalSetup
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
> **⚠️ IMPORTANT:** The order of function calls in your global setup is critical. Always register your auth provider with `setAuthProvider()` after configuring the session. This ensures the auth provider is properly initialized.
|
|
357
|
+
|
|
358
|
+
1. **Create Auth Fixture** - Add `playwright/support/auth/auth-fixture.ts` to your merged fixtures
|
|
359
|
+
- Provides standardized Playwright test fixtures for authentication
|
|
360
|
+
- Generally reusable across applications without modification
|
|
361
|
+
- **CRITICAL: Register auth provider early to ensure it's always available**
|
|
362
|
+
|
|
363
|
+
Add `playwright/support/auth/auth-fixture.ts` to your merged fixtures
|
|
364
|
+
|
|
365
|
+
```typescript
|
|
366
|
+
// 1. Create Auth Fixture (playwright/support/auth/auth-fixture.ts)
|
|
367
|
+
import { test as base } from '@playwright/test'
|
|
368
|
+
import {
|
|
369
|
+
createAuthFixtures,
|
|
370
|
+
type AuthOptions,
|
|
371
|
+
type AuthFixtures,
|
|
372
|
+
setAuthProvider // Import the setAuthProvider function
|
|
373
|
+
} from '@seontechnologies/playwright-utils/auth-session'
|
|
374
|
+
|
|
375
|
+
// Import your custom auth provider
|
|
376
|
+
import myCustomProvider from './custom-auth-provider'
|
|
377
|
+
|
|
378
|
+
// Register the auth provider early
|
|
379
|
+
setAuthProvider(myCustomProvider)
|
|
380
|
+
|
|
381
|
+
export const test = base.extend<AuthFixtures>({
|
|
382
|
+
// For authOptions, we need to define it directly using the Playwright array format
|
|
383
|
+
authOptions: [defaultAuthOptions, { option: true }],
|
|
384
|
+
|
|
385
|
+
// Use the other fixtures directly
|
|
386
|
+
...createAuthFixtures()
|
|
387
|
+
|
|
388
|
+
// In your tests, use the auth token
|
|
389
|
+
test('authenticated API request', async ({ authToken, request }) => {
|
|
390
|
+
const response = await request.get('https://api.example.com/protected', {
|
|
391
|
+
headers: { Authorization: `Bearer ${authToken}` }
|
|
392
|
+
})
|
|
393
|
+
|
|
394
|
+
expect(response.ok()).toBeTruthy()
|
|
395
|
+
})
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
1. Create Custom Auth Provider - Implement token management with modular utilities:
|
|
399
|
+
|
|
400
|
+
```typescript
|
|
401
|
+
// playwright/support/auth/custom-auth-provider.ts
|
|
402
|
+
import {
|
|
403
|
+
type AuthProvider,
|
|
404
|
+
authStorageInit,
|
|
405
|
+
getTokenFilePath,
|
|
406
|
+
saveStorageState
|
|
407
|
+
} from '@seontechnologies/playwright-utils/auth-session'
|
|
408
|
+
import { log } from '@seontechnologies/playwright-utils/log'
|
|
409
|
+
import { acquireToken } from './token/acquire'
|
|
410
|
+
import { checkTokenValidity } from './token/check-validity'
|
|
411
|
+
import { isTokenExpired } from './token/is-expired'
|
|
412
|
+
import { extractToken, extractCookies } from './token/extract'
|
|
413
|
+
import { getEnvironment } from './get-environment'
|
|
414
|
+
import { getUserIdentifier } from './get-user-identifier'
|
|
415
|
+
|
|
416
|
+
const myCustomProvider: AuthProvider = {
|
|
417
|
+
// Get the current environment to use
|
|
418
|
+
getEnvironment,
|
|
419
|
+
|
|
420
|
+
// Get the current user identifier to use
|
|
421
|
+
getUserIdentifier,
|
|
422
|
+
|
|
423
|
+
// Extract token from storage state
|
|
424
|
+
extractToken,
|
|
425
|
+
|
|
426
|
+
// Extract cookies from token data for browser context
|
|
427
|
+
extractCookies,
|
|
428
|
+
|
|
429
|
+
// Check if token is expired
|
|
430
|
+
isTokenExpired,
|
|
431
|
+
|
|
432
|
+
// Main token management method
|
|
433
|
+
async manageAuthToken(request, options = {}) {
|
|
434
|
+
const environment = this.getEnvironment(options)
|
|
435
|
+
const userIdentifier = this.getUserIdentifier(options)
|
|
436
|
+
const tokenPath = getTokenFilePath({
|
|
437
|
+
environment,
|
|
438
|
+
userIdentifier,
|
|
439
|
+
tokenFileName: 'storage-state.json'
|
|
440
|
+
})
|
|
441
|
+
|
|
442
|
+
// Check for existing valid token
|
|
443
|
+
const validToken = await checkTokenValidity(tokenPath)
|
|
444
|
+
if (validToken) return validToken
|
|
445
|
+
|
|
446
|
+
// Initialize storage and acquire new token if needed
|
|
447
|
+
authStorageInit({ environment, userIdentifier })
|
|
448
|
+
const storageState = await acquireToken(
|
|
449
|
+
request,
|
|
450
|
+
environment,
|
|
451
|
+
userIdentifier,
|
|
452
|
+
options
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
// Save and return the new token
|
|
456
|
+
saveStorageState(tokenPath, storageState)
|
|
457
|
+
return storageState
|
|
458
|
+
},
|
|
459
|
+
|
|
460
|
+
// Clear token when needed
|
|
461
|
+
clearToken(options = {}) {
|
|
462
|
+
const environment = this.getEnvironment(options)
|
|
463
|
+
const userIdentifier = this.getUserIdentifier(options)
|
|
464
|
+
const storageDir = getStorageDir({ environment, userIdentifier })
|
|
465
|
+
const authManager = AuthSessionManager.getInstance({ storageDir })
|
|
466
|
+
authManager.clearToken()
|
|
467
|
+
return true
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export default myCustomProvider
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
1. Use the Auth Session in Your Tests
|
|
475
|
+
|
|
476
|
+
```typescript
|
|
477
|
+
import { test } from '../support/auth/auth-fixture'
|
|
478
|
+
|
|
479
|
+
test('access protected resources', async ({ page, authToken }) => {
|
|
480
|
+
// API calls with token
|
|
481
|
+
const response = await request.get('/api/protected', {
|
|
482
|
+
headers: { Authorization: `Bearer ${authToken}` }
|
|
483
|
+
})
|
|
484
|
+
|
|
485
|
+
// Or use the pre-authenticated page
|
|
486
|
+
await page.goto('/protected-area')
|
|
487
|
+
})
|
|
488
|
+
|
|
489
|
+
// Ephemeral user authentication
|
|
490
|
+
import { applyUserCookiesToBrowserContext } from '@seontechnologies/playwright-utils/auth-session'
|
|
491
|
+
|
|
492
|
+
test('ephemeral user auth', async ({ context, page }) => {
|
|
493
|
+
// Apply user auth directly to browser context (no disk persistence)
|
|
494
|
+
const user = await createTestUser({ userIdentifier: 'admin' })
|
|
495
|
+
await applyUserCookiesToBrowserContext(context, user)
|
|
496
|
+
|
|
497
|
+
// Page is now authenticated with the user's token
|
|
498
|
+
await page.goto('/protected-page')
|
|
499
|
+
})
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
[→ Auth Session Documentation](./docs/auth-session.md)
|
|
503
|
+
|
|
504
|
+
### [File Utilities](./docs/file-utils.md)
|
|
505
|
+
|
|
506
|
+
A comprehensive set of utilities for reading, validating, and waiting for files (CSV, XLSX, PDF, ZIP).
|
|
507
|
+
|
|
508
|
+
```typescript
|
|
509
|
+
// Direct import
|
|
510
|
+
import { readCSV } from '@seontechnologies/playwright-utils/file-utils'
|
|
511
|
+
|
|
512
|
+
test('example', async () => {
|
|
513
|
+
const result = await readCSV({ filePath: '/path/to/data.csv' })
|
|
514
|
+
})
|
|
515
|
+
|
|
516
|
+
// As a fixture
|
|
517
|
+
import { test } from '@seontechnologies/playwright-utils/file-utils/fixtures'
|
|
518
|
+
|
|
519
|
+
test('example', async ({ fileUtils }) => {
|
|
520
|
+
const isValid = await fileUtils.validateCSV({
|
|
521
|
+
filePath: '/path/to/data.csv',
|
|
522
|
+
expectedRowCount: 10
|
|
523
|
+
})
|
|
524
|
+
})
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
[→ File Utilities Documentation](./docs/file-utils.md)
|
|
528
|
+
|
|
529
|
+
### [Network Recorder](./docs/network-recorder.md)
|
|
530
|
+
|
|
531
|
+
A HAR-based network traffic recording and playback utility that enables frontend tests to run in complete isolation from backend services. Features intelligent stateful CRUD detection for realistic API behavior.
|
|
532
|
+
|
|
533
|
+
```typescript
|
|
534
|
+
// Control mode in your test file (recommended)
|
|
535
|
+
process.env.PW_NET_MODE = 'record' // or 'playback'
|
|
536
|
+
|
|
537
|
+
// As a fixture (recommended)
|
|
538
|
+
import { test } from '@seontechnologies/playwright-utils/network-recorder/fixtures'
|
|
539
|
+
|
|
540
|
+
test('CRUD operations work offline', async ({
|
|
541
|
+
page,
|
|
542
|
+
context,
|
|
543
|
+
networkRecorder
|
|
544
|
+
}) => {
|
|
545
|
+
// Setup - automatically records or plays back based on PW_NET_MODE
|
|
546
|
+
await networkRecorder.setup(context)
|
|
547
|
+
|
|
548
|
+
await page.goto('/')
|
|
549
|
+
|
|
550
|
+
// First time: records all network traffic to HAR file
|
|
551
|
+
// Subsequent runs: plays back from HAR file (no backend needed!)
|
|
552
|
+
await page.fill('#movie-name', 'Inception')
|
|
553
|
+
await page.click('#add-movie')
|
|
554
|
+
|
|
555
|
+
// Intelligent CRUD detection ensures the movie appears in the list
|
|
556
|
+
// even though we're running offline!
|
|
557
|
+
await expect(page.getByText('Inception')).toBeVisible()
|
|
558
|
+
})
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
```bash
|
|
562
|
+
# Alternative: Environment-based mode switching
|
|
563
|
+
PW_NET_MODE=record npm run test:pw # Record network traffic to HAR files
|
|
564
|
+
PW_NET_MODE=playback npm run test:pw # Playback from existing HAR files
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
[→ Network Recorder Documentation](./docs/network-recorder.md)
|
|
568
|
+
|
|
569
|
+
### [Burn-in](./docs/burn-in.md)
|
|
570
|
+
|
|
571
|
+
A **smart test burn-in utility** that enhances Playwright's `--only-changed` using a process of elimination to reduce unnecessary test runs.
|
|
572
|
+
|
|
573
|
+
**Key Benefits**:
|
|
574
|
+
|
|
575
|
+
- 🚫 **Skip irrelevant changes**: Config/type files don't trigger tests
|
|
576
|
+
- 📊 **Volume control**: Run a percentage of tests AFTER filtering
|
|
577
|
+
- 🎯 **Process of elimination**: Start with all, filter out irrelevant, control volume
|
|
578
|
+
|
|
579
|
+
**Quick Setup**:
|
|
580
|
+
|
|
581
|
+
1. Create a burn-in script:
|
|
582
|
+
|
|
583
|
+
```typescript
|
|
584
|
+
// scripts/burn-in-changed.ts
|
|
585
|
+
import { runBurnIn } from '@seontechnologies/playwright-utils/burn-in'
|
|
586
|
+
|
|
587
|
+
async function main() {
|
|
588
|
+
await runBurnIn()
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
main().catch(console.error)
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
2. Add package.json script:
|
|
595
|
+
|
|
596
|
+
```json
|
|
597
|
+
{
|
|
598
|
+
"scripts": {
|
|
599
|
+
"test:pw:burn-in-changed": "tsx scripts/burn-in-changed.ts"
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
3. Create configuration:
|
|
605
|
+
|
|
606
|
+
```typescript
|
|
607
|
+
// config/.burn-in.config.ts (recommended location)
|
|
608
|
+
import type { BurnInConfig } from '@seontechnologies/playwright-utils/burn-in'
|
|
609
|
+
|
|
610
|
+
const config: BurnInConfig = {
|
|
611
|
+
// Files that should never trigger tests (first filter)
|
|
612
|
+
skipBurnInPatterns: [
|
|
613
|
+
'**/config/**',
|
|
614
|
+
'**/*constants*',
|
|
615
|
+
'**/*types*',
|
|
616
|
+
'**/*.md'
|
|
617
|
+
],
|
|
618
|
+
|
|
619
|
+
// Control test volume AFTER skip filtering (0.3 = 30% of remaining tests)
|
|
620
|
+
burnInTestPercentage: process.env.CI ? 0.2 : 0.3,
|
|
621
|
+
|
|
622
|
+
// Burn-in repetition settings
|
|
623
|
+
burnIn: {
|
|
624
|
+
repeatEach: process.env.CI ? 2 : 3,
|
|
625
|
+
retries: process.env.CI ? 0 : 1
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
export default config
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
**How it works (Custom Dependency Analysis)**:
|
|
632
|
+
|
|
633
|
+
1. **Git diff analysis** identifies all changed files (e.g., 21 files)
|
|
634
|
+
2. **Skip patterns** filter out irrelevant files (e.g., 6 config files → 15 remaining files)
|
|
635
|
+
3. **Custom dependency analyzer** finds tests that actually depend on those 15 files (e.g., 3 tests)
|
|
636
|
+
4. **Volume control** runs a percentage of the found tests (e.g., 100% of 3 = 3 tests)
|
|
637
|
+
|
|
638
|
+
Result: Run 3 targeted tests instead of 147 with Playwright's `--only-changed`!
|
|
639
|
+
|
|
640
|
+
[→ Burn-in Documentation](./docs/burn-in.md)
|
|
641
|
+
|
|
642
|
+
### [Network Error Monitor](./docs/network-error-monitor.md)
|
|
643
|
+
|
|
644
|
+
Automatically detects and reports HTTP 4xx/5xx errors during test execution. Tests fail if network errors occur, even when UI appears correct.
|
|
645
|
+
|
|
646
|
+
```typescript
|
|
647
|
+
import { test } from '@seontechnologies/playwright-utils/network-error-monitor/fixtures'
|
|
648
|
+
|
|
649
|
+
test('my test', async ({ page }) => {
|
|
650
|
+
await page.goto('/dashboard')
|
|
651
|
+
// Fails if any HTTP 4xx/5xx errors occur
|
|
652
|
+
})
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
**Features**: Auto-enabled for all tests, catches silent backend failures, attaches JSON artifacts, respects test status (skipped/interrupted/failed).
|
|
656
|
+
|
|
657
|
+
**Integration**:
|
|
658
|
+
|
|
659
|
+
```typescript
|
|
660
|
+
import { test as networkErrorMonitorFixture } from '@seontechnologies/playwright-utils/network-error-monitor/fixtures'
|
|
661
|
+
|
|
662
|
+
export const test = mergeTests(authFixture, networkErrorMonitorFixture)
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
**Opt-out** for tests expecting errors:
|
|
666
|
+
|
|
667
|
+
```typescript
|
|
668
|
+
test(
|
|
669
|
+
'validation',
|
|
670
|
+
{ annotation: [{ type: 'skipNetworkMonitoring' }] },
|
|
671
|
+
async ({ page }) => {
|
|
672
|
+
// Monitoring disabled
|
|
673
|
+
}
|
|
674
|
+
)
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
Inspired by [Checkly's network monitoring pattern](https://github.com/checkly/checkly-playwright-examples/tree/main/network-monitoring). See [full docs](./docs/network-error-monitor.md).
|
|
678
|
+
|
|
679
|
+
## Testing the Package Locally
|
|
680
|
+
|
|
681
|
+
```bash
|
|
682
|
+
# Build the package
|
|
683
|
+
npm run build
|
|
684
|
+
|
|
685
|
+
# Create a tarball package
|
|
686
|
+
npm pack
|
|
687
|
+
|
|
688
|
+
# Install in a target repository (change the version according to the file name)
|
|
689
|
+
# For npm projects:
|
|
690
|
+
npm install ../playwright-utils/seontechnologies-playwright-utils-1.0.1.tgz
|
|
691
|
+
|
|
692
|
+
# For pnpm projects:
|
|
693
|
+
pnpm add file:/path/to/playwright-utils-1.0.1.tgz
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
## Release and Publishing
|
|
697
|
+
|
|
698
|
+
This package is published to the public npm registry under the `@seontechnologies` scope.
|
|
699
|
+
|
|
700
|
+
### Publishing via GitHub UI (Recommended)
|
|
701
|
+
|
|
702
|
+
You can trigger a release directly from GitHub's web interface:
|
|
703
|
+
|
|
704
|
+
1. Go to the repository → Actions → "Publish Package" workflow
|
|
705
|
+
2. Click "Run workflow" button (dropdown on the right)
|
|
706
|
+
3. Select options in the form:
|
|
707
|
+
- **Branch**: main
|
|
708
|
+
- **Version type**: patch/minor/major/custom
|
|
709
|
+
- **Custom version**: Only needed if you selected "custom" type
|
|
710
|
+
4. Click "Run workflow"
|
|
711
|
+
|
|
712
|
+
**Important**:
|
|
713
|
+
- Requires `NPM_TOKEN` secret to be configured in GitHub repository settings
|
|
714
|
+
- You must review and merge the PR to complete the process
|
|
715
|
+
|
|
716
|
+
### Publishing Locally
|
|
717
|
+
|
|
718
|
+
You can also publish the package locally using the provided script:
|
|
719
|
+
|
|
720
|
+
```bash
|
|
721
|
+
# 1. Set your npm token as an environment variable
|
|
722
|
+
# Get your token from: https://www.npmjs.com/settings/~/tokens
|
|
723
|
+
export NPM_TOKEN=your_npm_token
|
|
724
|
+
|
|
725
|
+
# 2. Run the publish script
|
|
726
|
+
npm run publish:local
|
|
727
|
+
```
|