Skip to content

Commit

Permalink
fixup! feat(suite-native): replace illustrations and lotties with upd…
Browse files Browse the repository at this point in the history
…ated ones
  • Loading branch information
yanascz committed Dec 4, 2024
1 parent 2003cc8 commit 3a0de09
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 18 deletions.
7 changes: 7 additions & 0 deletions suite-native/app/e2e/pageObjects/alertSheetActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ class AlertSheetActions {
await waitFor(secondaryButtonElement).toBeVisible().withTimeout(10000);
await secondaryButtonElement.tap();
}

async skipViewOnlyMode() {
await waitFor(element(by.id('@home/alert/view-only')))
.toBeVisible()
.withTimeout(20000);
await this.tapSecondaryButton();
}
}

export const onAlertSheet = new AlertSheetActions();
10 changes: 0 additions & 10 deletions suite-native/app/e2e/pageObjects/bottomSheetActions.ts

This file was deleted.

4 changes: 2 additions & 2 deletions suite-native/app/e2e/tests/deeplinkPopup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link';
import TrezorConnect from '@trezor/connect-mobile';
import { conditionalDescribe } from '@suite-common/test-utils';

import { onAlertSheet } from '../pageObjects/alertSheetActions';
import { onConnectingDevice } from '../pageObjects/connectingDevice';
import {
appIsFullyLoaded,
Expand All @@ -16,7 +17,6 @@ import {
import { onOnboarding } from '../pageObjects/onboardingActions';
import { onCoinEnablingInit } from '../pageObjects/coinEnablingActions';
import { onHome } from '../pageObjects/homeActions';
import { onBottomSheet } from '../pageObjects/bottomSheetActions';

const SERVER_PORT = 8080;
const SERVER_URL = `http://localhost:${SERVER_PORT}`;
Expand Down Expand Up @@ -66,7 +66,7 @@ conditionalDescribe(device.getPlatform() !== 'android', 'Deeplink connect popup.
await onCoinEnablingInit.enableNetwork('regtest');
await onCoinEnablingInit.clickOnConfirmButton();

await onBottomSheet.skipViewOnlyMode();
await onAlertSheet.skipViewOnlyMode();

// This `TrezorConnect` instance here is pretending to be the integrator or @trezor/connect-mobile
await TrezorConnect.init({
Expand Down
3 changes: 1 addition & 2 deletions suite-native/app/e2e/tests/deviceSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { conditionalDescribe } from '@suite-common/test-utils';
import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link';

import { onAlertSheet } from '../pageObjects/alertSheetActions';
import { onBottomSheet } from '../pageObjects/bottomSheetActions';
import { onCoinEnablingInit } from '../pageObjects/coinEnablingActions';
import { onConnectingDevice } from '../pageObjects/connectingDevice';
import { onDeviceAuthenticitySummary } from '../pageObjects/deviceAuthenticitySummary';
Expand All @@ -28,7 +27,7 @@ conditionalDescribe(device.getPlatform() !== 'android', 'Device settings', () =>
await onCoinEnablingInit.enableNetwork('btc');
await onCoinEnablingInit.clickOnConfirmButton();

await onBottomSheet.skipViewOnlyMode();
await onAlertSheet.skipViewOnlyMode();
});

beforeEach(async () => {
Expand Down
4 changes: 2 additions & 2 deletions suite-native/app/e2e/tests/onboardAndConnect.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// `expect` keyword is already used by jest.
import { expect as detoxExpect } from 'detox';

import { onBottomSheet } from '../pageObjects/bottomSheetActions';
import { onAlertSheet } from '../pageObjects/alertSheetActions';
import { disconnectTrezorUserEnv, openApp, prepareTrezorEmulator } from '../utils';
import { onOnboarding } from '../pageObjects/onboardingActions';
import { onCoinEnablingInit } from '../pageObjects/coinEnablingActions';
Expand Down Expand Up @@ -35,7 +35,7 @@ describe('Go through onboarding and connect Trezor.', () => {

await onCoinEnablingInit.clickOnConfirmButton();

await onBottomSheet.skipViewOnlyMode();
await onAlertSheet.skipViewOnlyMode();

await detoxExpect(element(by.id('@home/portfolio/header')));
} else {
Expand Down
3 changes: 1 addition & 2 deletions suite-native/app/e2e/tests/send.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link';

import { onAccountDetail } from '../pageObjects/accountDetailActions';
import { onAlertSheet } from '../pageObjects/alertSheetActions';
import { onBottomSheet } from '../pageObjects/bottomSheetActions';
import { onCoinEnablingInit } from '../pageObjects/coinEnablingActions';
import { onConnectingDevice } from '../pageObjects/connectingDevice';
import { onHome } from '../pageObjects/homeActions';
Expand Down Expand Up @@ -82,7 +81,7 @@ conditionalDescribe(device.getPlatform() !== 'android', 'Send transaction flow.'
await onCoinEnablingInit.enableNetwork('regtest');
await onCoinEnablingInit.clickOnConfirmButton();

await onBottomSheet.skipViewOnlyMode();
await onAlertSheet.skipViewOnlyMode();
});

beforeEach(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export const useShowViewOnlyAlert = () => {
/>
</VStack>
),
testID: '@home/alert/view-only',
});
}, [showAlert, handleEnable, handleCancel]);

Expand Down

0 comments on commit 3a0de09

Please sign in to comment.