-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into production
Signed-off-by: Juliano Lazzarotto <30806844+stackchain@users.noreply.github.com>
- Loading branch information
Showing
68 changed files
with
8,126 additions
and
7,416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/** @type {Detox.DetoxConfig} */ | ||
module.exports = { | ||
testRunner: { | ||
args: { | ||
'$0': 'jest', | ||
config: 'e2e/jest.config.js' | ||
}, | ||
jest: { | ||
setupTimeout: 120000 | ||
} | ||
}, | ||
apps: { | ||
'ios.debug': { | ||
type: 'ios.app', | ||
binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/yoroi.app', | ||
build: 'xcodebuild -workspace ios/yoroi.xcworkspace -scheme yoroi -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build' | ||
}, | ||
'ios.release': { | ||
type: 'ios.app', | ||
binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/yoroi.app', | ||
build: 'xcodebuild -workspace ios/yoroi.xcworkspace -scheme yoroi -configuration Release -sdk iphonesimulator -derivedDataPath ios/build' | ||
}, | ||
'android.dev.debug': { | ||
type: 'android.apk', | ||
binaryPath: 'android/app/build/outputs/apk/dev/debug/app-dev-debug.apk', | ||
build: 'ENVFILE=.env cd android && ./gradlew assembleDevDebug assembleDevDebugAndroidTest -DtestBuildType=debug', | ||
reversePorts: [ | ||
8081 | ||
] | ||
}, | ||
'android.nightly.release': { | ||
type: 'android.apk', | ||
binaryPath: 'android/app/build/outputs/apk/nightly/release/app-nightly-release.apk', | ||
build: 'ENVFILE=.env.nightly cd android && ./gradlew assembleNightlyRelease assembleNightlyReleaseAndroidTest -DtestBuildType=release', | ||
reversePorts: [ | ||
8081 | ||
] | ||
} | ||
}, | ||
devices: { | ||
simulator: { | ||
type: 'ios.simulator', | ||
device: { | ||
type: 'iPhone 14' | ||
} | ||
}, | ||
attached: { | ||
type: 'android.attached', | ||
device: { | ||
adbName: '.*' | ||
} | ||
}, | ||
emulator: { | ||
type: 'android.emulator', | ||
device: { | ||
avdName: 'Pixel_3_e2e' | ||
} | ||
} | ||
}, | ||
configurations: { | ||
'ios.sim.debug': { | ||
device: 'simulator', | ||
app: 'ios.debug' | ||
}, | ||
'ios.sim.release': { | ||
device: 'simulator', | ||
app: 'ios.release' | ||
}, | ||
'android.att.debug': { | ||
device: 'attached', | ||
app: 'android.debug' | ||
}, | ||
'android.att.release': { | ||
device: 'attached', | ||
app: 'android.release' | ||
}, | ||
'android.emu.dev.debug': { | ||
device: 'emulator', | ||
app: 'android.dev.debug' | ||
}, | ||
'android.emu.release': { | ||
device: 'emulator', | ||
app: 'android.release' | ||
}, | ||
'android.emu.nightly.release': { | ||
device: 'emulator', | ||
app: 'android.nightly.release' | ||
}, | ||
'android.att.nightly.release': { | ||
device: 'attached', | ||
app: 'android.nightly.release' | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
apps/wallet-mobile/android/app/src/androidTest/java/com/emurgo/DetoxTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.emurgo; // (1) | ||
|
||
import com.wix.detox.Detox; | ||
import com.wix.detox.config.DetoxConfig; | ||
|
||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
import androidx.test.filters.LargeTest; | ||
import androidx.test.rule.ActivityTestRule; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
@LargeTest | ||
public class DetoxTest { | ||
@Rule // (2) | ||
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false); | ||
|
||
@Test | ||
public void runDetoxTests() { | ||
DetoxConfig detoxConfig = new DetoxConfig(); | ||
detoxConfig.idlePolicyConfig.masterTimeoutSec = 90; | ||
detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60; | ||
detoxConfig.rnContextLoadTimeoutSec = (BuildConfig.DEBUG ? 180 : 60); | ||
|
||
Detox.runTests(mActivityRule, detoxConfig); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
apps/wallet-mobile/android/app/src/main/res/xml/network_security_config.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<network-security-config> | ||
<domain-config cleartextTrafficPermitted="true"> | ||
<domain includeSubdomains="true">10.0.2.2</domain> | ||
<domain includeSubdomains="true">localhost</domain> | ||
</domain-config> | ||
</network-security-config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
export enum WalletType { | ||
NormalWallet, | ||
DaedalusWallet, | ||
} | ||
|
||
/** | ||
* @property {String} checksum wallet checksum | ||
* @property {String} name wallet name | ||
* @property {Array<String>} phrase wallet recovery phrase | ||
* @property {WalletType} type a 15-word wallet or a 24-word wallet | ||
*/ | ||
type RestoredWallet = { | ||
checksum: string | ||
name: string | ||
phrase: string[] | ||
type: WalletType | ||
} | ||
|
||
export const VALID_PIN = '123456' | ||
export const WALLET_NAME = 'New Test Wallet' | ||
export const LEDGER_WALLET_NAME = 'Test Ledger' | ||
export const SPENDING_PASSWORD = '1234567890' | ||
export const ADA_TOKEN = 'ADA' | ||
export const TADA_TOKEN = 'TADA' | ||
export const STAKE_POOL_ID = 'fe662c24cf56fb98626161f76d231ac50ab7b47dd83986a30c1d4796' | ||
export const APP_ID = 'com.emurgo.nightly' | ||
export const APP_ID_PARENT = 'com.emurgo.*' | ||
export const NORMAL_15_WORD_WALLET: RestoredWallet = { | ||
checksum: 'CONL-2085', | ||
name: 'RTW-15-word', | ||
phrase: [ | ||
'ritual', | ||
'nerve', | ||
'sweet', | ||
'social', | ||
'level', | ||
'pioneer', | ||
'cream', | ||
'artwork', | ||
'material', | ||
'three', | ||
'thumb', | ||
'melody', | ||
'zoo', | ||
'fence', | ||
'east', | ||
], | ||
type: WalletType.NormalWallet, | ||
} | ||
export const NORMAL_24_WORD_WALLET: RestoredWallet = { | ||
name: 'RTW-24-word', | ||
checksum: 'CCPL-3231', | ||
phrase: [ | ||
'like', | ||
'project', | ||
'body', | ||
'tribe', | ||
'track', | ||
'wheat', | ||
'noble', | ||
'blur', | ||
'reflect', | ||
'tomorrow', | ||
'beach', | ||
'document', | ||
'market', | ||
'enforce', | ||
'clever', | ||
'submit', | ||
'gorilla', | ||
'hockey', | ||
'can', | ||
'surge', | ||
'fossil', | ||
'asthma', | ||
'salmon', | ||
'cry', | ||
], | ||
type: WalletType.DaedalusWallet, | ||
} | ||
export const RESTORED_WALLETS: RestoredWallet[] = [ | ||
NORMAL_15_WORD_WALLET, | ||
NORMAL_24_WORD_WALLET, | ||
] |
Oops, something went wrong.