Skip to content

Commit 92b5da2

Browse files
committed
fix(suite-native): deeplink test open url command
1 parent d20c101 commit 92b5da2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

suite-native/app/e2e/tests/deeplinkPopup.test.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import http from 'http';
33

44
import { conditionalDescribe } from '@suite-common/test-utils';
55
import TrezorConnect from '@trezor/connect-mobile';
6-
import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link';
6+
import { MNEMONICS, TrezorUserEnvLink } from '@trezor/trezor-user-env-link';
77

88
import { onAlertSheet } from '../pageObjects/alertSheetActions';
99
import { onCoinEnablingInit } from '../pageObjects/coinEnablingActions';
@@ -24,7 +24,7 @@ const SERVER_URL = `http://localhost:${SERVER_PORT}`;
2424
let server: http.Server | undefined;
2525

2626
const openUriScheme = (url: string, platformToOpen: 'android') => {
27-
const command = `npx uri-scheme open '${url.replace(/'/g, '')}' --${platformToOpen}`;
27+
const command = `npx uri-scheme open '${url.replace(/'/g, '%27')}' --${platformToOpen} --raw`;
2828

2929
exec(command, (err, stdout, stderr) => {
3030
if (err) {
@@ -83,6 +83,7 @@ conditionalDescribe(device.getPlatform() === 'android', 'Deeplink connect popup.
8383
});
8484

8585
beforeEach(async () => {
86+
await prepareTrezorEmulator(MNEMONICS.mnemonic_12);
8687
await restartApp();
8788

8889
await device.reverseTcpPort(SERVER_PORT);
@@ -124,14 +125,15 @@ conditionalDescribe(device.getPlatform() === 'android', 'Deeplink connect popup.
124125
const expectedResponse = {
125126
id: 1,
126127
payload: {
127-
path: [49, 0, 0, 0, 0],
128-
serializedPath: 'm/49/0/0/0/0',
129-
address: '3J7UQSLAaFh1nkUomVdm8ArifPEvYfNr1o',
128+
path: [2147483697, 2147483648, 2147483648, 0, 0],
129+
serializedPath: "m/49'/0'/0'/0/0",
130+
address: '3AnYTd2FGxJLNKL1AzxfW3FJMntp9D2KKX',
130131
},
131132
success: true,
132133
};
133134

134135
if (JSON.stringify(response) !== JSON.stringify(expectedResponse)) {
136+
console.error('Received:', response);
135137
throw new Error('Result does not match expected.');
136138
}
137139
});

0 commit comments

Comments
 (0)