Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add android detox coverage with new RN upgrade (#6384)
* disable svg metro bundler config to allow Bigint to number conversion * Update static-logos svg's * Update .nvmrc from Node 14 to 16 * Update Gemfile for RN 0.71.6 * Update deps and pods - Bump RN to 0.71.6 and update pods - Add @ethereumjs/util - Bump metro-react-native-babel-preset - Bump rn-nodeify - Bump package.json node engine - Update Yarn lockfile * Add commented Babel config from debugging SVGs * Add back react-native-svg Metro config * Test all @ethereumjs/util methods and BigInt * udpate android configs * Revert "Test all @ethereumjs/util methods and BigInt" This reverts commit ad58291. * Revert "Add commented Babel config from debugging SVGs" This reverts commit d8f7279. * Convert reanimated v1 code -> v2 for ReusableModal and Drawer * Replace Notification animation with reanimated v2 * Use SheetBottom for DetectedTokens screen * Remove layout animations on accordion for now * Update AppState listener removal * Expose boolean in dismiss callback for ReusableModal and SheetBottom * Remove AppState listeners and fix lint * patch react-native TextInput disable android keyboard learning feature * Move Flipper files on Android * Update build gradle files with manifest placeholders and remove need for multidex * Clean up MainActivity and MainApplication java files * Configure gesture handler for Android in react-native.config.js * Patch compile method for packages * Bump blur and video packages * Find node with xcode.env * Update pod files with bumped libraries * patch(react-native): make sdk versioning absolute * update pods * react-native-aes-crypto-fork: apply manual patch * dont kill adb server when running on android * skip build react-native from source * Bump react-native-reanimated from 3.0.2 to 3.1.0 * Bump pod RNReanimated from 3.0.2 to 3.1.0 * Add Hermes ProGuard rules for Android https://reactnative.dev/docs/hermes#android * Doc pos eth-json-rpc-errors issue RE Hermes * Add temp debug breakpoints and crash notes * removed lint and audit blockers to test bitrise builds * added lint disabled on files * removed non-existing imports * Manually set Error stack property * Revert manually adding lru-cache Done earlier to resolve build error: lru-cache not accessible from @babel/helper-compilation-targets * snapshot * patch hermes-build * remove commented code * Android: build only one ABI during development * Use JS exports in wdio config files * add react-native-aes-crypto-forked patch * feat(CI): Bitrise M1 Machine and React Native 0.71.6 compatibility upgrade (#6327) * [FIX] Gas is not re-calculated when updating a transaction (#5876) * check gas is recalculate on confirm screen * reset the value of gas before estimating * update snapshot * init engine for failing keyringcontroller * test init * mock transactioncontroller * update test * rebased to main * revert test file name to index * fix failing test * enable M1 builds on RN * updated NDK version * bump to new workflow step and NDK version * log out NDK home after install * [FEATURE][MC] - Edit account name view (#6165) * Edit account name view * addressed review * navigate to edit account name * edit header style * E2e appium/715 edit account name view (#6303) * Fix flaky test * Solve Browserstack errors * Added Gesture.waitAndTap method AddContact and Contacts --------- Co-authored-by: SamuelSalas <[email protected]> * Cleanup approve transaction review (#6213) * Revert "ci: temporarily downgrade ubuntu to 20.04" (#5199) This reverts commit 5542193. * Fix duplicate test name lint warning (#6304) The lint warning about a test title being repeated has been fixed. The two tests were very similar; the titles have been updated to explain how they are different. --------- Co-authored-by: legobeat <[email protected]> Co-authored-by: LeoTM <[email protected]> * removed version print out step * update bitrise step version * updated ndk version * added local prop file * update build step and add local.properties file in android * update local prop script * bump ndk version in metamask gradle * added strings to be translated for feature #6230 (#6308) * bump ndk version * add the NDK path to root gradle * added hard code NDK version and path * deps: force xml2js@>=0.5.0 via resolutions (#6240) - CVE-2023-0842 / GHSA-776f-qx25-q3cc * updated rootproject properties * only update NDK version in patch * only update NDK version * removed local prop build step * Revert "only update NDK version" This reverts commit 2285dd3. * Revert "Revert "only update NDK version"" This reverts commit 1cbfeb1. * pull NDK path and bitrise script updates * update filepath, script and gradle config to be more dynamic * bump to max large M1 * update gradle to provide NDK path for bitrise * more dynamic ndk path options * update ndk path check * added if check to function * updated gradle for test * updated gradle for test remove env check * remove if check in react android patch * updated ndkPath * update build gradle * remove ndk version * remove ndk from gradle * removed ndkVersion * uncommented ndkVersion * update file path name * updated builds with name correction * update version on install-missing-android-tools bitrise builds * devDeps: Remove concat-cli (#6315) Doesn't seem to ever have been useful. Introduced in 69381f0 Prefer `cat`. * Refactor SendTo - extract code to render from / to addresses into separate component (#6266) * initial commit * draft * cleaned up * lint * include isBalanceZero for fromaddress * fix snapshot * resolved feedback * renaming component names * Update app/components/Views/SendFlow/AddressFrom/AddressFrom.test.tsx Co-authored-by: Ariella Vu <[email protected]> * Update app/components/Views/SendFlow/SendTo/index.js Co-authored-by: Ariella Vu <[email protected]> * removed redudant snapshot * rebased to main * snapshot update * removed podfile change --------- Co-authored-by: Ariella Vu <[email protected]> * On-ramp: Add redux-thunk, refactor successful order handler (#6257) * Fix missing handler on mandatory modal (#6309) * feature(on-ramp): add development environment to onramp-sdk (#6325) * On-ramp: fix missing network name (#6340) * 6.5.0 (#6241) * 6.5.0 * fix(on-ramp): Add thunk to handle buy crypto deeplink (#6248) * [FIX] Detox: wallet-tests.spec.js (#6250) * fix wallet-tests.spec.js * add collectible json * updated collectible data for bitrise wallet * fix: invalid title error (#6280) * Update Network Badge to use Badge component of component library (#6254) * Show unsupported token for network when watching tokens (#6258) * [FIX] - Upgrading with deprecated test network selected (#6269) * add migrations to handle deprecated networks * use enums, const instead of strings --------- Co-authored-by: CW <[email protected]> * [FIX] Patch assets-controller to not use BigInt (#6305) * Patch assets-controller to not use BigInt * Update to use public link Co-authored-by: sethkfman <[email protected]> * Update to spell out React Native Co-authored-by: legobeat <[email protected]> * Update to spell out React Native Co-authored-by: legobeat <[email protected]> --------- Co-authored-by: sethkfman <[email protected]> Co-authored-by: legobeat <[email protected]> * build 1104 (#6310) * update changelog --------- Co-authored-by: metamaskbot <[email protected]> Co-authored-by: Pedro Pablo Aste Kompen <[email protected]> Co-authored-by: Chris Wilcox <[email protected]> Co-authored-by: abretonc7s <[email protected]> Co-authored-by: tommasini <[email protected]> Co-authored-by: Cal Leung <[email protected]> Co-authored-by: sethkfman <[email protected]> Co-authored-by: legobeat <[email protected]> Co-authored-by: sethkfman <[email protected]> * New Crowdin translations by Github Action (#6208) * New Crowdin translations by Github Action * PR update * Revert "PR update" This reverts commit 39e533a. --------- Co-authored-by: metamaskbot <[email protected]> Co-authored-by: sethkfman <[email protected]> * Stabilise E2e Android tests on pipeline (#6341) * Modify actions bar function and small tidy ups * Commit working Smoke tests * Small changes to tests * Small fixes * hide Keyboard * Fiz sendtoken browserStack * fix sendToken and CreateWalletAccount * add smoke tag to lockreset * wait for no thanks button to exists * increase wait time for term of use modal. * fix wallet displayed step * add time interval to waitFor on no thanks button * add time interval for waitForDisplayed * Add check for terms of use modal loading delay * Update common-steps.js Alter CreateWalletTest to also wait for terms of use text * Add double tap * update tags --------- Co-authored-by: Curtis <[email protected]> * [DETOX] Only Run tests with the "smoke" tag in the describe block (#6338) * add tags to test describe block. * add regression tags to describe block * create methods for Smoke & Regression * update bitrise.yml * fix lint * update changelog * Fix readme typos (#6275) Co-authored-by: legobeat <[email protected]> * sturdier check (#5866) * sturdier check * apply feedback * apply feedback * unit test * check phishing and deeplinks * feedback * resolve * url check * more tests --------- Co-authored-by: Curtis David <[email protected]> * Appium/fix reports video failures (#6343) * try/catch error generating reports * clean up for reports * Update SendToken.feature * delete feature, was renamed * [e2e] Send ETH to an EOA using Ganache network on Android (#6215) * Send ETH with Ganache network * Move Ganache initialization to common steps * Remove unneeded async * Update wdio/features/Confirmations/SendEthEOA.feature Co-authored-by: Curtis David <[email protected]> * Add extra step for closing new modal * Add tag @confirmations --------- Co-authored-by: Curtis David <[email protected]> * Fix yarn watch clean (#6339) * enable proguard for release and QA builds --------- Co-authored-by: Sylva Elendu <[email protected]> Co-authored-by: tommasini <[email protected]> Co-authored-by: SamuelSalas <[email protected]> Co-authored-by: Jyoti Puri <[email protected]> Co-authored-by: legobeat <[email protected]> Co-authored-by: Mark Stacey <[email protected]> Co-authored-by: LeoTM <[email protected]> Co-authored-by: Ariella Vu <[email protected]> Co-authored-by: Pedro Pablo Aste Kompen <[email protected]> Co-authored-by: Cal Leung <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: metamaskbot <[email protected]> Co-authored-by: Chris Wilcox <[email protected]> Co-authored-by: abretonc7s <[email protected]> Co-authored-by: MetaMask Bot <[email protected]> Co-authored-by: yande <[email protected]> Co-authored-by: Curtis <[email protected]> Co-authored-by: Brendan Kirby <[email protected]> Co-authored-by: witmicko <[email protected]> Co-authored-by: seaona <[email protected]> Co-authored-by: Matthew Walsh <[email protected]> * Update Podfile.lock 3 hashes updated after fresh branch checkout and setup * Revert eth-rpc-errors+4.0.3.patch Revert manually setting error stack property, no longer needed. Addressed in Hermes (23/03/23): facebook/hermes@f2f1a2e Addressed in this PR/branch via custom Hermes build: 8a5dce5 Fresh build tested in MM mobile browser https://metamask.github.io/test-dapp successful Connect Action, no crash after modal, remains connected. * native module for goBack on Android * implement Minimizer Android native module Android uses native implementation (GoBack class) iOS uses 'react-native-minimizer' package creates NativeModules file to populate with all used native modules * updating gradle as well as a few other files * Moving create wallet test steps into one method * fix linting and missing imports * fixing most smoke tests to run on android. * add puppeteer to lavamoat allow-scrpits * update yarn.lock * allow jest to run * update pods * ignore default exports rule * remove unused nativemodules import * mock rnfetchblobk mkdir function * remove caret from rn clipboard * react-native-keychain version 8.0.0 * fix: hexToBN should not be used with BN argument * fix: Upgrade testing library versions and resolve jest unit tests (#6425) * Update snapshots * Update test IDs * Explicitly import waitFor for detox * Add testEnvironment property to jest config * Add mock for react-native-default-preference * Stringify mock balance data * Update Routes * Fix broken unit tests. Add missing mocks. * Update testing library and deps versions * Patch react-native-button to be accessible by default * Change GetStarted to use getByRole * Change PaymentMethods to use getByRole * Use getByRole in Regions tests * Use getByRole in Wallet tests * Use getByRole in TransactionReview tests * Update snapshots * Fix linting * Fix snapshots * Update snapshots * Remove engine.init from tests * Update yarn lock * Remove non testing library upgrades * Remove last non test library upgrades * Undo bitrise chnages * Remove buttonTestID from Box * Remove true default on accessible prop for Box * Fix lint issue * Uncomment reaniamted jest test setup * Update snapshots * Fix failing tests * remove .node-version in favor of .nvmrc * [hexToBN] allow non string input values handle non string arguments without throwing error to maintain the same behavior as before. centralize imports to make sure all use the same implementation * fix lint * remove proptype error log from device screen. revert this commit once #6458 gets closed * fix lint * restore adb server reload when building * remove unused flow config file * fix yarn.lock * fix unit tests do not use fake timers * enable project ext var enableHermes * bring bitrise yaml closer to main * split the wallet.spec tests into 3 because of flakiness. Also fixed the addressbook test * fix linting * fix permissionsystem test. * update bitrise yml android e2e test commands and device name * updated bitrise stage for use android_e2e_test * updated build machine for E2E * update android tools version * comment out version tool update * fix AccountFromToInfoCard unit test by waiting for element query * update install missing tools and ndk version * testing library: make use of screen export * AccountFromToInfoCard: tests: remove unused import * update install missing step to latest * recover ndk_version key * replace deprecated listener removal * bitrise: download cmake manually with sdkmanager * bitrise: download cmake manually with sdkmanager * bitrise: fix android sourcemaps path * fix sendERC20 test, permissionsystem and request token * fix lint * fix add custom network flow. * Remove old project.ext.react * Fix snapshots * fix sendEth test * bump version * fix multisig test * Bump version and update ios build script to fix building main bundle and assets * Remove @ethereumjs/util (from prev testing) - was only added/tracked for direct testing - not used directly in codebase - resolve: #6220 (review) [email protected] └─┬ @metamask/[email protected] └─┬ @keystonehq/[email protected] ├─┬ @keystonehq/[email protected] │ └── @ethereumjs/[email protected] └─┬ @keystonehq/[email protected] └── @ethereumjs/[email protected] deduped * Bump version * Ignore GHSA-6w63-h3fj-q4vw advisory * add get workflow info * update release announce before task * Update pod checksums * bump version to 1125 * Fix lint issues * Bump cocoapods from 1.12.0 to 1.12.1 in ReadMe Follow-up: #6512 * Revert app/components/Views/Wallet/index.tsx textStyle changes Resolve: https://github.com/MetaMask/metamask-mobile/pull/6220/files#r1222167831 Linting still passing locally, no related error/warning * update build scripts * remove test assemble * update name for bitrise emulator * rename emulator * update keystore files provided in e2e builds * update Android Test gradle step * update emulator type and removed internal keystore * updated build steps with correct AndroidTest env * run e2e on mac * reenabled linux machine on e2e tests * enable linux on e2e test for android detox * fix tests to get pass onboarding step on bitrise * turning off headless mode * update parameter for headless mode * revert headless && increase SD card size * add screenshots for testfailures arg in yaml file * fix typo in command * fix metametrics opt in test. * fix permission system delete wallet test * readding AndroidTest to build script * fix flakiness in add customnet test * fix lint * increase timeout * Fix Xcode 14.3.1 MixPanel Linker error Bump IPHONEOS_DEPLOYMENT_TARGET from 8.0 to 11.0 (min. supported) in mixpanel-iphone Subproject * Fix Xcode 14.3.1 Branch Linker error Bump IPHONEOS_DEPLOYMENT_TARGET from 8.0 to 11.0 (min. supported) in branch-ios-sdk Subproject * Fix Podfile to implement `flipper_config` Pos fix: #6220 (review) * Remove stale Podfile comment RE use_frameworks! * Fix Podfile undefined local var flipper_config Move to within definition so available within target scope Resolve: #6220 (review) * Update Podfile.lock Note prev hash changes: - boost - DoubleConversion - glog * Update Xcode proj (doc) format from 12.0-compat to 14.0-compat * update android_e2e_test to build for QA * updated device type * attempting to output screenshot artifacts to bitrise. also tapping by text instead of byLabel on the onboarding screen. * Revert "attempting to output screenshot artifacts to bitrise. also tapping by text instead of byLabel on the onboarding screen." This reverts commit 8dfc482. * native module go back on ios * fix app minimize * move RCTMinmizer inside NativeModules folder * Revert "Fix Xcode 14.3.1 MixPanel Linker error" This reverts commit 5c162a7. * Revert "Fix Xcode 14.3.1 Branch Linker error" This reverts commit 9d3d00d. * fix android crash on SRP Reveal * fix wc V2: remove big-integer polyfill bigint support comes from hermes engine on Android * NativeModules: ignore eslint default exports as we will have more native modules exported from there * return state on latest migration * address yarn audit for fast-xml-parser * removing the '#' as it was causing babel issues. * remove duplicate imports on multisig test * fix delete wallet test and sign message test. * enable syncronization by default * update yarn lock * fix linting issue * Revert "enable syncronization by default" This reverts commit 5b57da6. * enable unencrypted http on QA builds. * Revert "enable unencrypted http on QA builds." This reverts commit a282d28. * Force bundle for iOS e2e debug * Bump ruby * add bitrise debug config for android * Ignore all logbox errors * Merge branch 'upgrade/react-native/0.71.6-hermes' into add-android-detox-coverage * fix tests on android, add yarn script for triggering android tests * fix bitrise yaml file. * fix yarn script in package json * bitrise formatting issue * fix formatting issue * spacing issue * format * formatting again * fix spacing * bitrise * remove steps for release builds * spacing * always accept notifications to prevent flakiness * remove sign eth and sign messages as they increase testing time. * fix flakiness * remove smoke tag and flakiness step in 2 tests * fix linting * fix lint * make browser test more stable. * small change * update readme * update snapshots * fix jest unit tests * remove duplicate testing-library reference * switch smoke tag on flaky test * fix tests that broke after updating with main. * increase test runner timeout * address dev review feedback. * merged main into detox branch * fix appium launch times test * attempt to ignore yarn audit issue * bump to detox v20.11 + fix assertions * running tests concurrently to speed up run times * Revert "running tests concurrently to speed up run times" This reverts commit 3d805bd. * remove synchronization in deletewallet test * wait until the token input box is displayed * wait for browser elements * Revert "attempt to ignore yarn audit issue" This reverts commit 6672230. * wait for getStarted button to be displayed --------- Co-authored-by: João Loureiro <[email protected]> Co-authored-by: LeoTM <[email protected]> Co-authored-by: Cal Leung <[email protected]> Co-authored-by: sethkfman <[email protected]> Co-authored-by: sethkfman <[email protected]> Co-authored-by: Sylva Elendu <[email protected]> Co-authored-by: tommasini <[email protected]> Co-authored-by: SamuelSalas <[email protected]> Co-authored-by: Jyoti Puri <[email protected]> Co-authored-by: legobeat <[email protected]> Co-authored-by: Mark Stacey <[email protected]> Co-authored-by: Ariella Vu <[email protected]> Co-authored-by: Pedro Pablo Aste Kompen <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: metamaskbot <[email protected]> Co-authored-by: Chris Wilcox <[email protected]> Co-authored-by: abretonc7s <[email protected]> Co-authored-by: MetaMask Bot <[email protected]> Co-authored-by: yande <[email protected]> Co-authored-by: Brendan Kirby <[email protected]> Co-authored-by: witmicko <[email protected]> Co-authored-by: seaona <[email protected]> Co-authored-by: Matthew Walsh <[email protected]> Co-authored-by: Tomás SANTOS <[email protected]> Co-authored-by: João Loureiro <[email protected]>
- Loading branch information