@wopee-io/wopee.wdio 4.0.0 → 4.7.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/build/adapter/fullPageScreenshotAdapter/default.d.ts +4 -0
- package/build/adapter/fullPageScreenshotAdapter/default.d.ts.map +1 -0
- package/build/adapter/fullPageScreenshotAdapter/default.js +13 -0
- package/build/adapter/fullPageScreenshotAdapter/default.js.map +1 -0
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.d.ts +1 -9
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.d.ts.map +1 -1
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.interface.d.ts +24 -0
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.interface.d.ts.map +1 -0
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.interface.js +2 -0
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.interface.js.map +1 -0
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.js +8 -18
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.js.map +1 -1
- package/build/adapter/fullPageScreenshotAdapter/swipe.d.ts +4 -0
- package/build/adapter/fullPageScreenshotAdapter/swipe.d.ts.map +1 -0
- package/build/adapter/fullPageScreenshotAdapter/swipe.js +19 -0
- package/build/adapter/fullPageScreenshotAdapter/swipe.js.map +1 -0
- package/build/core/domain/valueObjects/track.interface.d.ts +7 -3
- package/build/core/domain/valueObjects/track.interface.d.ts.map +1 -1
- package/build/core/domain/valueObjects/track.interface.js.map +1 -1
- package/build/{port/clientSideOperationPort → core/ports}/clientSideOperationPort.d.ts +1 -1
- package/build/core/ports/clientSideOperationPort.d.ts.map +1 -0
- package/build/core/ports/clientSideOperationPort.js.map +1 -0
- package/build/domain/model/config.interface.d.ts +2 -2
- package/build/domain/model/config.interface.d.ts.map +1 -1
- package/build/domain/model/config.interface.js.map +1 -1
- package/build/domain/model/instances.interface.d.ts +2 -2
- package/build/domain/model/instances.interface.d.ts.map +1 -1
- package/build/domain/model/instances.interface.js.map +1 -1
- package/build/domain/model/screenshotOutput.interface.d.ts +2 -2
- package/build/domain/model/screenshotOutput.interface.d.ts.map +1 -1
- package/build/domain/model/screenshotOutput.interface.js.map +1 -1
- package/build/domain/model/service.interface.d.ts +2 -2
- package/build/domain/model/service.interface.d.ts.map +1 -1
- package/build/domain/model/service.interface.js.map +1 -1
- package/build/domain/service/afterScreenshot.js.map +1 -1
- package/build/domain/service/wopeeService.d.ts +5 -5
- package/build/domain/service/wopeeService.d.ts.map +1 -1
- package/build/domain/service/wopeeService.js +17 -14
- package/build/domain/service/wopeeService.js.map +1 -1
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.js.map +1 -0
- package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.d.ts +1 -1
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.js.map +1 -0
- package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.d.ts +1 -1
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.js.map +1 -0
- package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.d.ts +1 -1
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.js.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.js.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.js.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.js.map +1 -0
- package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.d.ts +4 -4
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.js.map +1 -0
- package/build/{adapter/driven → infrastructure/adapters}/wdioLoggerAdapter/wdioLoggerAdapter.d.ts +1 -1
- package/build/infrastructure/adapters/wdioLoggerAdapter/wdioLoggerAdapter.d.ts.map +1 -0
- package/build/{adapter → infrastructure/adapters}/wdioLoggerAdapter/wdioLoggerAdapter.js +1 -1
- package/build/infrastructure/adapters/wdioLoggerAdapter/wdioLoggerAdapter.js.map +1 -0
- package/build/utils/versionMetadata.js +2 -2
- package/docs/mobile_native.md +14 -1
- package/node_modules/@autonomous-testing/sdk/.commit.hbs +71 -0
- package/node_modules/@autonomous-testing/sdk/.github/workflows/ci_cd.yaml +12 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationScenarioPayload.interface.d.ts +14 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationScenarioPayload.interface.js +10 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationStepPayload.interface.d.ts +32 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationStepPayload.interface.js +16 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationSuitePayload.interface.d.ts +11 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationSuitePayload.interface.js +9 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.d.ts +14 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.js +16 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationScenario.interface.d.ts +14 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationScenario.interface.js +10 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.d.ts +24 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.js +20 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationSuite.interface.d.ts +14 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationSuite.interface.js +10 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/index.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/core/domain/index.js +1 -1
- package/node_modules/@autonomous-testing/sdk/build/core/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/core/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/core/ports/api.d.ts +16 -0
- package/node_modules/@autonomous-testing/sdk/build/core/ports/api.js +7 -0
- package/node_modules/@autonomous-testing/sdk/build/core/ports/index.d.ts +3 -3
- package/node_modules/@autonomous-testing/sdk/build/core/ports/index.js +5 -5
- package/node_modules/@autonomous-testing/sdk/build/index.d.ts +4 -3
- package/node_modules/@autonomous-testing/sdk/build/index.js +5 -3
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.d.ts +19 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.js +123 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.d.ts +9 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.js +144 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/index.d.ts +4 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/index.js +8 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.d.ts +235 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.js +82 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/mutations.d.ts +5 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/{apolloTrackAdapter/apolloTrackAdapterQueries.js → apolloAdapter/mutations.js} +19 -36
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/consoleLogger.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/index.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/index.d.ts +3 -3
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/index.js +3 -3
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/index.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/noLogger.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.d.ts +4 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.js +12 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloService.interface.d.ts +7 -0
- package/node_modules/@autonomous-testing/sdk/build/{core/domain/valueObjects/index.js → infrastructure/services/apolloAdapterService/apolloService.interface.js} +1 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/index.d.ts +4 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/index.js +6 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.d.ts +16 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.js +12 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerService.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerService.js +17 -9
- package/node_modules/@autonomous-testing/sdk/build/shared/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.d.ts +3 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.js +4 -3
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/index.d.ts +3 -0
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/index.js +7 -0
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/mergeDicts.d.ts +17 -0
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/mergeDicts.js +29 -0
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/index.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/package.json +5 -8
- package/node_modules/@autonomous-testing/sdk/release.config.mjs +55 -0
- package/node_modules/axios/CHANGELOG.md +941 -950
- package/node_modules/axios/LICENSE +16 -4
- package/node_modules/axios/README.md +124 -828
- package/node_modules/axios/SECURITY.md +3 -4
- package/node_modules/axios/UPGRADE_GUIDE.md +168 -0
- package/node_modules/axios/dist/axios.js +2343 -3920
- package/node_modules/axios/dist/axios.map +1 -0
- package/node_modules/axios/dist/axios.min.js +3 -2
- package/node_modules/axios/dist/axios.min.map +1 -0
- package/node_modules/axios/index.d.ts +83 -391
- package/node_modules/axios/index.js +1 -43
- package/node_modules/axios/lib/adapters/http.js +219 -480
- package/node_modules/axios/lib/adapters/xhr.js +93 -61
- package/node_modules/axios/lib/axios.js +22 -47
- package/node_modules/axios/lib/cancel/CancelToken.js +89 -91
- package/node_modules/axios/lib/cancel/CanceledError.js +6 -9
- package/node_modules/axios/lib/cancel/isCancel.js +2 -2
- package/node_modules/axios/lib/core/Axios.js +98 -166
- package/node_modules/axios/lib/core/AxiosError.js +9 -23
- package/node_modules/axios/lib/core/InterceptorManager.js +45 -62
- package/node_modules/axios/lib/core/buildFullPath.js +4 -5
- package/node_modules/axios/lib/core/dispatchRequest.js +32 -26
- package/node_modules/axios/lib/core/mergeConfig.js +53 -59
- package/node_modules/axios/lib/core/settle.js +4 -6
- package/node_modules/axios/lib/core/transformData.js +9 -15
- package/node_modules/axios/lib/defaults/env/FormData.js +2 -0
- package/node_modules/axios/lib/defaults/index.js +57 -72
- package/node_modules/axios/lib/defaults/transitional.js +1 -1
- package/node_modules/axios/lib/env/data.js +3 -1
- package/node_modules/axios/lib/helpers/bind.js +7 -3
- package/node_modules/axios/lib/helpers/buildURL.js +33 -26
- package/node_modules/axios/lib/helpers/combineURLs.js +3 -4
- package/node_modules/axios/lib/helpers/cookies.js +50 -39
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +2 -4
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +2 -3
- package/node_modules/axios/lib/helpers/isAxiosError.js +3 -4
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +46 -45
- package/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
- package/node_modules/axios/lib/helpers/null.js +1 -1
- package/node_modules/axios/lib/helpers/parseHeaders.js +22 -24
- package/node_modules/axios/lib/helpers/parseProtocol.js +3 -3
- package/node_modules/axios/lib/helpers/spread.js +2 -3
- package/node_modules/axios/lib/helpers/toFormData.js +36 -183
- package/node_modules/axios/lib/helpers/validator.js +15 -20
- package/node_modules/axios/lib/utils.js +187 -445
- package/node_modules/axios/package.json +33 -165
- package/node_modules/axios/tsconfig.json +14 -0
- package/node_modules/axios/tslint.json +6 -0
- package/node_modules/process/.eslintrc +21 -0
- package/node_modules/process/LICENSE +22 -0
- package/node_modules/process/README.md +26 -0
- package/node_modules/process/browser.js +184 -0
- package/node_modules/process/index.js +2 -0
- package/node_modules/process/package.json +27 -0
- package/node_modules/process/test.js +199 -0
- package/package.json +2 -2
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.js.map +0 -1
- package/build/adapter/driven/wdioLoggerAdapter/wdioLoggerAdapter.d.ts.map +0 -1
- package/build/adapter/driven/wdioLoggerAdapter/wdioLoggerAdapter.js +0 -20
- package/build/adapter/driven/wdioLoggerAdapter/wdioLoggerAdapter.js.map +0 -1
- package/build/adapter/wdioLoggerAdapter/wdioLoggerAdapter.d.ts +0 -10
- package/build/adapter/wdioLoggerAdapter/wdioLoggerAdapter.d.ts.map +0 -1
- package/build/adapter/wdioLoggerAdapter/wdioLoggerAdapter.js.map +0 -1
- package/build/port/clientSideOperationPort/clientSideOperationPort.d.ts.map +0 -1
- package/build/port/clientSideOperationPort/clientSideOperationPort.js.map +0 -1
- package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/imageTrackingResult.interface.d.ts +0 -3
- package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/imageTrackingResult.interface.js +0 -3
- package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/index.d.ts +0 -4
- package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/trackPayload.interface.d.ts +0 -3
- package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/trackPayload.interface.js +0 -3
- package/node_modules/@autonomous-testing/sdk/build/core/ports/imageTracker.d.ts +0 -6
- package/node_modules/@autonomous-testing/sdk/build/core/ports/imageTracker.js +0 -7
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.d.ts +0 -39
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.default.d.ts +0 -16
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.default.js +0 -31
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.interface.d.ts +0 -93
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.interface.js +0 -14
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.js +0 -153
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapterQueries.d.ts +0 -5
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapterUtils.d.ts +0 -9
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapterUtils.js +0 -26
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/index.d.ts +0 -7
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/index.js +0 -8
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.d.ts +0 -4
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.interface.d.ts +0 -51
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.interface.js +0 -24
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.js +0 -13
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/index.d.ts +0 -4
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/index.js +0 -6
- package/node_modules/axios/MIGRATION_GUIDE.md +0 -3
- package/node_modules/axios/dist/axios.js.map +0 -1
- package/node_modules/axios/dist/axios.min.js.map +0 -1
- package/node_modules/axios/dist/browser/axios.cjs +0 -3638
- package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
- package/node_modules/axios/dist/esm/axios.js +0 -3661
- package/node_modules/axios/dist/esm/axios.js.map +0 -1
- package/node_modules/axios/dist/esm/axios.min.js +0 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +0 -1
- package/node_modules/axios/dist/node/axios.cjs +0 -4705
- package/node_modules/axios/dist/node/axios.cjs.map +0 -1
- package/node_modules/axios/index.d.cts +0 -545
- package/node_modules/axios/lib/adapters/adapters.js +0 -79
- package/node_modules/axios/lib/adapters/fetch.js +0 -227
- package/node_modules/axios/lib/core/AxiosHeaders.js +0 -302
- package/node_modules/axios/lib/env/classes/FormData.js +0 -2
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -192
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -58
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -71
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -28
- package/node_modules/axios/lib/helpers/callbackify.js +0 -16
- package/node_modules/axios/lib/helpers/composeSignals.js +0 -46
- package/node_modules/axios/lib/helpers/formDataToJSON.js +0 -95
- package/node_modules/axios/lib/helpers/formDataToStream.js +0 -111
- package/node_modules/axios/lib/helpers/fromDataURI.js +0 -53
- package/node_modules/axios/lib/helpers/progressEventReducer.js +0 -32
- package/node_modules/axios/lib/helpers/readBlob.js +0 -15
- package/node_modules/axios/lib/helpers/resolveConfig.js +0 -57
- package/node_modules/axios/lib/helpers/speedometer.js +0 -55
- package/node_modules/axios/lib/helpers/throttle.js +0 -35
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -18
- package/node_modules/axios/lib/helpers/trackStream.js +0 -55
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
- package/node_modules/axios/lib/platform/browser/index.js +0 -13
- package/node_modules/axios/lib/platform/common/utils.js +0 -50
- package/node_modules/axios/lib/platform/index.js +0 -7
- package/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
- package/node_modules/axios/lib/platform/node/index.js +0 -12
- package/node_modules/proxy-from-env/.eslintrc +0 -29
- package/node_modules/proxy-from-env/.travis.yml +0 -10
- package/node_modules/proxy-from-env/LICENSE +0 -20
- package/node_modules/proxy-from-env/README.md +0 -131
- package/node_modules/proxy-from-env/index.js +0 -108
- package/node_modules/proxy-from-env/package.json +0 -34
- package/node_modules/proxy-from-env/test.js +0 -483
- /package/build/{port/clientSideOperationPort → core/ports}/clientSideOperationPort.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.d.ts +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.d.ts +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.d.ts +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.d.ts +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.js +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/HISTORY.md +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/LICENSE +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/README.md +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/db.json +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/index.js +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/package.json +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../lib/adapter/fullPageScreenshotAdapter/default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAKxE,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,YAAY,CAMvD,CAAC;AAEF,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,YAAY,CAEpE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import lodash from 'lodash';
|
|
2
|
+
const { merge } = lodash;
|
|
3
|
+
export const DEFAULT_SWIPE_OPTIONS = {
|
|
4
|
+
swipeMoveDuration: 1000,
|
|
5
|
+
swipePauseAfterMove: 100,
|
|
6
|
+
swipePauseBeforeMove: 100,
|
|
7
|
+
swipeStartDuration: 50,
|
|
8
|
+
numberOfSwipes: 1,
|
|
9
|
+
};
|
|
10
|
+
export function setSwipeOptions(options) {
|
|
11
|
+
return merge(DEFAULT_SWIPE_OPTIONS, options);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../lib/adapter/fullPageScreenshotAdapter/default.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;AAEzB,MAAM,CAAC,MAAM,qBAAqB,GAA0B;IAC1D,iBAAiB,EAAE,IAAI;IACvB,mBAAmB,EAAE,GAAG;IACxB,oBAAoB,EAAE,GAAG;IACzB,kBAAkB,EAAE,EAAE;IACtB,cAAc,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,OAAsB;IACpD,OAAO,KAAK,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import { SwipeOptions } from './fullPageScreenshotAdapter.interface.js';\nimport lodash from 'lodash';\n\nconst { merge } = lodash;\n\nexport const DEFAULT_SWIPE_OPTIONS: Partial<SwipeOptions> = {\n swipeMoveDuration: 1000,\n swipePauseAfterMove: 100,\n swipePauseBeforeMove: 100,\n swipeStartDuration: 50,\n numberOfSwipes: 1,\n};\n\nexport function setSwipeOptions(options?: SwipeOptions): SwipeOptions {\n return merge(DEFAULT_SWIPE_OPTIONS, options);\n}\n"]}
|
|
@@ -4,6 +4,7 @@ import { CroppingOptions } from '../../domain/model/config.interface.js';
|
|
|
4
4
|
import { Methods } from '../../domain/model/methods.interface.js';
|
|
5
5
|
import { ScreenshotOutput } from '../../domain/model/screenshotOutput.interface.js';
|
|
6
6
|
import { WopeeService } from '../../domain/service/wopeeService.js';
|
|
7
|
+
import { FullPageScreenshotDataNativeMobileOptions } from './fullPageScreenshotAdapter.interface.js';
|
|
7
8
|
export declare function fullPageScreenshot(methods: Methods, options: FullPageScreenshotDataNativeMobileOptions): Promise<{
|
|
8
9
|
fullPageHeight: number;
|
|
9
10
|
fullPageWidth: number;
|
|
@@ -18,14 +19,5 @@ export declare function fullPageScreenshot(methods: Methods, options: FullPageSc
|
|
|
18
19
|
}[];
|
|
19
20
|
}>;
|
|
20
21
|
export declare function makeFullPageBase64Image(screenshotsData: FullPageScreenshotsData, isLandscape: boolean, croppingOptions: CroppingOptions): Promise<string>;
|
|
21
|
-
interface FullPageScreenshotDataNativeMobileOptions {
|
|
22
|
-
fullPageScrollTimeout: number;
|
|
23
|
-
numberOfSwipes: number;
|
|
24
|
-
swipeStartX: number;
|
|
25
|
-
swipeStartY: number;
|
|
26
|
-
swipeStopX: number;
|
|
27
|
-
swipeStopY: number;
|
|
28
|
-
}
|
|
29
22
|
export declare function trackFullPageMobileNative(methods: Methods, wopeeService: WopeeService, options: TrackFullPageMobileNativeOptions): Promise<ScreenshotOutput>;
|
|
30
|
-
export {};
|
|
31
23
|
//# sourceMappingURL=fullPageScreenshotAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullPageScreenshotAdapter.d.ts","sourceRoot":"","sources":["../../../lib/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AAIrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAIjG,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAGpF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"fullPageScreenshotAdapter.d.ts","sourceRoot":"","sources":["../../../lib/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AAIrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAIjG,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAGpF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,OAAO,EAAE,yCAAyC,EAAgB,MAAM,0CAA0C,CAAC;AAInH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,yCAAyC;;;;;;;;;;;;GAkC5G;AAoDD,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,uBAAuB,EACxC,WAAW,EAAE,OAAO,EACpB,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,MAAM,CAAC,CAyBjB;AAED,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,gBAAgB,CAAC,CAkD3B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface FullPageScreenshotDataNativeMobileOptions {
|
|
2
|
+
fullPageScrollTimeout: number;
|
|
3
|
+
numberOfSwipes?: number;
|
|
4
|
+
swipeStartX: number;
|
|
5
|
+
swipeStartY: number;
|
|
6
|
+
swipeStopX: number;
|
|
7
|
+
swipeStopY: number;
|
|
8
|
+
swipeStartDuration?: number;
|
|
9
|
+
swipePauseBeforeMove?: number;
|
|
10
|
+
swipeMoveDuration?: number;
|
|
11
|
+
swipePauseAfterMove?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SwipeOptions {
|
|
14
|
+
numberOfSwipes?: number;
|
|
15
|
+
swipeStartX: number;
|
|
16
|
+
swipeStartY: number;
|
|
17
|
+
swipeStopX: number;
|
|
18
|
+
swipeStopY: number;
|
|
19
|
+
swipeStartDuration?: number;
|
|
20
|
+
swipePauseBeforeMove?: number;
|
|
21
|
+
swipeMoveDuration?: number;
|
|
22
|
+
swipePauseAfterMove?: number;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=fullPageScreenshotAdapter.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullPageScreenshotAdapter.interface.d.ts","sourceRoot":"","sources":["../../../lib/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yCAAyC;IACxD,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullPageScreenshotAdapter.interface.js","sourceRoot":"","sources":["../../../lib/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.interface.ts"],"names":[],"mappings":"","sourcesContent":["export interface FullPageScreenshotDataNativeMobileOptions {\n fullPageScrollTimeout: number;\n numberOfSwipes?: number;\n swipeStartX: number;\n swipeStartY: number;\n swipeStopX: number;\n swipeStopY: number;\n swipeStartDuration?: number;\n swipePauseBeforeMove?: number;\n swipeMoveDuration?: number;\n swipePauseAfterMove?: number;\n}\n\nexport interface SwipeOptions {\n numberOfSwipes?: number;\n swipeStartX: number;\n swipeStartY: number;\n swipeStopX: number;\n swipeStopY: number;\n swipeStartDuration?: number;\n swipePauseBeforeMove?: number;\n swipeMoveDuration?: number;\n swipePauseAfterMove?: number;\n}\n"]}
|
|
@@ -3,28 +3,14 @@ import { getScreenshotSize } from '../../desktopBrowser/helpers/utils.js';
|
|
|
3
3
|
import { rotateBase64Image } from '../../desktopBrowser/methods/images.js';
|
|
4
4
|
import { takeBase64Screenshot } from '../../desktopBrowser/methods/screenshots.js';
|
|
5
5
|
import { afterScreenshot } from '../../domain/service/afterScreenshot.js';
|
|
6
|
+
import { setSwipeOptions } from './default.js';
|
|
7
|
+
import { swipe } from './swipe.js';
|
|
6
8
|
import { createCanvas, loadImage } from 'canvas';
|
|
7
|
-
async function swipe(methods, swipeStartX, swipeStartY, swipeStopX, swipeStopY) {
|
|
8
|
-
const actions = [
|
|
9
|
-
{
|
|
10
|
-
type: 'pointer',
|
|
11
|
-
id: 'finger1',
|
|
12
|
-
parameters: { pointerType: 'touch' },
|
|
13
|
-
actions: [
|
|
14
|
-
{ type: 'pointerMove', duration: 50, x: swipeStartX, y: swipeStartY },
|
|
15
|
-
{ type: 'pointerDown' },
|
|
16
|
-
{ type: 'pause', duration: 100 },
|
|
17
|
-
{ type: 'pointerMove', duration: 1000, x: swipeStopX, y: swipeStopY },
|
|
18
|
-
{ type: 'pointerUp' },
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
];
|
|
22
|
-
await methods.browser.performActions(actions);
|
|
23
|
-
}
|
|
24
9
|
export async function fullPageScreenshot(methods, options) {
|
|
25
10
|
const viewportScreenshots = [];
|
|
26
11
|
const numberOfSwipes = options.numberOfSwipes;
|
|
27
12
|
const fullPageScrollTimeout = options.fullPageScrollTimeout;
|
|
13
|
+
const swipeOptions = setSwipeOptions(options);
|
|
28
14
|
let screenshotSize;
|
|
29
15
|
for (let i = 0; i <= numberOfSwipes; i++) {
|
|
30
16
|
await waitFor(fullPageScrollTimeout);
|
|
@@ -40,7 +26,7 @@ export async function fullPageScreenshot(methods, options) {
|
|
|
40
26
|
screenshot: rawScreenshot,
|
|
41
27
|
});
|
|
42
28
|
if (i !== numberOfSwipes) {
|
|
43
|
-
await swipe(methods,
|
|
29
|
+
await swipe(methods, swipeOptions);
|
|
44
30
|
}
|
|
45
31
|
}
|
|
46
32
|
return {
|
|
@@ -108,6 +94,10 @@ export async function trackFullPageMobileNative(methods, wopeeService, options)
|
|
|
108
94
|
swipeStartY: options.swipeStartY,
|
|
109
95
|
swipeStopX: options.swipeStopX,
|
|
110
96
|
swipeStopY: options.swipeStopY,
|
|
97
|
+
swipeMoveDuration: options.swipeMoveDuration,
|
|
98
|
+
swipePauseAfterMove: options.swipePauseAfterMove,
|
|
99
|
+
swipePauseBeforeMove: options.swipePauseBeforeMove,
|
|
100
|
+
swipeStartDuration: options.swipeStartDuration,
|
|
111
101
|
};
|
|
112
102
|
const screenshotsData = await fullPageScreenshot(methods, fullPageScreenshotDataNativeMobileOptions);
|
|
113
103
|
const fullPageBase64Image = await makeFullPageBase64Image(screenshotsData, wopeeService.config.isLandscape, wopeeService.config.cropping);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullPageScreenshotAdapter.js","sour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D,MAAM,yCAAyC,GAA8C;QAC3F,qBAAqB,EAAE,qBAAqB,KAAK,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI;QACzF,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC;IACF,MAAM,eAAe,GAA4B,MAAM,kBAAkB,CACvE,OAAO,EACP,yCAAyC,CAC1C,CAAC;IAEF,MAAM,mBAAmB,GAAW,MAAM,uBAAuB,CAC/D,eAAe,EACf,YAAY,CAAC,MAAM,CAAC,WAAW,EAC/B,YAAY,CAAC,MAAM,CAAC,QAAQ,CAC7B,CAAC;IAEF,MAAM,YAAY,GAA2B;QAC3C,WAAW,EAAE,mBAAmB;QAChC,sBAAsB,EAAE;YACtB,yBAAyB,EAAE;gBACzB,WAAW,EAAE,QAAQ;aACtB;YACD,yBAAyB,EAAE;gBACzB,WAAW,EAAE,QAAQ;gBACrB,cAAc,EAAE,QAAQ;gBACxB,gBAAgB,EAAE,CAAC;gBACnB,IAAI,EAAE,OAAO,CAAC,QAAQ;gBACtB,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,CAAC;gBACb,YAAY,EAAE,CAAC;gBACf,WAAW,EAAE,CAAC;aACf;SACF;QACD,2BAA2B,EAAE;YAC3B,GAAG,OAAO;YACV,WAAW,EAAE,mBAAmB;SACjC;KACF,CAAC;IAEF,OAAO,eAAe,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;AACrD,CAAC","sourcesContent":["import { TrackFullPageMobileNativeOptions } from '../../core/domain/valueObjects/track.interface.js';\nimport { waitFor } from '../../desktopBrowser/helpers/utils.js';\nimport { getScreenshotSize } from '../../desktopBrowser/helpers/utils.js';\nimport { rotateBase64Image } from '../../desktopBrowser/methods/images.js';\nimport { FullPageScreenshotsData } from '../../desktopBrowser/methods/screenshots.interfaces.js';\nimport { ScreenshotData } from '../../desktopBrowser/methods/screenshots.interfaces.js';\nimport { takeBase64Screenshot } from '../../desktopBrowser/methods/screenshots.js';\nimport { AfterScreenshotOptions } from '../../domain/model/afterScreenshotOptions.interface.js';\nimport { CroppingOptions } from '../../domain/model/config.interface.js';\nimport { Methods } from '../../domain/model/methods.interface.js';\nimport { ScreenshotOutput } from '../../domain/model/screenshotOutput.interface.js';\nimport { ScreenshotSize } from '../../domain/model/screenshotSize.interface.js';\nimport { afterScreenshot } from '../../domain/service/afterScreenshot.js';\nimport { WopeeService } from '../../domain/service/wopeeService.js';\nimport { Image, createCanvas, loadImage } from 'canvas';\n\nasync function swipe(\n methods: Methods,\n swipeStartX: number,\n swipeStartY: number,\n swipeStopX: number,\n swipeStopY: number,\n) {\n const actions = [\n {\n type: 'pointer',\n id: 'finger1',\n parameters: { pointerType: 'touch' },\n actions: [\n { type: 'pointerMove', duration: 50, x: swipeStartX, y: swipeStartY },\n { type: 'pointerDown' },\n { type: 'pause', duration: 100 },\n { type: 'pointerMove', duration: 1000, x: swipeStopX, y: swipeStopY },\n { type: 'pointerUp' },\n ],\n },\n ];\n await methods.browser.performActions(actions);\n}\n\nexport async function fullPageScreenshot(methods: Methods, options: FullPageScreenshotDataNativeMobileOptions) {\n const viewportScreenshots = [];\n const numberOfSwipes: number = options.numberOfSwipes;\n const fullPageScrollTimeout: number = options.fullPageScrollTimeout;\n\n let screenshotSize: ScreenshotSize;\n\n for (let i = 0; i <= numberOfSwipes; i++) {\n await waitFor(fullPageScrollTimeout);\n\n const rawScreenshot = await takeBase64Screenshot(methods.screenShot);\n screenshotSize = getScreenshotSize(rawScreenshot);\n\n viewportScreenshots.push({\n canvasWidth: screenshotSize.width,\n canvasYPosition: i * screenshotSize.height,\n imageHeight: screenshotSize.height,\n imageWidth: screenshotSize.width,\n imageXPosition: 0,\n imageYPosition: i * screenshotSize.height,\n screenshot: rawScreenshot,\n });\n\n if (i !== numberOfSwipes) {\n await swipe(methods, options.swipeStartX, options.swipeStartY, options.swipeStopX, options.swipeStopY);\n }\n }\n\n return {\n fullPageHeight: screenshotSize.height * viewportScreenshots.length,\n fullPageWidth: screenshotSize.width,\n data: viewportScreenshots,\n };\n}\n\nasync function createImageCanvas(\n screenshotData: ScreenshotData,\n croppingOptions: CroppingOptions,\n isLandscape: boolean,\n): Promise<Image> {\n const imageBase64 = isLandscape\n ? await rotateBase64Image({\n base64Image: screenshotData.screenshot,\n degrees: -90,\n newHeight: screenshotData.imageWidth,\n newWidth: screenshotData.imageHeight,\n })\n : screenshotData.screenshot;\n\n const image = await loadImage(`data:image/png;base64,${imageBase64}`);\n\n const canvasWidth = image.width;\n const canvasHeight = image.height;\n const canvas = createCanvas(canvasWidth, canvasHeight);\n const ctx = canvas.getContext('2d');\n ctx.fillStyle = 'black';\n ctx.fillRect(0, 0, canvasWidth, canvasHeight);\n\n let sourceXStart = screenshotData.imageXPosition;\n let sourceYStart = 0;\n let sourceCanvasWidth = canvasWidth;\n let sourceCanvasHeight = canvasHeight;\n\n if (croppingOptions.croppingEnabled === true) {\n sourceXStart = sourceXStart + croppingOptions.xCropLeft;\n sourceYStart = sourceYStart + croppingOptions.yCropTop;\n sourceCanvasWidth = sourceCanvasWidth - croppingOptions.xCropLeft - croppingOptions.xCropRight;\n sourceCanvasHeight = sourceCanvasHeight - croppingOptions.yCropTop - croppingOptions.yCropBottom;\n }\n\n ctx.drawImage(\n image,\n sourceXStart,\n sourceYStart,\n sourceCanvasWidth,\n sourceCanvasHeight,\n sourceXStart,\n sourceYStart,\n sourceCanvasWidth,\n sourceCanvasHeight,\n );\n\n return await loadImage(canvas.toDataURL());\n}\n\nexport async function makeFullPageBase64Image(\n screenshotsData: FullPageScreenshotsData,\n isLandscape: boolean,\n croppingOptions: CroppingOptions,\n): Promise<string> {\n const canvasWidth = screenshotsData.fullPageWidth;\n const canvasHeight = screenshotsData.fullPageHeight;\n const canvas = createCanvas(canvasWidth, canvasHeight);\n const ctx = canvas.getContext('2d');\n\n for (let i = 0; i < screenshotsData.data.length; i++) {\n const screenshotData: ScreenshotData = screenshotsData.data[i];\n const image = await createImageCanvas(screenshotData, croppingOptions, isLandscape);\n\n ctx.drawImage(\n image, // image\n 0, // sx\n screenshotData.imageYPosition, // sy\n image.width, // sw\n image.height, // sh\n 0, // dx\n screenshotData.canvasYPosition, // dy\n image.width, // dw\n image.height, // dh\n );\n }\n\n const base64Image = canvas.toDataURL().replace(/^data:image\\/png;base64,/, '');\n return base64Image;\n}\n\ninterface FullPageScreenshotDataNativeMobileOptions {\n fullPageScrollTimeout: number;\n numberOfSwipes: number;\n swipeStartX: number;\n swipeStartY: number;\n swipeStopX: number;\n swipeStopY: number;\n}\n\nexport async function trackFullPageMobileNative(\n methods: Methods,\n wopeeService: WopeeService,\n options: TrackFullPageMobileNativeOptions,\n): Promise<ScreenshotOutput> {\n const fullPageScrollTimeout = options?.fullPageScrollTimeout;\n\n const fullPageScreenshotDataNativeMobileOptions: FullPageScreenshotDataNativeMobileOptions = {\n fullPageScrollTimeout: fullPageScrollTimeout !== undefined ? fullPageScrollTimeout : 1500,\n numberOfSwipes: options.numberOfSwipes,\n swipeStartX: options.swipeStartX,\n swipeStartY: options.swipeStartY,\n swipeStopX: options.swipeStopX,\n swipeStopY: options.swipeStopY,\n };\n const screenshotsData: FullPageScreenshotsData = await fullPageScreenshot(\n methods,\n fullPageScreenshotDataNativeMobileOptions,\n );\n\n const fullPageBase64Image: string = await makeFullPageBase64Image(\n screenshotsData,\n wopeeService.config.isLandscape,\n wopeeService.config.cropping,\n );\n\n const afterOptions: AfterScreenshotOptions = {\n imageBase64: fullPageBase64Image,\n saveBase64ImageOptions: {\n screenshotFilePathOptions: {\n browserName: 'mobile',\n },\n screenshotFileNameOptions: {\n browserName: 'mobile',\n browserVersion: 'mobile',\n devicePixelRatio: 1,\n name: options.stepName,\n outerHeight: 1,\n outerWidth: 1,\n screenHeight: 1,\n screenWidth: 1,\n },\n },\n screenshotValidationOptions: {\n ...options,\n imageBase64: fullPageBase64Image,\n },\n };\n\n return afterScreenshot(wopeeService, afterOptions);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"fullPageScreenshotAdapter.js","sourceRoot":"","sources":["../../../lib/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAG3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAMnF,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAS,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,OAAgB,EAAE,OAAkD;IAC3G,MAAM,mBAAmB,GAAG,EAAE,CAAC;IAC/B,MAAM,cAAc,GAAW,OAAO,CAAC,cAAc,CAAC;IACtD,MAAM,qBAAqB,GAAW,OAAO,CAAC,qBAAqB,CAAC;IACpE,MAAM,YAAY,GAAiB,eAAe,CAAC,OAAO,CAAC,CAAC;IAE5D,IAAI,cAA8B,CAAC;IAEnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAErC,MAAM,aAAa,GAAG,MAAM,oBAAoB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACrE,cAAc,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC;QAElD,mBAAmB,CAAC,IAAI,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kB;KAC/C,CAAC;IACF,MAAM,eAAe,GAA4B,MAAM,kBAAkB,CACvE,OAAO,EACP,yCAAyC,CAC1C,CAAC;IAEF,MAAM,mBAAmB,GAAW,MAAM,uBAAuB,CAC/D,eAAe,EACf,YAAY,CAAC,MAAM,CAAC,WAAW,EAC/B,YAAY,CAAC,MAAM,CAAC,QAAQ,CAC7B,CAAC;IAEF,MAAM,YAAY,GAA2B;QAC3C,WAAW,EAAE,mBAAmB;QAChC,sBAAsB,EAAE;YACtB,yBAAyB,EAAE;gBACzB,WAAW,EAAE,QAAQ;aACtB;YACD,yBAAyB,EAAE;gBACzB,WAAW,EAAE,QAAQ;gBACrB,cAAc,EAAE,QAAQ;gBACxB,gBAAgB,EAAE,CAAC;gBACnB,IAAI,EAAE,OAAO,CAAC,QAAQ;gBACtB,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,CAAC;gBACb,YAAY,EAAE,CAAC;gBACf,WAAW,EAAE,CAAC;aACf;SACF;QACD,2BAA2B,EAAE;YAC3B,GAAG,OAAO;YACV,WAAW,EAAE,mBAAmB;SACjC;KACF,CAAC;IAEF,OAAO,eAAe,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;AACrD,CAAC","sourcesContent":["import { TrackFullPageMobileNativeOptions } from '../../core/domain/valueObjects/track.interface.js';\nimport { waitFor } from '../../desktopBrowser/helpers/utils.js';\nimport { getScreenshotSize } from '../../desktopBrowser/helpers/utils.js';\nimport { rotateBase64Image } from '../../desktopBrowser/methods/images.js';\nimport { FullPageScreenshotsData } from '../../desktopBrowser/methods/screenshots.interfaces.js';\nimport { ScreenshotData } from '../../desktopBrowser/methods/screenshots.interfaces.js';\nimport { takeBase64Screenshot } from '../../desktopBrowser/methods/screenshots.js';\nimport { AfterScreenshotOptions } from '../../domain/model/afterScreenshotOptions.interface.js';\nimport { CroppingOptions } from '../../domain/model/config.interface.js';\nimport { Methods } from '../../domain/model/methods.interface.js';\nimport { ScreenshotOutput } from '../../domain/model/screenshotOutput.interface.js';\nimport { ScreenshotSize } from '../../domain/model/screenshotSize.interface.js';\nimport { afterScreenshot } from '../../domain/service/afterScreenshot.js';\nimport { WopeeService } from '../../domain/service/wopeeService.js';\nimport { setSwipeOptions } from './default.js';\nimport { FullPageScreenshotDataNativeMobileOptions, SwipeOptions } from './fullPageScreenshotAdapter.interface.js';\nimport { swipe } from './swipe.js';\nimport { Image, createCanvas, loadImage } from 'canvas';\n\nexport async function fullPageScreenshot(methods: Methods, options: FullPageScreenshotDataNativeMobileOptions) {\n const viewportScreenshots = [];\n const numberOfSwipes: number = options.numberOfSwipes;\n const fullPageScrollTimeout: number = options.fullPageScrollTimeout;\n const swipeOptions: SwipeOptions = setSwipeOptions(options);\n\n let screenshotSize: ScreenshotSize;\n\n for (let i = 0; i <= numberOfSwipes; i++) {\n await waitFor(fullPageScrollTimeout);\n\n const rawScreenshot = await takeBase64Screenshot(methods.screenShot);\n screenshotSize = getScreenshotSize(rawScreenshot);\n\n viewportScreenshots.push({\n canvasWidth: screenshotSize.width,\n canvasYPosition: i * screenshotSize.height,\n imageHeight: screenshotSize.height,\n imageWidth: screenshotSize.width,\n imageXPosition: 0,\n imageYPosition: i * screenshotSize.height,\n screenshot: rawScreenshot,\n });\n\n if (i !== numberOfSwipes) {\n await swipe(methods, swipeOptions);\n }\n }\n\n return {\n fullPageHeight: screenshotSize.height * viewportScreenshots.length,\n fullPageWidth: screenshotSize.width,\n data: viewportScreenshots,\n };\n}\n\nasync function createImageCanvas(\n screenshotData: ScreenshotData,\n croppingOptions: CroppingOptions,\n isLandscape: boolean,\n): Promise<Image> {\n const imageBase64 = isLandscape\n ? await rotateBase64Image({\n base64Image: screenshotData.screenshot,\n degrees: -90,\n newHeight: screenshotData.imageWidth,\n newWidth: screenshotData.imageHeight,\n })\n : screenshotData.screenshot;\n\n const image = await loadImage(`data:image/png;base64,${imageBase64}`);\n\n const canvasWidth = image.width;\n const canvasHeight = image.height;\n const canvas = createCanvas(canvasWidth, canvasHeight);\n const ctx = canvas.getContext('2d');\n ctx.fillStyle = 'black';\n ctx.fillRect(0, 0, canvasWidth, canvasHeight);\n\n let sourceXStart = screenshotData.imageXPosition;\n let sourceYStart = 0;\n let sourceCanvasWidth = canvasWidth;\n let sourceCanvasHeight = canvasHeight;\n\n if (croppingOptions.croppingEnabled === true) {\n sourceXStart = sourceXStart + croppingOptions.xCropLeft;\n sourceYStart = sourceYStart + croppingOptions.yCropTop;\n sourceCanvasWidth = sourceCanvasWidth - croppingOptions.xCropLeft - croppingOptions.xCropRight;\n sourceCanvasHeight = sourceCanvasHeight - croppingOptions.yCropTop - croppingOptions.yCropBottom;\n }\n\n ctx.drawImage(\n image,\n sourceXStart,\n sourceYStart,\n sourceCanvasWidth,\n sourceCanvasHeight,\n sourceXStart,\n sourceYStart,\n sourceCanvasWidth,\n sourceCanvasHeight,\n );\n\n return await loadImage(canvas.toDataURL());\n}\n\nexport async function makeFullPageBase64Image(\n screenshotsData: FullPageScreenshotsData,\n isLandscape: boolean,\n croppingOptions: CroppingOptions,\n): Promise<string> {\n const canvasWidth = screenshotsData.fullPageWidth;\n const canvasHeight = screenshotsData.fullPageHeight;\n const canvas = createCanvas(canvasWidth, canvasHeight);\n const ctx = canvas.getContext('2d');\n\n for (let i = 0; i < screenshotsData.data.length; i++) {\n const screenshotData: ScreenshotData = screenshotsData.data[i];\n const image = await createImageCanvas(screenshotData, croppingOptions, isLandscape);\n\n ctx.drawImage(\n image, // image\n 0, // sx\n screenshotData.imageYPosition, // sy\n image.width, // sw\n image.height, // sh\n 0, // dx\n screenshotData.canvasYPosition, // dy\n image.width, // dw\n image.height, // dh\n );\n }\n\n const base64Image = canvas.toDataURL().replace(/^data:image\\/png;base64,/, '');\n return base64Image;\n}\n\nexport async function trackFullPageMobileNative(\n methods: Methods,\n wopeeService: WopeeService,\n options: TrackFullPageMobileNativeOptions,\n): Promise<ScreenshotOutput> {\n const fullPageScrollTimeout = options?.fullPageScrollTimeout;\n\n const fullPageScreenshotDataNativeMobileOptions: FullPageScreenshotDataNativeMobileOptions = {\n fullPageScrollTimeout: fullPageScrollTimeout !== undefined ? fullPageScrollTimeout : 1500,\n numberOfSwipes: options.numberOfSwipes,\n swipeStartX: options.swipeStartX,\n swipeStartY: options.swipeStartY,\n swipeStopX: options.swipeStopX,\n swipeStopY: options.swipeStopY,\n swipeMoveDuration: options.swipeMoveDuration,\n swipePauseAfterMove: options.swipePauseAfterMove,\n swipePauseBeforeMove: options.swipePauseBeforeMove,\n swipeStartDuration: options.swipeStartDuration,\n };\n const screenshotsData: FullPageScreenshotsData = await fullPageScreenshot(\n methods,\n fullPageScreenshotDataNativeMobileOptions,\n );\n\n const fullPageBase64Image: string = await makeFullPageBase64Image(\n screenshotsData,\n wopeeService.config.isLandscape,\n wopeeService.config.cropping,\n );\n\n const afterOptions: AfterScreenshotOptions = {\n imageBase64: fullPageBase64Image,\n saveBase64ImageOptions: {\n screenshotFilePathOptions: {\n browserName: 'mobile',\n },\n screenshotFileNameOptions: {\n browserName: 'mobile',\n browserVersion: 'mobile',\n devicePixelRatio: 1,\n name: options.stepName,\n outerHeight: 1,\n outerWidth: 1,\n screenHeight: 1,\n screenWidth: 1,\n },\n },\n screenshotValidationOptions: {\n ...options,\n imageBase64: fullPageBase64Image,\n },\n };\n\n return afterScreenshot(wopeeService, afterOptions);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swipe.d.ts","sourceRoot":"","sources":["../../../lib/adapter/fullPageScreenshotAdapter/swipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAExE,wBAAsB,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,iBAiBlE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export async function swipe(methods, options) {
|
|
2
|
+
const actions = [
|
|
3
|
+
{
|
|
4
|
+
type: 'pointer',
|
|
5
|
+
id: 'finger1',
|
|
6
|
+
parameters: { pointerType: 'touch' },
|
|
7
|
+
actions: [
|
|
8
|
+
{ type: 'pointerMove', duration: options.swipeStartDuration, x: options.swipeStartX, y: options.swipeStartY },
|
|
9
|
+
{ type: 'pointerDown' },
|
|
10
|
+
{ type: 'pause', duration: options.swipePauseBeforeMove },
|
|
11
|
+
{ type: 'pointerMove', duration: options.swipeMoveDuration, x: options.swipeStopX, y: options.swipeStopY },
|
|
12
|
+
{ type: 'pause', duration: options.swipePauseAfterMove },
|
|
13
|
+
{ type: 'pointerUp' },
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
await methods.browser.performActions(actions);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=swipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swipe.js","sourceRoot":"","sources":["../../../lib/adapter/fullPageScreenshotAdapter/swipe.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,OAAgB,EAAE,OAAqB;IACjE,MAAM,OAAO,GAAG;QACd;YACE,IAAI,EAAE,SAAS;YACf,EAAE,EAAE,SAAS;YACb,UAAU,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE;YACpC,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC,kBAAkB,EAAE,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE;gBAC7G,EAAE,IAAI,EAAE,aAAa,EAAE;gBACvB,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,oBAAoB,EAAE;gBACzD,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,OAAO,CAAC,UAAU,EAAE;gBAC1G,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,mBAAmB,EAAE;gBACxD,EAAE,IAAI,EAAE,WAAW,EAAE;aACtB;SACF;KACF,CAAC;IACF,MAAM,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAChD,CAAC","sourcesContent":["import { Methods } from '../../domain/model/methods.interface.js';\nimport { SwipeOptions } from './fullPageScreenshotAdapter.interface.js';\n\nexport async function swipe(methods: Methods, options: SwipeOptions) {\n const actions = [\n {\n type: 'pointer',\n id: 'finger1',\n parameters: { pointerType: 'touch' },\n actions: [\n { type: 'pointerMove', duration: options.swipeStartDuration, x: options.swipeStartX, y: options.swipeStartY },\n { type: 'pointerDown' },\n { type: 'pause', duration: options.swipePauseBeforeMove },\n { type: 'pointerMove', duration: options.swipeMoveDuration, x: options.swipeStopX, y: options.swipeStopY },\n { type: 'pause', duration: options.swipePauseAfterMove },\n { type: 'pointerUp' },\n ],\n },\n ];\n await methods.browser.performActions(actions);\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface TrackOptions extends
|
|
1
|
+
import { CreateIntegrationStepPayload } from '@autonomous-testing/sdk';
|
|
2
|
+
export interface TrackOptions extends CreateIntegrationStepPayload {
|
|
3
3
|
}
|
|
4
4
|
export interface TrackElementOptions extends Omit<TrackOptions, 'imageBase64'> {
|
|
5
5
|
autoElementScroll?: boolean;
|
|
@@ -13,10 +13,14 @@ export interface TrackImageOptions extends TrackOptions {
|
|
|
13
13
|
export interface TrackViewportOptions extends Omit<TrackOptions, 'imageBase64'> {
|
|
14
14
|
}
|
|
15
15
|
export interface TrackFullPageMobileNativeOptions extends TrackFullPageOptions {
|
|
16
|
-
numberOfSwipes
|
|
16
|
+
numberOfSwipes?: number;
|
|
17
17
|
swipeStartX: number;
|
|
18
18
|
swipeStartY: number;
|
|
19
19
|
swipeStopX: number;
|
|
20
20
|
swipeStopY: number;
|
|
21
|
+
swipeStartDuration?: number;
|
|
22
|
+
swipePauseBeforeMove?: number;
|
|
23
|
+
swipeMoveDuration?: number;
|
|
24
|
+
swipePauseAfterMove?: number;
|
|
21
25
|
}
|
|
22
26
|
//# sourceMappingURL=track.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track.interface.d.ts","sourceRoot":"","sources":["../../../../lib/core/domain/valueObjects/track.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"track.interface.d.ts","sourceRoot":"","sources":["../../../../lib/core/domain/valueObjects/track.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE,MAAM,WAAW,YAAa,SAAQ,4BAA4B;CAAG;AAErE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC;IAC5E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC;IAC7E,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,iBAAkB,SAAQ,YAAY;CAAG;AAE1D,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC;CAAG;AAElF,MAAM,WAAW,gCAAiC,SAAQ,oBAAoB;IAE5E,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,WAAW,EAAE,MAAM,CAAC;IAEpB,WAAW,EAAE,MAAM,CAAC;IAEpB,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,EAAE,MAAM,CAAC;IAEnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track.interface.js","sourceRoot":"","sources":["../../../../lib/core/domain/valueObjects/track.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"track.interface.js","sourceRoot":"","sources":["../../../../lib/core/domain/valueObjects/track.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { CreateIntegrationStepPayload } from '@autonomous-testing/sdk';\n\nexport interface TrackOptions extends CreateIntegrationStepPayload {}\n\nexport interface TrackElementOptions extends Omit<TrackOptions, 'imageBase64'> {\n autoElementScroll?: boolean;\n element: WebdriverIO.Element;\n}\n\nexport interface TrackFullPageOptions extends Omit<TrackOptions, 'imageBase64'> {\n fullPageScrollTimeout?: number;\n}\n\nexport interface TrackImageOptions extends TrackOptions {}\n\nexport interface TrackViewportOptions extends Omit<TrackOptions, 'imageBase64'> {}\n\nexport interface TrackFullPageMobileNativeOptions extends TrackFullPageOptions {\n // (Optional) Number of swipes.\n numberOfSwipes?: number;\n // Starting X-coordinate of the swipe.\n swipeStartX: number;\n // Starting Y-coordinate of the swipe.\n swipeStartY: number;\n // Stopping X-coordinate of the swipe.\n swipeStopX: number;\n // Stopping Y-coordinate of the swipe.\n swipeStopY: number;\n // (Optional) Duration of the initial pointer move to the start position (default is 50ms).\n swipeStartDuration?: number;\n // (Optional) Duration of the pause before the swipe starts (default is 100ms).\n swipePauseBeforeMove?: number;\n // (Optional) Duration of the swipe from start to stop position (default is 1000ms).\n swipeMoveDuration?: number;\n // (Optional) Duration of the pause after the swipe ends and before the pointer up action (default is 100ms).\n swipePauseAfterMove?: number;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElementPosition } from '../../core/domain/valueObjects/index.js';
|
|
2
1
|
import { ScreenDimensions } from '../../desktopBrowser/clientSideScript/screenDimensions.interfaces.js';
|
|
3
2
|
import { Executor } from '../../desktopBrowser/methods/methods.interface.js';
|
|
3
|
+
import { ElementPosition } from '../domain/valueObjects/index.js';
|
|
4
4
|
export declare abstract class ClientSideOperationPort {
|
|
5
5
|
abstract getDocumentScrollHeight(executor: Executor): Promise<number>;
|
|
6
6
|
abstract getElementPositionTopDom(executor: Executor, element: any): Promise<ElementPosition>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientSideOperationPort.d.ts","sourceRoot":"","sources":["../../../lib/core/ports/clientSideOperationPort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sEAAsE,CAAC;AACxG,OAAO,EAAE,QAAQ,EAAE,MAAM,mDAAmD,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,8BAAsB,uBAAuB;IAC3C,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IACrE,QAAQ,CAAC,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,eAAe,CAAC;IAC7F,QAAQ,CAAC,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,eAAe,CAAC;IAChG,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAC3E,QAAQ,CAAC,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IACjF,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAChF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientSideOperationPort.js","sourceRoot":"","sources":["../../../lib/core/ports/clientSideOperationPort.ts"],"names":[],"mappings":"AAIA,MAAM,OAAgB,uBAAuB;CAO5C","sourcesContent":["import { ScreenDimensions } from '../../desktopBrowser/clientSideScript/screenDimensions.interfaces.js';\nimport { Executor } from '../../desktopBrowser/methods/methods.interface.js';\nimport { ElementPosition } from '../domain/valueObjects/index.js';\n\nexport abstract class ClientSideOperationPort {\n abstract getDocumentScrollHeight(executor: Executor): Promise<number>;\n abstract getElementPositionTopDom(executor: Executor, element: any): Promise<ElementPosition>;\n abstract getElementPositionTopWindow(executor: Executor, element: any): Promise<ElementPosition>;\n abstract getScreenDimensions(executor: Executor): Promise<ScreenDimensions>;\n abstract scrollElementIntoView(executor: Executor, element: any): Promise<number>;\n abstract scrollToPosition(executor: Executor, yPosition: number): Promise<void>;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LocalSaveScreenshotAdapterOptions } from '../../adapter/driven/localSaveScreenshot/localSaveScreenshot.interface.js';
|
|
2
|
-
import {
|
|
3
|
-
export interface ScreenshotValidationOptions extends
|
|
2
|
+
import { ApolloAdapterConfig } from '@autonomous-testing/sdk';
|
|
3
|
+
export interface ScreenshotValidationOptions extends ApolloAdapterConfig {
|
|
4
4
|
screenshotValidationEnabled?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export interface CroppingOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.interface.d.ts","sourceRoot":"","sources":["../../../lib/domain/model/config.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2EAA2E,CAAC;AAC9H,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"config.interface.d.ts","sourceRoot":"","sources":["../../../lib/domain/model/config.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2EAA2E,CAAC;AAC9H,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IAItE,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,oBAAoB,CAAC,EAAE,2BAA2B,CAAC;IACnD,gBAAgB,CAAC,EAAE,iCAAiC,CAAC;IACrD,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.interface.js","sourceRoot":"","sources":["../../../lib/domain/model/config.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { LocalSaveScreenshotAdapterOptions } from '../../adapter/driven/localSaveScreenshot/localSaveScreenshot.interface.js';\nimport {
|
|
1
|
+
{"version":3,"file":"config.interface.js","sourceRoot":"","sources":["../../../lib/domain/model/config.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { LocalSaveScreenshotAdapterOptions } from '../../adapter/driven/localSaveScreenshot/localSaveScreenshot.interface.js';\nimport { ApolloAdapterConfig } from '@autonomous-testing/sdk';\n\nexport interface ScreenshotValidationOptions extends ApolloAdapterConfig {\n /*\n If true, screenshotValidation is enabled.\n */\n screenshotValidationEnabled?: boolean;\n}\n\nexport interface CroppingOptions {\n xCropLeft?: number;\n xCropRight?: number;\n yCropTop?: number;\n yCropBottom?: number;\n croppingEnabled?: boolean;\n}\n\nexport interface WopeeServiceOptions {\n screenshotValidation?: ScreenshotValidationOptions;\n permanentStorage?: LocalSaveScreenshotAdapterOptions;\n cropping?: CroppingOptions;\n isLandscape?: boolean;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PermanentStorageDrivenPort } from '../../port/driven/permanentStoragePort.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ApolloAdapter } from '@autonomous-testing/sdk';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a collection of instances used within the application.
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@ export interface Instances {
|
|
|
7
7
|
/**
|
|
8
8
|
* An instance for tracking screenshots to the Wopee platform.
|
|
9
9
|
*/
|
|
10
|
-
screenshotValidation?:
|
|
10
|
+
screenshotValidation?: ApolloAdapter;
|
|
11
11
|
/**
|
|
12
12
|
* An instance for performing permanent storage operations.
|
|
13
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instances.interface.d.ts","sourceRoot":"","sources":["../../../lib/domain/model/instances.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"instances.interface.d.ts","sourceRoot":"","sources":["../../../lib/domain/model/instances.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,oBAAoB,CAAC,EAAE,aAAa,CAAC;IAErC;;OAEG;IACH,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;CAC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instances.interface.js","sourceRoot":"","sources":["../../../lib/domain/model/instances.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { PermanentStorageDrivenPort } from '../../port/driven/permanentStoragePort.js';\nimport {
|
|
1
|
+
{"version":3,"file":"instances.interface.js","sourceRoot":"","sources":["../../../lib/domain/model/instances.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { PermanentStorageDrivenPort } from '../../port/driven/permanentStoragePort.js';\nimport { ApolloAdapter } from '@autonomous-testing/sdk';\n\n/**\n * Represents a collection of instances used within the application.\n */\nexport interface Instances {\n /**\n * An instance for tracking screenshots to the Wopee platform.\n */\n screenshotValidation?: ApolloAdapter;\n\n /**\n * An instance for performing permanent storage operations.\n */\n permanentStorage?: PermanentStorageDrivenPort;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PermanentStorageResult } from './permanentStorageResult.interface.js';
|
|
2
|
-
import {
|
|
2
|
+
import { IntegrationStep } from '@autonomous-testing/sdk';
|
|
3
3
|
/**
|
|
4
4
|
* Represents the output information of a captured screenshot.
|
|
5
5
|
*/
|
|
@@ -11,6 +11,6 @@ export interface ScreenshotOutput {
|
|
|
11
11
|
/**
|
|
12
12
|
* Result of screenshot validation, if performed.
|
|
13
13
|
*/
|
|
14
|
-
screenshotValidationResult?:
|
|
14
|
+
screenshotValidationResult?: IntegrationStep;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=screenshotOutput.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenshotOutput.interface.d.ts","sourceRoot":"","sources":["../../../lib/domain/model/screenshotOutput.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"screenshotOutput.interface.d.ts","sourceRoot":"","sources":["../../../lib/domain/model/screenshotOutput.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAEhD;;OAEG;IACH,0BAA0B,CAAC,EAAE,eAAe,CAAC;CAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenshotOutput.interface.js","sourceRoot":"","sources":["../../../lib/domain/model/screenshotOutput.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { PermanentStorageResult } from './permanentStorageResult.interface.js';\nimport {
|
|
1
|
+
{"version":3,"file":"screenshotOutput.interface.js","sourceRoot":"","sources":["../../../lib/domain/model/screenshotOutput.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { PermanentStorageResult } from './permanentStorageResult.interface.js';\nimport { IntegrationStep } from '@autonomous-testing/sdk';\n\n/**\n * Represents the output information of a captured screenshot.\n */\nexport interface ScreenshotOutput {\n /**\n * The file metadata of the screenshot.\n */\n permanentStorageResult?: PermanentStorageResult;\n\n /**\n * Result of screenshot validation, if performed.\n */\n screenshotValidationResult?: IntegrationStep;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LocalSaveScreenshotAdapterOptions } from '../../adapter/driven/localSaveScreenshot/localSaveScreenshot.interface.js';
|
|
2
2
|
import { CroppingOptions } from './croppingOptions.interface.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ApolloAdapterConfig } from '@autonomous-testing/sdk';
|
|
4
4
|
/**
|
|
5
5
|
* Options for configuring the Wopee Service.
|
|
6
6
|
*/
|
|
@@ -12,7 +12,7 @@ export interface WopeeServiceOptions {
|
|
|
12
12
|
/**
|
|
13
13
|
* Options for screenshot validation using VRT (Visual Regression Testing).
|
|
14
14
|
*/
|
|
15
|
-
screenshotValidation?:
|
|
15
|
+
screenshotValidation?: ApolloAdapterConfig;
|
|
16
16
|
/**
|
|
17
17
|
* Cropping options.
|
|
18
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.interface.d.ts","sourceRoot":"","sources":["../../../lib/domain/model/service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2EAA2E,CAAC;AAC9H,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"service.interface.d.ts","sourceRoot":"","sources":["../../../lib/domain/model/service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2EAA2E,CAAC;AAC9H,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,gBAAgB,CAAC,EAAE,iCAAiC,CAAC;IAErD;;OAEG;IACH,oBAAoB,CAAC,EAAE,mBAAmB,CAAC;IAE3C;;OAEG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAE3B;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,kBAAkB,EAAE,OAAO,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.interface.js","sourceRoot":"","sources":["../../../lib/domain/model/service.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { LocalSaveScreenshotAdapterOptions } from '../../adapter/driven/localSaveScreenshot/localSaveScreenshot.interface.js';\nimport { CroppingOptions } from './croppingOptions.interface.js';\nimport {
|
|
1
|
+
{"version":3,"file":"service.interface.js","sourceRoot":"","sources":["../../../lib/domain/model/service.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { LocalSaveScreenshotAdapterOptions } from '../../adapter/driven/localSaveScreenshot/localSaveScreenshot.interface.js';\nimport { CroppingOptions } from './croppingOptions.interface.js';\nimport { ApolloAdapterConfig } from '@autonomous-testing/sdk';\n\n/**\n * Options for configuring the Wopee Service.\n */\nexport interface WopeeServiceOptions {\n /**\n * Options for permanent storage of screenshots.\n */\n permanentStorage?: LocalSaveScreenshotAdapterOptions;\n\n /**\n * Options for screenshot validation using VRT (Visual Regression Testing).\n */\n screenshotValidation?: ApolloAdapterConfig;\n\n /**\n * Cropping options.\n */\n cropping?: CroppingOptions;\n\n /**\n * Landscape or portrait.\n */\n isLandscape: boolean;\n\n /**\n * Save or not screenshot locally.\n */\n saveScreenshot: boolean;\n\n /**\n * Track or not screenshot to Wopee platform.\n */\n validateScreenshot: boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"afterScreenshot.js","sourceRoot":"","sources":["../../../lib/domain/service/afterScreenshot.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,YAA0B,EAC1B,OAA+B;IAE/B,MAAM,YAAY,GAAiB,OAAO,CAAC,2BAA2B,CAAC;IAEvE,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"afterScreenshot.js","sourceRoot":"","sources":["../../../lib/domain/service/afterScreenshot.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,YAA0B,EAC1B,OAA+B;IAE/B,MAAM,YAAY,GAAiB,OAAO,CAAC,2BAA2B,CAAC;IAEvE,MAAM,iBAAiB,GAAoB,MAAM,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAElF,MAAM,gBAAgB,GAAqB;QACzC,0BAA0B,EAAE,iBAAiB;KAC9C,CAAC;IACF,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import { TrackOptions } from '../../core/domain/valueObjects/track.interface.js';\nimport { AfterScreenshotOptions } from '../model/afterScreenshotOptions.interface.js';\nimport { ScreenshotOutput } from '../model/screenshotOutput.interface.js';\nimport { WopeeService } from './wopeeService.js';\nimport { IntegrationStep } from '@autonomous-testing/sdk';\n\n/**\n * Executes post-screenshot actions to restore the original state.\n * @param methods - Object containing various methods.\n * @param options - Options for post-screenshot actions.\n * @returns Information about the saved screenshot.\n */\nexport async function afterScreenshot(\n wopeeService: WopeeService,\n options: AfterScreenshotOptions,\n): Promise<ScreenshotOutput> {\n const trackOptions: TrackOptions = options.screenshotValidationOptions;\n\n const apolloTrackResult: IntegrationStep = await wopeeService.track(trackOptions);\n\n const screenshotOutput: ScreenshotOutput = {\n screenshotValidationResult: apolloTrackResult,\n };\n return screenshotOutput;\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TrackOptions } from '../../core/domain/valueObjects/track.interface.js';
|
|
2
|
-
import { ClientSideOperationPort } from '../../
|
|
2
|
+
import { ClientSideOperationPort } from '../../core/ports/clientSideOperationPort.js';
|
|
3
3
|
import { WopeeServiceOptions } from '../model/config.interface.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ApolloAdapter, IntegrationStep } from '@autonomous-testing/sdk';
|
|
5
5
|
export declare class WopeeService {
|
|
6
6
|
private _config;
|
|
7
|
-
screenshotValidation:
|
|
7
|
+
screenshotValidation: ApolloAdapter;
|
|
8
8
|
clientSideScript: ClientSideOperationPort;
|
|
9
9
|
constructor(options: WopeeServiceOptions);
|
|
10
10
|
get config(): WopeeServiceOptions;
|
|
@@ -30,8 +30,8 @@ export declare class WopeeService {
|
|
|
30
30
|
* @param name The name identifier for the image.
|
|
31
31
|
* @param imageBase64 The image content in Base64 format.
|
|
32
32
|
* @param trackImageOptions Optional additional parameters for image tracking.
|
|
33
|
-
* @returns {
|
|
33
|
+
* @returns {IntegrationStep} The result of the tracking operation.
|
|
34
34
|
*/
|
|
35
|
-
track(trackOptions: TrackOptions): Promise<
|
|
35
|
+
track(trackOptions: TrackOptions): Promise<IntegrationStep>;
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=wopeeService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wopeeService.d.ts","sourceRoot":"","sources":["../../../lib/domain/service/wopeeService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wopeeService.d.ts","sourceRoot":"","sources":["../../../lib/domain/service/wopeeService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,aAAa,EAKb,eAAe,EAEhB,MAAM,yBAAyB,CAAC;AAEjC,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAA6B;IAC5C,oBAAoB,EAAE,aAAa,CAAC;IACpC,gBAAgB,EAAE,uBAAuB,CAAC;gBAE9B,OAAO,EAAE,mBAAmB;IAUxC,IAAI,MAAM,IAAI,mBAAmB,CAEhC;IAED;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IAwBjC;;OAEG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMlD;;OAEG;IACG,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxD;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAMnC;;;;;;OAMG;IACG,KAAK,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC;CASlE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DesktopBrowserClientOperationAdapter } from '../../adapter/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.js';
|
|
2
1
|
import { WdioConfigAdapter } from '../../adapter/wdioConfigAdapter/wdioConfigAdapter.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { DesktopBrowserClientOperationAdapter } from '../../infrastructure/adapters/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.js';
|
|
3
|
+
import { WdioLoggerAdapter } from '../../infrastructure/adapters/wdioLoggerAdapter/wdioLoggerAdapter.js';
|
|
4
|
+
import { CreateIntegrationStepPayloadSchema, createApolloTrackAdapter, } from '@autonomous-testing/sdk';
|
|
5
5
|
export class WopeeService {
|
|
6
6
|
_config = null;
|
|
7
7
|
screenshotValidation;
|
|
@@ -21,13 +21,12 @@ export class WopeeService {
|
|
|
21
21
|
* @returns {ApolloTrackAdapter} The initialized tracking adapter.
|
|
22
22
|
*/
|
|
23
23
|
_createApolloTrackAdapter() {
|
|
24
|
-
const
|
|
24
|
+
const apolloAdapterConfig = {
|
|
25
25
|
apiKey: this._config.screenshotValidation.apiKey,
|
|
26
26
|
apiUrl: this._config.screenshotValidation.apiUrl,
|
|
27
27
|
branchName: this._config.screenshotValidation?.branchName,
|
|
28
28
|
enableSoftAssert: this._config.screenshotValidation?.enableSoftAssert,
|
|
29
29
|
projectUuid: this._config.screenshotValidation.projectUuid,
|
|
30
|
-
ciBuildId: this._config.screenshotValidation?.ciBuildId,
|
|
31
30
|
browser: this._config.screenshotValidation?.browser,
|
|
32
31
|
comment: this._config.screenshotValidation?.comment,
|
|
33
32
|
device: this._config.screenshotValidation?.device,
|
|
@@ -36,15 +35,19 @@ export class WopeeService {
|
|
|
36
35
|
viewport: this._config.screenshotValidation?.viewport,
|
|
37
36
|
customTags: this._config.screenshotValidation?.customTags,
|
|
38
37
|
};
|
|
39
|
-
const logger = new
|
|
40
|
-
|
|
38
|
+
const logger = new WdioLoggerAdapter();
|
|
39
|
+
const apolloAdapterOptions = {
|
|
40
|
+
apolloAdapterConfig: apolloAdapterConfig,
|
|
41
|
+
loggerOptions: { loggerInstance: logger },
|
|
42
|
+
};
|
|
43
|
+
return createApolloTrackAdapter(apolloAdapterOptions);
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
43
46
|
* Starts the screenshot validation process, create/connect to Suite.
|
|
44
47
|
*/
|
|
45
48
|
async startSuite(suiteName) {
|
|
46
49
|
if (this._config.screenshotValidation.screenshotValidationEnabled) {
|
|
47
|
-
await this.screenshotValidation.
|
|
50
|
+
await this.screenshotValidation.createIntegrationSuite({ suiteName });
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
/**
|
|
@@ -52,7 +55,7 @@ export class WopeeService {
|
|
|
52
55
|
*/
|
|
53
56
|
async startScenario(scenarioName) {
|
|
54
57
|
if (this._config.screenshotValidation.screenshotValidationEnabled) {
|
|
55
|
-
await this.screenshotValidation.
|
|
58
|
+
await this.screenshotValidation.createIntegrationScenario({ scenarioName });
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
/**
|
|
@@ -60,7 +63,7 @@ export class WopeeService {
|
|
|
60
63
|
*/
|
|
61
64
|
async stopScenario() {
|
|
62
65
|
if (this._config.screenshotValidation.screenshotValidationEnabled) {
|
|
63
|
-
await this.screenshotValidation.
|
|
66
|
+
await this.screenshotValidation.stopIntegrationScenario();
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
/**
|
|
@@ -68,14 +71,14 @@ export class WopeeService {
|
|
|
68
71
|
* @param name The name identifier for the image.
|
|
69
72
|
* @param imageBase64 The image content in Base64 format.
|
|
70
73
|
* @param trackImageOptions Optional additional parameters for image tracking.
|
|
71
|
-
* @returns {
|
|
74
|
+
* @returns {IntegrationStep} The result of the tracking operation.
|
|
72
75
|
*/
|
|
73
76
|
async track(trackOptions) {
|
|
74
77
|
if (this._config.screenshotValidation.screenshotValidationEnabled) {
|
|
75
|
-
const
|
|
78
|
+
const payload = CreateIntegrationStepPayloadSchema.parse({
|
|
76
79
|
...trackOptions,
|
|
77
|
-
};
|
|
78
|
-
return await this.screenshotValidation.
|
|
80
|
+
});
|
|
81
|
+
return await this.screenshotValidation.createIntegrationStep(payload);
|
|
79
82
|
}
|
|
80
83
|
return null;
|
|
81
84
|
}
|