detox 19.13.0 → 20.0.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/Detox-android/com/wix/detox/{19.13.0/detox-19.13.0-javadoc.jar → 20.0.0/detox-20.0.0-javadoc.jar} +0 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-javadoc.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-javadoc.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-javadoc.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-javadoc.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{19.13.0/detox-19.13.0-sources.jar → 20.0.0/detox-20.0.0-sources.jar} +0 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.aar +0 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.aar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.aar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.aar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.aar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{19.13.0/detox-19.13.0.pom → 20.0.0/detox-20.0.0.pom} +1 -1
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.pom.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.pom.sha512 +1 -0
- package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
- package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
- package/Detox-ios-src.tbz +0 -0
- package/Detox-ios.tbz +0 -0
- package/README.md +1 -1
- package/android/detox/src/full/java/com/wix/detox/Detox.java +2 -59
- package/android/detox/src/full/java/com/wix/detox/NotificationDataParser.kt +3 -3
- package/index.d.ts +354 -191
- package/index.js +1 -0
- package/internals.d.ts +298 -0
- package/internals.js +4 -0
- package/local-cli/build-framework-cache.js +2 -2
- package/local-cli/build.js +7 -8
- package/local-cli/build.test.js +46 -40
- package/local-cli/clean-framework-cache.js +3 -3
- package/local-cli/cli.js +8 -7
- package/local-cli/init.js +73 -68
- package/local-cli/rebuild-framework-cache.js +1 -1
- package/local-cli/reset-lock-file.js +16 -0
- package/local-cli/templates/jest.js +14 -36
- package/local-cli/test.js +24 -282
- package/local-cli/test.test.js +394 -648
- package/local-cli/testCommand/TestRunnerCommand.js +163 -0
- package/local-cli/{utils/testCommandArgs.js → testCommand/builder.js} +10 -36
- package/local-cli/testCommand/middlewares.js +66 -0
- package/local-cli/{utils → testCommand}/warnings.js +0 -13
- package/local-cli/utils/jestInternals.js +13 -2
- package/local-cli/utils/yargsUtils.js +67 -0
- package/package.json +32 -19
- package/runners/deprecation.js +45 -0
- package/runners/jest/JestCircusEnvironment.js +3 -38
- package/runners/jest/adapter.d.ts +4 -10
- package/runners/jest/adapter.js +3 -6
- package/runners/jest/assignReporter.d.ts +4 -1
- package/runners/jest/assignReporter.js +3 -6
- package/runners/jest/globalSetup.js +1 -0
- package/runners/jest/globalTeardown.js +1 -0
- package/runners/jest/index.d.ts +60 -0
- package/runners/jest/index.js +16 -0
- package/runners/jest/index.test.js +13 -0
- package/runners/jest/reporter.js +1 -0
- package/runners/jest/reporters/DetoxReporter.js +36 -0
- package/runners/jest/specReporter.d.ts +4 -9
- package/runners/jest/specReporter.js +3 -10
- package/runners/jest/streamlineReporter.js +3 -22
- package/runners/jest/testEnvironment/index.js +205 -0
- package/runners/jest/testEnvironment/listeners/DetoxCoreListener.js +166 -0
- package/runners/{jest-circus → jest/testEnvironment}/listeners/DetoxInitErrorListener.js +1 -1
- package/runners/jest/testEnvironment/listeners/DetoxPlatformFilterListener.js +27 -0
- package/runners/jest/{SpecReporterImpl.js → testEnvironment/listeners/SpecReporter.js} +61 -9
- package/runners/jest/testEnvironment/listeners/WorkerAssignReporter.js +30 -0
- package/runners/jest/testEnvironment/listeners/index.js +13 -0
- package/runners/{jest-circus → jest/testEnvironment}/utils/assertExistingContext.js +2 -2
- package/runners/jest/testEnvironment/utils/assertJestCircus27.js +70 -0
- package/runners/jest/testEnvironment/utils/assertJestCircus27.test.js +22 -0
- package/runners/jest/{utils → testEnvironment/utils}/getFullTestName.js +0 -0
- package/runners/jest/{utils → testEnvironment/utils}/hasTimedOut.js +0 -0
- package/runners/jest/{utils → testEnvironment/utils}/index.js +0 -0
- package/runners/jest/{utils → testEnvironment/utils}/stdout.js +0 -0
- package/runners/jest-circus/environment/index.js +6 -0
- package/runners/jest-circus/index.js +1 -10
- package/runners/jest-circus/reporter.js +1 -0
- package/runners/migration.js +37 -0
- package/runners/mocha/DetoxMochaAdapter.js +3 -35
- package/runners/mocha/adapter.d.ts +4 -7
- package/runners/mocha/adapter.js +3 -5
- package/src/DetoxWorker.js +327 -0
- package/src/android/interactions/native.js +2 -1
- package/src/artifacts/ArtifactsManager.js +51 -35
- package/src/artifacts/instruments/ios/SimulatorInstrumentsRecording.js +3 -3
- package/src/artifacts/log/ios/SimulatorLogRecording.js +1 -1
- package/src/artifacts/providers/index.js +0 -4
- package/src/artifacts/screenshot/SimulatorScreenshotPlugin.js +1 -1
- package/src/artifacts/templates/artifact/Artifact.js +1 -1
- package/src/artifacts/templates/plugin/ArtifactPlugin.js +1 -1
- package/src/artifacts/utils/buildDefaultArtifactsRootDirpath.js +2 -4
- package/src/artifacts/utils/temporaryPath.js +18 -5
- package/src/artifacts/video/SimulatorRecordVideoPlugin.js +1 -1
- package/src/client/AsyncWebSocket.js +8 -17
- package/src/client/Client.js +1 -1
- package/src/client/actions/actions.js +2 -2
- package/src/configuration/collectCliConfig.js +3 -16
- package/src/configuration/composeAppsConfig.js +12 -66
- package/src/configuration/composeArtifactsConfig.js +6 -32
- package/src/configuration/composeBehaviorConfig.js +3 -13
- package/src/configuration/composeDeviceConfig.js +38 -63
- package/src/configuration/composeLoggerConfig.js +59 -0
- package/src/configuration/composeRunnerConfig.js +127 -14
- package/src/configuration/composeSessionConfig.js +1 -3
- package/src/configuration/index.js +36 -30
- package/src/configuration/loadExternalConfig.js +1 -1
- package/src/configuration/utils/deviceAppTypes.js +0 -1
- package/src/devices/allocation/DeviceAllocator.js +4 -2
- package/src/devices/allocation/drivers/android/emulator/AVDValidator.js +1 -1
- package/src/devices/allocation/drivers/android/emulator/EmulatorAllocDriver.js +5 -3
- package/src/devices/allocation/drivers/android/emulator/EmulatorAllocationHelper.js +1 -1
- package/src/devices/allocation/drivers/android/emulator/EmulatorLauncher.js +3 -5
- package/src/devices/allocation/drivers/android/emulator/EmulatorVersionResolver.js +4 -6
- package/src/devices/allocation/drivers/android/emulator/launchEmulatorProcess.js +1 -1
- package/src/devices/allocation/drivers/android/genycloud/GenyInstanceAllocationHelper.js +1 -1
- package/src/devices/allocation/drivers/ios/SimulatorAllocDriver.js +1 -1
- package/src/devices/allocation/drivers/ios/SimulatorLauncher.js +3 -3
- package/src/devices/allocation/factories/index.js +0 -1
- package/src/devices/common/drivers/DeviceLauncher.js +2 -2
- package/src/devices/common/drivers/android/emulator/exec/EmulatorExec.js +1 -1
- package/src/devices/common/drivers/android/genycloud/services/GenyInstanceNaming.js +4 -9
- package/src/devices/common/drivers/android/genycloud/services/GenyRecipesService.js +1 -1
- package/src/devices/common/drivers/android/tools/EmulatorTelnet.js +1 -1
- package/src/devices/common/drivers/android/tools/FreeDeviceFinder.js +1 -1
- package/src/devices/common/drivers/ios/tools/AppleSimUtils.js +35 -10
- package/src/devices/lifecycle/GenyGlobalLifecycleHandler.js +13 -15
- package/src/devices/runtime/RuntimeDevice.js +85 -86
- package/src/devices/runtime/drivers/DeviceDriverBase.js +1 -1
- package/src/devices/runtime/drivers/android/AndroidDriver.js +3 -3
- package/src/devices/runtime/drivers/index.js +0 -1
- package/src/devices/runtime/drivers/ios/SimulatorDriver.js +4 -3
- package/src/devices/runtime/factories/ios.js +1 -8
- package/src/devices/runtime/utils/LaunchArgsEditor.js +4 -59
- package/src/devices/runtime/utils/Storage.js +4 -0
- package/src/environmentFactory.js +0 -8
- package/src/errors/DetoxConfigErrorComposer.js +92 -30
- package/src/errors/DetoxError.js +4 -0
- package/src/errors/DetoxRuntimeError.js +5 -5
- package/src/errors/index.js +2 -0
- package/src/ios/expectTwo.js +2 -1
- package/src/ipc/IPCClient.js +117 -0
- package/src/ipc/IPCServer.js +98 -0
- package/src/ipc/SessionState.js +62 -0
- package/src/logger/DetoxLogger.js +348 -0
- package/src/logger/index.js +5 -0
- package/src/logger/utils/BunyanLogger.js +76 -0
- package/src/logger/utils/CategoryThreadDispatcher.js +36 -0
- package/src/logger/utils/DetoxLogFinalizer.js +140 -0
- package/src/logger/utils/MessageStack.js +24 -0
- package/src/logger/utils/ThreadDispatcher.js +61 -0
- package/src/{utils → logger/utils}/customConsoleLogger.js +5 -4
- package/src/logger/utils/sanitizeBunyanContext.js +30 -0
- package/src/logger/utils/streamUtils.js +248 -0
- package/src/logger/utils/tracerLegacy.js +37 -0
- package/src/realms/DetoxConstants.js +13 -0
- package/src/realms/DetoxContext.js +183 -0
- package/src/realms/DetoxInternalsFacade.js +31 -0
- package/src/realms/DetoxPrimaryContext.js +261 -0
- package/src/realms/DetoxSecondaryContext.js +91 -0
- package/src/realms/index.js +10 -0
- package/src/realms/primary.js +3 -0
- package/src/realms/secondary.js +3 -0
- package/src/server/DetoxConnection.js +18 -23
- package/src/server/DetoxServer.js +7 -10
- package/src/server/DetoxSession.js +6 -6
- package/src/server/DetoxSessionManager.js +1 -1
- package/src/server/handlers/RegisteredConnectionHandler.js +1 -2
- package/src/symbols.js +50 -0
- package/src/utils/Timer.js +58 -33
- package/src/utils/argparse.js +11 -0
- package/src/utils/childProcess/exec.js +1 -1
- package/src/utils/childProcess/spawn.js +1 -1
- package/{local-cli/utils/misc.js → src/utils/envUtils.js} +0 -9
- package/src/utils/errorUtils.js +20 -0
- package/src/utils/logger.js +2 -162
- package/src/utils/shellUtils.js +18 -0
- package/src/utils/traceInvocationCall.js +21 -0
- package/src/utils/traceMethods.js +15 -0
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-javadoc.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-javadoc.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-javadoc.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-javadoc.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.aar +0 -0
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.aar.md5 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.aar.sha1 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.aar.sha256 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.aar.sha512 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.pom.sha512 +0 -1
- package/local-cli/templates/mocha.js +0 -32
- package/local-cli/utils/splitArgv.js +0 -107
- package/runners/integration.js +0 -16
- package/runners/jest/DetoxAdapterCircus.js +0 -60
- package/runners/jest/DetoxAdapterImpl.js +0 -81
- package/runners/jest/DetoxAdapterJasmine.js +0 -67
- package/runners/jest/DetoxStreamlineJestReporter.js +0 -98
- package/runners/jest/FailingTestsReporter.js +0 -16
- package/runners/jest/SpecReporterCircus.js +0 -51
- package/runners/jest/SpecReporterJasmine.js +0 -39
- package/runners/jest/WorkerAssignReporterCircus.js +0 -17
- package/runners/jest/WorkerAssignReporterImpl.js +0 -21
- package/runners/jest/WorkerAssignReporterJasmine.js +0 -15
- package/runners/jest/runnerInfo.js +0 -9
- package/runners/jest-circus/environment.js +0 -206
- package/runners/jest-circus/listeners/DetoxCoreListener.js +0 -113
- package/runners/jest-circus/utils/assertJestCircus26.js +0 -39
- package/runners/jest-circus/utils/wrapErrorWithNoopLifecycle.js +0 -14
- package/src/Detox.js +0 -317
- package/src/DetoxConstants.js +0 -13
- package/src/DetoxExportWrapper.js +0 -140
- package/src/artifacts/timeline/TimelineArtifactPlugin.js +0 -92
- package/src/configuration/utils/warnings.js +0 -12
- package/src/devices/allocation/drivers/NoneAllocDriver.js +0 -10
- package/src/devices/allocation/factories/none.js +0 -11
- package/src/index.js +0 -6
- package/src/utils/ChromeTracingExporter.js +0 -54
- package/src/utils/MissingDetox.js +0 -78
- package/src/utils/fakeTimestampsProvider.js +0 -9
- package/src/utils/getWorkerId.js +0 -5
- package/src/utils/lastFailedTests.js +0 -38
- package/src/utils/sh.js +0 -18
- package/src/utils/trace.js +0 -96
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1ea8e085ad2927f2802e2a80a1f74212
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d9951fa46e203d7c6ba85d696efe583409a20ddd
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7160a7f118631e4211a0967f3481e65b4d4792eeb9fd4826e39e3c6986888ab4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
319382faac98faa9ca85eb2d766c509f34581ef2667d3218b1eda7db8409c1fd06322157cb088ff469b7310386b0c364201d453741ec7c28f48bc47caaac4209
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8fdc200eb9b33208998c90508c592aa9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
eda4c6da4c996a51bf89213ab37f77cdb16ebf15
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
df271aeed9256e2438c9662b580cffc7adcc0a5c89ec05dfbc2936eec2ffb709
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9917c4b2f553c07f8be531335aed637a8461bd37e0aba7d294b9664c2444e9597f6e8ed1cda7e4f8908e2b70bd543253222a73726ad9fafac22c13ea264300da
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3bdd1b42fa0f182255a47fcdda8f544c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
457ae10d202b196ea92bade4a33ce2dbc2f8bb3f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
52342d1b0d1fae681b2ea1e6f9ac6f6278299ed70d7867fd60b95d63eb7a9ec3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5dfa73d84d647fd870a2e915d9943c9502c967abfd89a834ef7dee50a2a77d5a8b0be7b13407a34a6b97cbc10e9ed6f5e608fe7366d5a3041e462e3322d5b10d
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<modelVersion>4.0.0</modelVersion>
|
|
4
4
|
<groupId>com.wix</groupId>
|
|
5
5
|
<artifactId>detox</artifactId>
|
|
6
|
-
<version>
|
|
6
|
+
<version>20.0.0</version>
|
|
7
7
|
<packaging>aar</packaging>
|
|
8
8
|
<name>Detox</name>
|
|
9
9
|
<description>Gray box end-to-end testing and automation library for mobile apps</description>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8c1ad3cbaa689c86d077d621e63c9c15
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
513d5656e068ef46cedb53c60e4a2a06c308e69f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
01bdb63d3a4c85a313b66a5f44896cffc4ea6e6bb7a9e1664c3c07fa53902c3b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1dbdc2557991bc8ced1e6ca50225a29da3459bd115b39eadc1be598ca28db57f0914d775921d47336e0af5d219c1c5db67069afd5a16ec51c8dbe0e10d690963
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>com.wix</groupId>
|
|
4
4
|
<artifactId>detox</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>
|
|
7
|
-
<release>
|
|
6
|
+
<latest>20.0.0</latest>
|
|
7
|
+
<release>20.0.0</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>
|
|
9
|
+
<version>20.0.0</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20221110185852</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
92d4bb195d57ff4f2ac27d501f95a1ce
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
e648e1e844e18e28412fa2e429c61712193b036c
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
402d4d9057a480e0cbbd2c1cce049071d9d5f282c164dd051ab7afed6b8f1fc0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
df71178b84026b8e1970ddee3d1347a840c567a626ce4a1b81f37ea7667fa6b5b474b9ac32f16c25de4009abbe7a5b89341a49a3a9f44f5dbee78913e37f4fb4
|
package/Detox-ios-src.tbz
CHANGED
|
Binary file
|
package/Detox-ios.tbz
CHANGED
|
Binary file
|
package/README.md
CHANGED
|
@@ -9,10 +9,7 @@ import android.os.Bundle;
|
|
|
9
9
|
import com.wix.detox.config.DetoxConfig;
|
|
10
10
|
import com.wix.detox.espresso.UiControllerSpy;
|
|
11
11
|
|
|
12
|
-
import java.util.concurrent.TimeUnit;
|
|
13
|
-
|
|
14
12
|
import androidx.annotation.NonNull;
|
|
15
|
-
import androidx.test.espresso.IdlingPolicies;
|
|
16
13
|
import androidx.test.platform.app.InstrumentationRegistry;
|
|
17
14
|
import androidx.test.rule.ActivityTestRule;
|
|
18
15
|
|
|
@@ -77,28 +74,6 @@ public final class Detox {
|
|
|
77
74
|
private static final LaunchIntentsFactory sIntentsFactory = new LaunchIntentsFactory();
|
|
78
75
|
private static ActivityTestRule sActivityTestRule;
|
|
79
76
|
|
|
80
|
-
/**
|
|
81
|
-
* Specification of values to use for Espresso's {@link IdlingPolicies} timeouts.
|
|
82
|
-
* <br/>Overrides Espresso's defaults as they tend to be too short (e.g. when running a heavy-load app
|
|
83
|
-
* on suboptimal CI machines).
|
|
84
|
-
*
|
|
85
|
-
* @deprecated Use {@link com.wix.detox.config.DetoxConfig}.
|
|
86
|
-
*/
|
|
87
|
-
@Deprecated
|
|
88
|
-
public static class DetoxIdlePolicyConfig {
|
|
89
|
-
/** Directly binds to {@link IdlingPolicies#setMasterPolicyTimeout(long, TimeUnit)}. Applied in seconds. */
|
|
90
|
-
public Integer masterTimeoutSec = 120;
|
|
91
|
-
/** Directly binds to {@link IdlingPolicies#setIdlingResourceTimeout(long, TimeUnit)}. Applied in seconds. */
|
|
92
|
-
public Integer idleResourceTimeoutSec = 60;
|
|
93
|
-
|
|
94
|
-
private com.wix.detox.config.DetoxIdlePolicyConfig toNewConfig() {
|
|
95
|
-
com.wix.detox.config.DetoxIdlePolicyConfig newConfig = new com.wix.detox.config.DetoxIdlePolicyConfig();
|
|
96
|
-
newConfig.masterTimeoutSec = masterTimeoutSec;
|
|
97
|
-
newConfig.idleResourceTimeoutSec = idleResourceTimeoutSec;
|
|
98
|
-
return newConfig;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
77
|
private Detox() {
|
|
103
78
|
}
|
|
104
79
|
|
|
@@ -128,20 +103,6 @@ public final class Detox {
|
|
|
128
103
|
runTests(activityTestRule, getAppContext(), detoxConfig);
|
|
129
104
|
}
|
|
130
105
|
|
|
131
|
-
/**
|
|
132
|
-
* Same as the default {@link #runTests(ActivityTestRule)} method, but allows for the explicit specification of
|
|
133
|
-
* a custom idle-policy configuration. Note: review {@link DetoxIdlePolicyConfig} for defaults.
|
|
134
|
-
*
|
|
135
|
-
* @param idlePolicyConfig The custom idle-policy configuration to pass in; Will be applied into Espresso via
|
|
136
|
-
* the {@link IdlingPolicies} API.
|
|
137
|
-
*
|
|
138
|
-
* @deprecated Use {@link #runTests(ActivityTestRule, DetoxConfig)}
|
|
139
|
-
*/
|
|
140
|
-
@Deprecated
|
|
141
|
-
public static void runTests(ActivityTestRule activityTestRule, DetoxIdlePolicyConfig idlePolicyConfig) {
|
|
142
|
-
runTests(activityTestRule, getAppContext(), idlePolicyConfig);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
106
|
/**
|
|
146
107
|
* <p>
|
|
147
108
|
* Use this method only if you have a React Native application and it
|
|
@@ -161,24 +122,6 @@ public final class Detox {
|
|
|
161
122
|
runTests(activityTestRule, context, new DetoxConfig());
|
|
162
123
|
}
|
|
163
124
|
|
|
164
|
-
/**
|
|
165
|
-
* Same as {@link #runTests(ActivityTestRule, Context)}, but allows for the explicit specification of
|
|
166
|
-
* a custom idle-policy configuration. Note: review {@link DetoxIdlePolicyConfig} for defaults.
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* @param idlePolicyConfig The custom idle-policy configuration to pass in; Will be applied into Espresso via
|
|
170
|
-
* the {@link IdlingPolicies} API.
|
|
171
|
-
*
|
|
172
|
-
* @deprecated Use {@link #runTests(ActivityTestRule, Context, DetoxConfig)}
|
|
173
|
-
*/
|
|
174
|
-
@Deprecated
|
|
175
|
-
public static void runTests(ActivityTestRule activityTestRule, @NonNull final Context context, DetoxIdlePolicyConfig idlePolicyConfig) {
|
|
176
|
-
DetoxConfig config = new DetoxConfig();
|
|
177
|
-
config.idlePolicyConfig = idlePolicyConfig.toNewConfig();
|
|
178
|
-
|
|
179
|
-
runTests(activityTestRule, context, config);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
125
|
/**
|
|
183
126
|
* Same as {@link #runTests(ActivityTestRule, Context)}, but allows for the explicit specification of
|
|
184
127
|
* various configurations. Note: review {@link DetoxConfig} for defaults.
|
|
@@ -214,7 +157,7 @@ public final class Detox {
|
|
|
214
157
|
}
|
|
215
158
|
|
|
216
159
|
public static void startActivityFromNotification(String dataFilePath) {
|
|
217
|
-
Bundle notificationData = new NotificationDataParser(dataFilePath).
|
|
160
|
+
Bundle notificationData = new NotificationDataParser(dataFilePath).toBundle();
|
|
218
161
|
Intent intent = sIntentsFactory.intentWithNotificationData(getAppContext(), notificationData, false);
|
|
219
162
|
launchActivitySync(intent);
|
|
220
163
|
}
|
|
@@ -225,7 +168,7 @@ public final class Detox {
|
|
|
225
168
|
if (sLaunchArgs.hasUrlOverride()) {
|
|
226
169
|
intent = sIntentsFactory.intentWithUrl(sLaunchArgs.getUrlOverride(), true);
|
|
227
170
|
} else if (sLaunchArgs.hasNotificationPath()) {
|
|
228
|
-
Bundle notificationData = new NotificationDataParser(sLaunchArgs.getNotificationPath()).
|
|
171
|
+
Bundle notificationData = new NotificationDataParser(sLaunchArgs.getNotificationPath()).toBundle();
|
|
229
172
|
intent = sIntentsFactory.intentWithNotificationData(getAppContext(), notificationData, true);
|
|
230
173
|
} else {
|
|
231
174
|
intent = sIntentsFactory.cleanIntent();
|
|
@@ -6,13 +6,13 @@ import com.wix.detox.common.TextFileReader
|
|
|
6
6
|
import org.json.JSONObject
|
|
7
7
|
|
|
8
8
|
internal class NotificationDataParser(private val notificationPath: String) {
|
|
9
|
-
fun
|
|
10
|
-
val rawData =
|
|
9
|
+
fun toBundle(): Bundle {
|
|
10
|
+
val rawData = readNotificationFromFile()
|
|
11
11
|
val json = JSONObject(rawData)
|
|
12
12
|
val payload = json.getJSONObject("payload")
|
|
13
13
|
return JsonConverter(payload).toBundle()
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
private fun
|
|
16
|
+
private fun readNotificationFromFile()
|
|
17
17
|
= TextFileReader(notificationPath).read()
|
|
18
18
|
}
|