Merge pull request #4323 from BlueWallet/limpbrains-detox-up

REF: upgrade detox and fix e2e tests
This commit is contained in:
GLaDOS 2021-12-26 19:03:34 +00:00 committed by GitHub
commit bad53c7061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 35 deletions

73
package-lock.json generated
View File

@ -8252,6 +8252,23 @@
"integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==",
"dev": true
},
"clang-format": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/clang-format/-/clang-format-1.6.0.tgz",
"integrity": "sha512-W3/L7fWkA8DoLkz9UGjrRnNi+J5a5TuS2HDLqk6WsicpOzb66MBu4eY/EcXhicHriVnAXWQVyk5/VeHWY6w4ow==",
"requires": {
"async": "^1.5.2",
"glob": "^7.0.0",
"resolve": "^1.1.6"
},
"dependencies": {
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
}
}
},
"class-utils": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
@ -9037,9 +9054,9 @@
"dev": true
},
"detox": {
"version": "19.1.0",
"resolved": "https://registry.npmjs.org/detox/-/detox-19.1.0.tgz",
"integrity": "sha512-DdGj9HgEwFDtERt4TG6pHUxOvBcbE8JsTDqALFH/IlZ6SAxibJeIQ9yo65g2hQGJGHdAMJpUX5/30QD+PQfBaQ==",
"version": "19.3.1",
"resolved": "https://registry.npmjs.org/detox/-/detox-19.3.1.tgz",
"integrity": "sha512-Geg3l/Uetk4xrfRWUiGMrtiT+tKmmrsLwdXeagdTV01j6NnqmAUm3xDLLW3jEO7TKe7/ZOO846gZbMjAAZWiEw==",
"requires": {
"ajv": "^8.6.3",
"bunyan": "^1.8.12",
@ -9274,14 +9291,13 @@
}
},
"ecpair": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ecpair/-/ecpair-1.0.1.tgz",
"integrity": "sha512-5qPa0GVZJI1FAMS+4GZBWXS/bzY7/p2ehuGuHPqvsRWe2yXDc4Bgvf89BMJz87pqcW7+ogGQkLZfwflMr/RPgQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/ecpair/-/ecpair-2.0.1.tgz",
"integrity": "sha512-iT3wztQMeE/nDTlfnAg8dAFUfBS7Tq2BXzq3ae6L+pWgFU0fQ3l0woTzdTBrJV3OxBjxbzjq8EQhAbEmJNWFSw==",
"requires": {
"randombytes": "^2.0.1",
"tiny-secp256k1": "^1.1.6",
"typeforce": "^1.11.3",
"wif": "^2.0.1"
"randombytes": "^2.1.0",
"typeforce": "^1.18.0",
"wif": "^2.0.6"
}
},
"ecurve": {
@ -18006,9 +18022,9 @@
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"minipass": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz",
"integrity": "sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==",
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz",
"integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==",
"requires": {
"yallist": "^4.0.0"
},
@ -19131,13 +19147,13 @@
}
},
"prop-types": {
"version": "15.7.2",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
"version": "15.8.0",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.0.tgz",
"integrity": "sha512-fDGekdaHh65eI3lMi5OnErU6a8Ighg2KjcjQxO7m8VHyWjcPyj5kiOgV1LQDOOOgVy3+5FgjXvdSSX7B8/5/4g==",
"requires": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
"react-is": "^16.8.1"
"react-is": "^16.13.1"
}
},
"proper-lockfile": {
@ -20552,26 +20568,27 @@
}
},
"realm": {
"version": "10.10.1",
"resolved": "https://registry.npmjs.org/realm/-/realm-10.10.1.tgz",
"integrity": "sha512-QODV1YybfRtfp0Df2JeW0yrxw2ZMMTb5MAU8SbEh8aKboGDYkSplp6C2qizTADwHgrj72RVzt7eG87DUe97/GA==",
"version": "10.11.0",
"resolved": "https://registry.npmjs.org/realm/-/realm-10.11.0.tgz",
"integrity": "sha512-XF8sYwLRCaekXbQPoCwsaLJaAAefMylylgzVn5ONGWG/1Ev3yvXlvOc69q6WO4nkUQe9sCg6SFzzN5jTOXT+uw==",
"requires": {
"@realm.io/common": "^0.1.1",
"bindings": "^1.5.0",
"bson": "4.4.1",
"clang-format": "^1.6.0",
"command-line-args": "^5.1.1",
"deepmerge": "2.1.0",
"deprecated-react-native-listview": "0.0.6",
"fs-extra": "^4.0.3",
"https-proxy-agent": "^2.2.4",
"ini": "^1.3.7",
"node-addon-api": "^3.1.0",
"node-addon-api": "4.2.0",
"node-fetch": "^2.6.1",
"node-machine-id": "^1.1.10",
"prebuild-install": "^6.1.1",
"progress": "^2.0.3",
"prop-types": "^15.6.2",
"realm-network-transport": "^0.7.0",
"realm-network-transport": "^0.7.1",
"request": "^2.88.0",
"stream-counter": "^1.0.0",
"sync-request": "^3.0.1",
@ -20585,16 +20602,16 @@
"integrity": "sha512-Q89Z26KAfA3lpPGhbF6XMfYAm3jIV3avViy6KOJ2JLzFbeWHOvPQUu5aSJIWXap3gDZC2y1eF5HXEPI2wGqgvw=="
},
"node-addon-api": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz",
"integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A=="
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.2.0.tgz",
"integrity": "sha512-eazsqzwG2lskuzBqCGPi7Ac2UgOoMz8JVOXVhTvvPDYhthvNpefx8jWD8Np7Gv+2Sz0FlPWZk0nJV0z598Wn8Q=="
}
}
},
"realm-network-transport": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/realm-network-transport/-/realm-network-transport-0.7.0.tgz",
"integrity": "sha512-w81+N+YrFBkWZWFlspDPrpot50xCkfr+AB+NCQjsTI6OfVF0igqhLfl3frwrSS61fQiL5XrZrFYFV6BWU0F+iA==",
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/realm-network-transport/-/realm-network-transport-0.7.1.tgz",
"integrity": "sha512-ZKGJVk6hzVeLE/cme9H4MyVnfpPlCTMheQdnMHWkLMhvNUqgyPFkgSCB+B5IsnGns2l5g2rmKeTNPoUFHi+Khw==",
"requires": {
"abort-controller": "^3.0.0",
"node-fetch": "^2.6.0"

View File

@ -125,7 +125,7 @@
"coinselect": "3.1.12",
"crypto-js": "4.1.1",
"dayjs": "1.10.7",
"detox": "19.1.0",
"detox": "19.3.1",
"ecpair": "2.0.1",
"ecurve": "1.0.6",
"electrum-client": "https://github.com/BlueWallet/rn-electrum-client#99ebcc649d91a8dc39bea7964b02dd9ead464aa4",

View File

@ -554,7 +554,7 @@ describe('BlueWallet UI Tests - no wallets', () => {
// created. verifying:
await yo('TransactionValue');
expect(element(by.id('TransactionValue'))).toHaveText('0.0005');
await expect(element(by.id('TransactionValue'))).toHaveText('0.0005');
await element(by.id('TransactionDetailsButton')).tap();
const txhex = await extractTextFromElementById('TxhexInput');

View File

@ -63,7 +63,7 @@ describe('BlueWallet UI Tests - import BIP84 wallet', () => {
// created. verifying:
await yo('TransactionValue');
expect(element(by.id('TransactionValue'))).toHaveText('0.0001');
await expect(element(by.id('TransactionValue'))).toHaveText('0.0001');
const transactionFee = await extractTextFromElementById('TransactionFee');
assert.ok(transactionFee.startsWith('Fee: 0.00000292 BTC'), 'Unexpected tx fee: ' + transactionFee);
await element(by.id('TransactionDetailsButton')).tap();
@ -373,8 +373,8 @@ describe('BlueWallet UI Tests - import BIP84 wallet', () => {
// created. verifying:
await yo('TransactionValue');
expect(element(by.id('TransactionValue'))).toHaveText('0.0001');
expect(element(by.id('TransactionAddress'))).toHaveText('BC1QH6TF004TY7Z7UN2V5NTU4MKF630545GVHS45U7');
await expect(element(by.id('TransactionValue'))).toHaveText('0.0001');
await expect(element(by.id('TransactionAddress'))).toHaveText('BC1QH6TF004TY7Z7UN2V5NTU4MKF630545GVHS45U7');
await device.pressBack();
await device.pressBack();

View File

@ -1,12 +1,12 @@
const createHash = require('create-hash');
export async function yo(id, timeout = 33000) {
export function yo(id, timeout = 33000) {
return waitFor(element(by.id(id)))
.toBeVisible()
.withTimeout(timeout);
}
export async function sup(text, timeout = 33000) {
export function sup(text, timeout = 33000) {
return waitFor(element(by.text(text)))
.toBeVisible()
.withTimeout(timeout);