Skip to content

Commit

Permalink
tests: e2e sss begin
Browse files Browse the repository at this point in the history
  • Loading branch information
vivalaakam committed Jan 7, 2025
1 parent 51ada96 commit aafa08e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
22 changes: 18 additions & 4 deletions e2e/6_sss.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {getTimeStamp} from './helpers/getTimeStamp';
import {launchApp} from './helpers/launchApp';
import {PIN} from './test-variables';

describe.skip('SSS Wallet', () => {
describe('SSS Wallet', () => {
let uid = '';
let mnemonic = '';
const isAndroid = device.getPlatform() === 'android';
Expand All @@ -21,7 +21,11 @@ describe.skip('SSS Wallet', () => {
});

it('should create SSS wallet', async () => {
await expect(element(by.id('welcome'))).toBeVisible();
await waitFor(element(by.text('Turn on push notifications'))).toBeVisible();

await element(by.text('Not now')).tap();

await waitFor(element(by.id('welcome'))).toBeVisible();
await expect(element(by.id('welcome_signup'))).toBeVisible();
await element(by.id('welcome_signup')).tap();

Expand All @@ -39,13 +43,23 @@ describe.skip('SSS Wallet', () => {
await element(by.id('custom_provider_email_input')).replaceText(uid);
await element(by.id('custom_provider_email_submit')).tap();

await waitFor(element(by.text('Important information'))).toBeVisible();

await waitFor(element(by.text('Continue')))
.toBeVisible()
.withTimeout(5000);

await element(by.text('Continue')).tap();

await expect(element(by.id('onboarding_setup_pin_set'))).toBeVisible();

for (const num of PIN.split('')) {
await element(by.id(`numeric_keyboard_${num}`)).tap();
}

await expect(element(by.text('Please repeat pin code'))).toBeVisible();
await expect(
element(by.text('Please re-enter your PIN code')),
).toBeVisible();

for (const num of PIN.split('')) {
await element(by.id(`numeric_keyboard_${num}`)).tap();
Expand Down Expand Up @@ -126,7 +140,7 @@ describe.skip('SSS Wallet', () => {
// await transferCoins(wallet.address, milkWallet.address);
});

it('should restore SSS wallet', async () => {
it.skip('should restore SSS wallet', async () => {
await expect(element(by.id('welcome'))).toBeVisible();
await expect(element(by.id('welcome_signin'))).toBeVisible();
await element(by.id('welcome_signin')).tap();
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"ts-coverage": "typescript-coverage-report",
"link-assets": "npx react-native-asset",
"logcat": "adb logcat -v color -v time --pid $(adb shell ps | grep com.haqq.wallet | tr -s ' ' | cut -d' ' -f2)",
"detox:ios:build": "detox build --configuration ios.sim.release",
"detox:ios:test": "detox test --configuration ios.sim.release --loglevel warn --cleanup --record-videos failing --take-screenshots failing --capture-view-hierarchy enabled --record-logs failing",
"detox:ios:build": "detox build --configuration ios.sim.debug",
"detox:ios:test": "detox test --configuration ios.sim.debug --loglevel warn --cleanup --record-videos failing --take-screenshots failing --capture-view-hierarchy enabled --record-logs failing",
"detox:ios": "yarn detox:ios:build && yarn detox:ios:test",
"detox:android:build": "detox build --configuration android.sim.release",
"detox:android:test": "detox test --configuration android.sim.release --loglevel warn --cleanup --record-videos failing --take-screenshots failing --record-logs failing",
Expand Down Expand Up @@ -205,7 +205,7 @@
"babel-jest": "29.7.0",
"babel-plugin-module-resolver": "5.0.0",
"babel-plugin-react-remove-properties": "0.3.0",
"detox": "20.18.4",
"detox": "20.27.4",
"eslint": "8.45.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jest": "27.4.2",
Expand Down
22 changes: 15 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9183,23 +9183,31 @@ __metadata:
languageName: node
linkType: hard

"detox@npm:20.18.4":
version: 20.18.4
resolution: "detox@npm:20.18.4"
"detox-copilot@npm:^0.0.23":
version: 0.0.23
resolution: "detox-copilot@npm:0.0.23"
checksum: ae209f519b1f7b97b657de49e752f1fc18292ed049d26056682010231203b3c07bdb61a06d610ffead2a75cdf5b11849cdab03ae2670debe5e2f8b0191006635
languageName: node
linkType: hard

"detox@npm:20.27.4":
version: 20.27.4
resolution: "detox@npm:20.27.4"
dependencies:
ajv: ^8.6.3
bunyan: ^1.8.12
bunyan-debug-stream: ^3.1.0
caf: ^15.0.1
chalk: ^4.0.0
child-process-promise: ^2.2.0
detox-copilot: ^0.0.23
execa: ^5.1.1
find-up: ^5.0.0
fs-extra: ^11.0.0
funpermaproxy: ^1.1.0
glob: ^8.0.3
ini: ^1.3.4
jest-environment-emit: ^1.0.5
jest-environment-emit: ^1.0.8
json-cycle: ^1.3.0
lodash: ^4.17.11
multi-sort-stream: ^1.0.3
Expand Down Expand Up @@ -9229,7 +9237,7 @@ __metadata:
optional: true
bin:
detox: local-cli/cli.js
checksum: 9527990fc2145445506434b149a72b7ec0b050095afc581eb98986acd14215514e486bd65822add1d991d88514efede6113f4779b2a0fc912f1379f61b25bcf2
checksum: a47b1f949ee92656ee09194dc2bb3e2569ab714790bfd9ec6da3c363ae35b7fa4a588190fe5f6c251900a6d9d103f9237ad2f6f7990319c7f07759f3dd521450
languageName: node
linkType: hard

Expand Down Expand Up @@ -11375,7 +11383,7 @@ __metadata:
date-fns: 2.30.0
decimal.js: 10.4.3
deprecated-react-native-prop-types: 4.1.0
detox: 20.18.4
detox: 20.27.4
dotenv: 16.4.5
eslint: 8.45.0
eslint-plugin-import: 2.27.5
Expand Down Expand Up @@ -12671,7 +12679,7 @@ __metadata:
languageName: node
linkType: hard

"jest-environment-emit@npm:^1.0.5":
"jest-environment-emit@npm:^1.0.8":
version: 1.0.8
resolution: "jest-environment-emit@npm:1.0.8"
dependencies:
Expand Down

0 comments on commit aafa08e

Please sign in to comment.