Skip to content

Commit ae4a7bc

Browse files
authored
Merge branch 'main' into patch-2
2 parents ba9bc88 + 429f570 commit ae4a7bc

File tree

78 files changed

+9408
-450
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+9408
-450
lines changed

.yarnrc.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,28 @@ plugins:
1515
spec: '@yarnpkg/plugin-workspace-tools'
1616

1717
yarnPath: .yarn/releases/yarn-3.6.4.cjs
18+
19+
packageExtensions:
20+
"@wdio/utils@*":
21+
peerDependencies:
22+
edgedriver: ">=4.0.0"
23+
geckodriver: ">=4.0.0"
24+
peerDependenciesMeta:
25+
edgedriver:
26+
optional: true
27+
geckodriver:
28+
optional: true
29+
30+
"@appium/support@*":
31+
peerDependencies:
32+
sharp: ">=0.33.0"
33+
peerDependenciesMeta:
34+
sharp:
35+
optional: true
36+
37+
"appium-ios-remotexpc@*":
38+
peerDependencies:
39+
appium-ios-tuntap: ">=1.0.0"
40+
peerDependenciesMeta:
41+
appium-ios-tuntap:
42+
optional: true

bitrise.yml

Lines changed: 74 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,6 @@ workflows:
156156
title: Fix Android Env Vars
157157
inputs:
158158
- file_path: scripts/bitrise/fixAndroidEnvVars.sh
159-
- script-runner@0:
160-
title: Create Test Run
161-
inputs:
162-
- file_path: scripts/bitrise/detox/createAndroidTestRun.sh
163-
- variables:
164-
- TESTRAIL_RUN_ID=$TESTRAIL_RUN_ID
165159
- android-build-for-ui-testing@0:
166160
inputs:
167161
- module: $ANDROID_MODULE
@@ -182,30 +176,6 @@ workflows:
182176
inputs:
183177
- pipeline_intermediate_files: |-
184178
$BITRISE_DEPLOY_DIR/app-internal-e2e-bitrise-signed.apk:BITRISE_APK_PATH
185-
$BITRISE_DEPLOY_DIR/app-internal-e2e-androidTest-bitrise-signed.apk:BITRISE_TEST_APK_PATH
186-
- script-runner@0:
187-
title: Create Tests To Run Arrays
188-
inputs:
189-
- file_path: scripts/bitrise/detox/distributeAndroidTests.sh
190-
- share-pipeline-variable@1:
191-
inputs:
192-
- variables: |-
193-
TESTRAIL_PROJECT_ID=$TESTRAIL_PROJECT_ID
194-
TESTRAIL_RUN_ID=$TESTRAIL_RUN_ID
195-
TESTS_TO_RUN_GROUP_1=$TESTS_1
196-
TESTS_TO_RUN_GROUP_2=$TESTS_2
197-
TESTS_TO_RUN_GROUP_3=$TESTS_3
198-
TESTS_TO_RUN_GROUP_4=$TESTS_4
199-
BITRISE_TEST_APK_PATH=$BITRISE_TEST_APK_PATH
200-
BITRISE_APK_PATH=$BITRISE_APK_PATH
201-
IS_INTERNAL_BUILD=$IS_INTERNAL_BUILD
202-
- api_level: "34"
203-
- emulator_id: emulator-5554
204-
- emulator_channel: "0"
205-
- create_command_flags: --sdcard 2048M
206-
- tag: default
207-
- abi: x86_64
208-
- profile: pixel_7_pro
209179
_install-old-android-version:
210180
steps:
211181
- script-runner@0:
@@ -229,9 +199,7 @@ workflows:
229199
- artifact_sources: .*
230200
- pipeline_intermediate_files: |-
231201
$BITRISE_DEPLOY_DIR/app-internal-e2e-bitrise-signed.apk:BITRISE_APK_PATH
232-
$BITRISE_DEPLOY_DIR/app-internal-e2e-androidTest-bitrise-signed.apk:BITRISE_TEST_APK_PATH
233202
$BITRISE_DEPLOY_DIR/AvaxWalletInternal.app:BITRISE_APP_DIR_PATH
234-
235203
_pull_external_app_files:
236204
steps:
237205
- pull-intermediate-files@1:
@@ -303,11 +271,6 @@ workflows:
303271
echo "Built app at: $APP_PATH"
304272
envman add --key BITRISE_APP_DIR_PATH --value "$APP_PATH"
305273
envman add --key BITRISE_APP_DIR_PATH_LIST --value "$APP_PATH"
306-
307-
APP_PATH="$BITRISE_DEPLOY_DIR/Build/Products/$IOS_CONFIGURATION-iphonesimulator/$IOS_SCHEME.app"
308-
309-
cd "$(dirname "$APP_PATH")"
310-
zip -r "$BITRISE_DEPLOY_DIR/$IOS_SCHEME.app.zip" "$(basename "$APP_PATH")"
311274
- deploy-to-bitrise-io@2:
312275
inputs:
313276
- pipeline_intermediate_files: $BITRISE_APP_DIR_PATH:BITRISE_APP_DIR_PATH
@@ -355,7 +318,7 @@ workflows:
355318
- key: node-20-{{ .OS }}-{{ .Arch }}
356319
- nvm@1:
357320
inputs:
358-
- node_version: 20.11.1
321+
- node_version: 20.19.0
359322
- save-cache@1:
360323
title: Save Node 20 Cache
361324
inputs:
@@ -568,8 +531,6 @@ workflows:
568531
- _install-and-set-env
569532
- _set-version
570533
- _build-android-internal-for-testing
571-
after_run:
572-
- _upload-detox-artifacts
573534
envs:
574535
- ENVIRONMENT: production
575536
opts:
@@ -933,6 +894,79 @@ workflows:
933894
- IS_EXTERNAL_BUILD: "true"
934895
opts:
935896
is_expand: false
897+
appium-ios-setup:
898+
before_run:
899+
- _install-and-set-env
900+
- _set-version
901+
- _pull_app_files
902+
envs:
903+
- ENVIRONMENT: production
904+
opts:
905+
is_expand: false
906+
- E2E: "true"
907+
opts:
908+
is_expand: false
909+
- IS_INTERNAL_BUILD: "true"
910+
opts:
911+
is_expand: false
912+
- PLATFORM: iOS
913+
opts:
914+
is_expand: false
915+
- IOS_CONFIGURATION: Release
916+
opts:
917+
is_expand: false
918+
- IOS_SCHEME: AvaxWalletInternal
919+
opts:
920+
is_expand: false
921+
- APP_TITLE: Core Mobile Internal
922+
opts:
923+
is_expand: false
924+
steps:
925+
- script-runner@0:
926+
title: Appium iOS testing
927+
no_output_timeout: 300
928+
inputs:
929+
- file_path: scripts/bitrise/appium/iosInternalE2e.sh
930+
appium-android-setup:
931+
before_run:
932+
- _install-and-set-env
933+
- _set-version
934+
- _pull_app_files
935+
envs:
936+
- ENVIRONMENT: production
937+
opts:
938+
is_expand: false
939+
- E2E: "true"
940+
opts:
941+
is_expand: false
942+
- IS_INTERNAL_BUILD: "true"
943+
opts:
944+
is_expand: false
945+
- PLATFORM: Android
946+
opts:
947+
is_expand: false
948+
- ANDROID_BUILD_VARIANT: internalE2e
949+
opts:
950+
is_expand: false
951+
- APP_TITLE: Core Mobile Internal
952+
opts:
953+
is_expand: false
954+
steps:
955+
956+
inputs:
957+
- api_level: "34"
958+
- emulator_id: emulator-5554
959+
- emulator_channel: "0"
960+
- create_command_flags: --sdcard 512M
961+
- tag: default
962+
- abi: x86_64
963+
- profile: pixel_7_pro
964+
- wait-for-android-emulator@1: {}
965+
- script-runner@0:
966+
title: Appium Android testing
967+
no_output_timeout: 300
968+
inputs:
969+
- file_path: scripts/bitrise/appium/androidInternalE2e.sh
936970
ios-internal:
937971
before_run:
938972
- _install-and-set-env

packages/core-mobile/.eslintrc.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,28 @@ module.exports = {
1818
'metro.monorepo.config.js',
1919
'**/node_modules/**',
2020
'android/app/build/**',
21-
'expo-env.d.ts'
21+
'expo-env.d.ts',
22+
'ios/DerivedData'
2223
],
2324
overrides: [
2425
{
2526
files: ['e2e/**/*'],
27+
parserOptions: {
28+
project: './e2e/tsconfig.json',
29+
tsconfigRootDir: __dirname
30+
},
31+
rules: {
32+
'no-console': 0,
33+
'@typescript-eslint/explicit-function-return-type': 0,
34+
'no-param-reassign': 0
35+
}
36+
},
37+
{
38+
files: ['e2e-appium/**/*'],
39+
parserOptions: {
40+
project: './e2e-appium/tsconfig.json',
41+
tsconfigRootDir: __dirname
42+
},
2643
rules: {
2744
'no-console': 0,
2845
'@typescript-eslint/explicit-function-return-type': 0,

packages/core-mobile/app/consts/reactQueryKeys.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export enum ReactQueryKeys {
2020
FEATURED_PROJECTS = 'featuredProjects',
2121
FEATURED_EDUCATION_ARTICLES = 'featuredEducationArticles',
2222
ECOSYSTEM_PROJECTS = 'ecosystemProjects',
23+
FAVORITE_PROJECTS = 'favoriteProjects',
2324

2425
// seedless
2526
USER_MFA = 'userMfa',

packages/core-mobile/app/new/common/components/AccountSettingBarButton.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ export const AccountSettingBarButton = forwardRef<RNView>(
1919

2020
return (
2121
<TouchableOpacity
22-
testID="account_setting_bar_btn"
2322
ref={ref}
23+
accessibilityLabel="account_setting_bar_btn"
24+
testID="account_setting_bar_btn"
2425
// onPress doesn't work for Android when using svgs (only on production)
2526
onPressOut={handlePress}
2627
style={{

packages/core-mobile/app/new/common/components/DropdownSelections.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const DropdownSelections = ({
2525
flexDirection: 'row',
2626
...sx
2727
}}>
28-
<View sx={{ flexDirection: 'row', gap: 8 }}>
28+
<View accessible={false} sx={{ flexDirection: 'row', gap: 8 }}>
2929
{filter && (
3030
<Dropdown
3131
title={filter.title}
@@ -86,7 +86,12 @@ const Dropdown = memo(
8686
onPressAction={(event: { nativeEvent: { event: string } }) =>
8787
onSelected(event.nativeEvent.event)
8888
}>
89-
<Chip size="large" hitSlop={8} rightIcon={rightIcon} testID={testID}>
89+
<Chip
90+
size="large"
91+
hitSlop={8}
92+
rightIcon={rightIcon}
93+
testID={testID}
94+
accessibilityLabel={testID}>
9095
{title}
9196
</Chip>
9297
</DropdownMenu>

packages/core-mobile/app/new/common/components/PinScreen.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ export const PinScreen = ({
346346
)}
347347
</Reanimated.View>
348348
<Reanimated.View
349+
pointerEvents="none"
349350
style={[
350351
isProcessingStyle,
351352
{

packages/core-mobile/app/new/common/components/ScrollScreen.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ interface ScrollScreenProps extends KeyboardAwareScrollViewProps {
8080
headerStyle?: StyleProp<ViewStyle>
8181
/** Whether this screen should hide the header background */
8282
hideHeaderBackground?: boolean
83+
/** TestID for the screen */
84+
testID?: string
8385
}
8486

8587
const KeyboardScrollView = Animated.createAnimatedComponent(
@@ -99,6 +101,7 @@ export const ScrollScreen = ({
99101
showNavigationHeaderTitle = true,
100102
hideHeaderBackground,
101103
headerStyle,
104+
testID,
102105
renderHeader,
103106
renderFooter,
104107
renderHeaderRight,
@@ -315,6 +318,7 @@ export const ScrollScreen = ({
315318
return (
316319
<View style={{ flex: 1 }}>
317320
<KeyboardScrollView
321+
testID={testID}
318322
extraKeyboardSpace={
319323
disableStickyFooter ? -footerHeight.value - insets.bottom : 0
320324
}
@@ -350,6 +354,7 @@ export const ScrollScreen = ({
350354
return (
351355
<View style={[{ flex: 1 }, props.style]}>
352356
<ScrollView
357+
testID={testID}
353358
style={{ flex: 1 }}
354359
showsVerticalScrollIndicator={false}
355360
keyboardDismissMode="interactive"

packages/core-mobile/app/new/common/components/SelectAvatar.tsx

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { loadAvatar } from 'common/utils/loadAvatar'
1212
import React, { memo, useCallback, useMemo, useState } from 'react'
1313
import { useSafeAreaInsets } from 'react-native-safe-area-context'
1414
import { useFocusEffect } from 'expo-router'
15+
import Config from 'react-native-config'
1516
import { ScrollScreen } from './ScrollScreen'
1617

1718
export const SelectAvatar = memo(
@@ -73,6 +74,7 @@ export const SelectAvatar = memo(
7374
size="large"
7475
type="primary"
7576
onPress={handleSubmit}
77+
testID={isLoading ? undefined : 'avatar_next_btn'}
7678
disabled={isLoading}>
7779
{isLoading ? <ActivityIndicator /> : buttonText}
7880
</Button>
@@ -139,18 +141,23 @@ export const SelectAvatar = memo(
139141
/>
140142
</View>
141143
)}
142-
143-
<View
144-
style={{
145-
marginBottom: -insets.bottom,
146-
paddingBottom: 16
147-
}}>
148-
<AvatarSelector
149-
selectedId={selectedAvatar?.id}
150-
avatars={avatarsWithSelectedAsMiddle}
151-
onSelect={onSelect}
152-
/>
153-
</View>
144+
{
145+
// TODO: Remove this once we have a proper way to handle avatar selection on appium tests.
146+
// We are doing this because the avatar selector is not working properly on appium tests.
147+
!Config.E2E_MNEMONIC && (
148+
<View
149+
style={{
150+
marginBottom: -insets.bottom,
151+
paddingBottom: 16
152+
}}>
153+
<AvatarSelector
154+
selectedId={selectedAvatar?.id}
155+
avatars={avatarsWithSelectedAsMiddle}
156+
onSelect={onSelect}
157+
/>
158+
</View>
159+
)
160+
}
154161
</View>
155162
</ScrollScreen>
156163
)

packages/core-mobile/app/new/common/components/TokenInputWidget.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,15 @@ export const TokenInputWidget = ({
194194
justifyContent: 'space-between'
195195
}}>
196196
<TouchableOpacity
197+
accessible={true}
198+
accessibilityLabel={`select_token_title__${title}`}
199+
testID={`select_token_title__${title}`}
197200
onPress={onSelectToken}
198201
disabled={!isTokenSelectable || disabled}>
199202
<View sx={{ gap: 1 }}>
200203
{token && <Text variant="subtitle2">{title}</Text>}
201204
<View sx={{ flexDirection: 'row', alignItems: 'center' }}>
202-
<Text testID="select_token_title" variant="heading6">
205+
<Text variant="heading6">
203206
{token
204207
? token.symbol
205208
: isTokenSelectable
@@ -228,6 +231,8 @@ export const TokenInputWidget = ({
228231
<TokenAmountInput
229232
ref={tokenAmountInputRef}
230233
testID="token_amount_input_field"
234+
accessibilityLabel="token_amount_input_field"
235+
accessible={true}
231236
autoFocus={autoFocus}
232237
editable={editable}
233238
denomination={token?.decimals ?? 0}

0 commit comments

Comments
 (0)