Skip to content

Commit 67d31ab

Browse files
committed
test(e2e-mobile): clean slate
1 parent e7cb7d1 commit 67d31ab

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

e2e/mobile/helpers/commonHelpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function createDetoxURLBlacklistRegex(): string {
7373
return `\\("${patterns.join('","')}"\\)`;
7474
}
7575

76-
export async function launchApp() {
76+
export async function launchApp(customConfig: Detox.DeviceLaunchAppConfig = {}) {
7777
const port = await findFreePort();
7878
closeBridge();
7979
initBridge(port);
@@ -92,6 +92,7 @@ export async function launchApp() {
9292
permissions: {
9393
camera: "YES",
9494
},
95+
...customConfig,
9596
});
9697
return port;
9798
}

e2e/mobile/jest.globalTeardown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default async () => {
4040
if (process.env.CI && process.env.SHARD_INDEX === "1") {
4141
try {
4242
await initDetox();
43-
await launchApp();
43+
await launchApp({ newInstance: true });
4444
await loadConfig("1AccountBTC1AccountETHReadOnlyFalse", true);
4545
await NativeElementHelpers.waitForElementById("topbar-settings", 120_000);
4646

e2e/mobile/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ setupEnvironment();
1010

1111
beforeAll(
1212
async () => {
13-
const port = await launchApp();
13+
const port = await launchApp({ newInstance: true });
1414
await device.reverseTcpPort(8081);
1515
await device.reverseTcpPort(port);
1616
await device.reverseTcpPort(52619); // To allow the android emulator to access the dummy app

e2e/mobile/specs/account/accountRename.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe("Account name change", () => {
4141
await app.accounts.openViaDeeplink();
4242
await app.common.expectAccountName(newAccountName);
4343
await device.terminateApp();
44-
await launchApp();
44+
await launchApp({ newInstance: true });
4545
await device.disableSynchronization();
4646
await loadConfig("skip-onboarding", true);
4747
await app.mainNavigation.waitForWallet40Ready();

0 commit comments

Comments
 (0)