Commit Graph

8941 Commits

Author SHA1 Message Date
Yevheniia Berdnyk 734abc221c
e2e: tests fixes 2023-12-27 00:50:01 +02:00
Ajay Sivan bec51b7d0e
Add :wallet/accounts-with-customization-color subscription (#18302) 2023-12-26 08:12:20 -08:00
Icaro Motta 0b4a1545ae
Fix component tests, upgrade Jest & friends, and a few other goodies (#18276)
Fix all component tests after the latest RN upgrade.

Fixes https://github.com/status-im/status-mobile/issues/18157
Closes https://github.com/status-im/status-mobile/pull/18235

Dependency changes

- Upgraded Jest: from 26.6.3 to latest 29.7.0.
- Upgraded @testing-library/jest-native: from 5.3.0 to latest 5.4.3
- Upgraded @testing-library/react-native: from 11.5.4 to 12.4.2
- Removed explicit dependency on jest-circus, this is now the default test
  runner.
- Removed explicit dependency on jest-environment-node. This is handled by the
  package manager.
- Added jest-silent-reporter at version 0.5.0.

### Why component tests were failing?

Many tests were failing because we were using RN Testing Library (RNTL) in an
unreliable fashion. With the recent library upgrades, the unreliability was
excerbated. Other times, the tests were incorrectly arranging data.

### with-redefs does not work with async code

Generally speaking, with-redefs should not be used with async code, assume the
worst. The scope of the macro will cease to exist by the time the async code
runs. In many tests we were using with-redefs, then calling render, but for some
components that use use-effect, JS timers, animations, etc it's unreliable and
were the reason for failures.

It's easy to reproduce too:

```clojure
(defn foo []
  :foo)

(foo)
;; => :foo

(with-redefs [foo (constantly :bar)]
  (foo))
;; => :bar

(js/setTimeout
 (fn []
   (tap> [:calling-foo (foo)]))
 100)
;; Taps [:calling-foo :foo]
;; As you would expect, when running without with-redefs, it prints :foo.

;; So far so good, but whatch what happens with async code:

(with-redefs [foo (constantly :bar)]
  (js/setTimeout
   (fn []
     (tap> [:calling-foo (foo)]))
   100))
;; Taps [:calling-foo :foo]
;; ====> PROBLEM: Taps :foo, not :bar as one might expect
```

### Not waiting on wait-for

When test-helpers.component/wait-for is used, subsequent assertions/etc should
be done after the promise returned by wait-for is resolved. But remember to not
perform side-effects inside the wait-for callback (check out the docs
https://callstack.github.io/react-native-testing-library/docs/api#waitfor).
Most, if not all of our usages of wait-for were not waiting.

#### Improvement 1 - Silence Jest on demand

If you need to re-run component tests frequently, you may want to reduce the
output verbosity. By passing JEST_USE_SILENT_REPORTER=true to make
component-test or make component-test-watch you will see a lot less noise and be
able to focus on what really matters to you.

#### Improvement 2 - Selectively focus/disable tests

Because of our need to first compile CLJS to JS before running tests via Jest,
we couldn't easily skip or focus on specific tests. From this commit onwards, we
should never again have to change the list of requires in files core_spec.cljs.
Commenting out required namespaces gives a bad DX because it causes constant
rebasing issues.

#### Improvement 3 - Translations now work as in prod code (but only English)

Translations performed by *-by-translation-text can be done now without any
workaround under the hood. The query functions are now linted just like
i18n/label, which means static translation keywords must be qualified with :t/,
which is good for consistency.
2023-12-26 11:58:23 -03:00
Siddarth Kumar 46c5f42fad
chore: add `form-data` package for DIWAI uploads (#18299) 2023-12-26 16:08:46 +05:30
Yevheniia Berdnyk 5d21b1f5ae
e2e: fix for getting public key 2023-12-24 01:47:16 +02:00
Siddarth Kumar 49c6a44824
chore: update status-go version (#18253) 2023-12-23 10:08:49 +05:30
flexsurfer 31acb8e9c4
improve profile screen performance (#18281) 2023-12-22 16:59:12 +01:00
Jamie Caprani eda8c0ccb0
fix(quo): truncation on wallet account card long name (#18259)
---------

Co-authored-by: Paul Fitzgerald <paulfitz99@gmail.com>
2023-12-22 15:48:57 +00:00
codemaster 7915ba85ab
fix: theming toast component (#17918) 2023-12-23 01:29:50 +10:00
Yevheniia Berdnyk 1bd6898e1c
apk name updated in e2e nightly jenkins file 2023-12-22 16:18:00 +02:00
Siddarth Kumar 10b97843ce
feat: add `xcbeautify` to iOS shell (#18273)
I can't remember the number of times I have had to ask developers to run `make run-ios | xcbeautify` when debugging iOS build failures and they do not have `xcbeautify` installed on their environment.

`xcbeautify` helps make `xcodebuild` output more readable and to identify problems quickly.

This commit adds `xcbeautify` to iOS shell and to  `make run-ios` so that we get readable output by default.
2023-12-22 19:45:59 +05:30
Omar Basem 5eb0baa64d
Wallet: best route UI (#18266)
* Wallet: best route UI
2023-12-22 09:40:43 +04:00
yqrashawn a4dc268bc3
feat: spectate community before join (#18070) 2023-12-22 10:21:10 +08:00
Ulises Manuel 5fa9c0cab6
[#17964] emoji screen performance (#18213)
* Fix `->` style in emoji-picker.data

* Make `temp-empty-symbol` component code safer to avoid app crashing

* fix `->` style in `emoji-picker.utils`

* Pass sheet-animating? ratom to bottom-sheet's content component

* Improve emoji picker performance
2023-12-21 15:44:33 -06:00
Omar Basem 4f9544d20c
Wallet: receive screen (#18167)
* wallet: receive screen
2023-12-21 22:07:27 +04:00
flexsurfer ad8d537b9c
move status-im from utils (#18249) 2023-12-21 18:16:59 +01:00
Yevheniia Berdnyk 5ec5838657
e2e: added validation of encoded data in community and profile urls 2023-12-21 19:00:29 +02:00
Jamie Caprani 4c3d1667ca
chore: add outline for transacation-progress page (#18217) 2023-12-21 15:37:18 +00:00
Anton Iakimov 2d22ed810c
ci: fix android-e2e nightly builds (#18261) 2023-12-21 14:36:16 +01:00
Flavio Fraschetti e59e34d0da
Communities: Present the list of airdrop addresses (#18189)
Co-authored-by: Flavio Fraschetti <frasqueti@gmail.com>
Co-authored-by: Ajay Sivan <ajayesivan@gmail.com>
2023-12-21 01:27:59 -08:00
Mohamed Javid 60dfd6ce78
Added assets skeleton in wallet home and account screen (#18197)
This commit:

- Updates the "skeleton-list" component to support the "assets" type
- Adds the assets skeleton to the assets tab in the wallet home and account screen

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-21 13:28:52 +05:30
Ajay Sivan 4ca533a534
Move disabled component tests outside of require block to fix lint messup (#18265) 2023-12-20 22:18:59 -08:00
Tetiana Churikova ec41b30794
e2e: updated profile view (#18203) 2023-12-20 21:29:08 +01:00
Ulises Manuel 7cf31651b3
[#18083] Implement Page top component (#18163)
* Add container style and fix `:auto-complete` parameter in address-input

* Add container style to recovery-phrase input

* Add container style and accessibility-label to search-input

* Add page-top component and tests

* Add page top preview
2023-12-20 13:17:39 -06:00
Ajay Sivan 04184b41e5
Wallet/Account Permissions Quo Component (#18224) 2023-12-20 07:54:13 -08:00
Lungu Cristian d0e624afd7
Biometrics button on login screen (#18106)
* feat: login with biometry when switching accounts

* feat: biometry button on login screen

* fix: addressed review comments

* fix: biometry button background

* ref: moved biometrics constants to main constants file

* fix: hide biometric button when not enabled

* feat: standard_auth blur prop

* fix: leftover rename
2023-12-20 17:15:51 +02:00
Volodymyr Kozieiev bf55a2a974
Activity tab on collectible page (#18220) 2023-12-20 14:53:29 +00:00
Omar Basem 8225d91ee0
Wallet: home top insets
Wallet: home top insets
2023-12-20 18:23:27 +04:00
Mohsen f631e1fe9d
[#17393] feat: add new setting ui (#18118) 2023-12-20 17:03:49 +03:00
Andrea Maria Piana 32cfd214ca
Add fetch messages behind a toggle & some advanced settings
This PR does a few things:

1) Add fetch messages implementation on any kind of chat. It's behind a
   toggle (on by default) as design is still unsure whether we want it,
   but it's very useful for debugging.
2) Allow setting light client from mobile

It also partially remove node config management from the clojure part,
as it's better if that's not explicitly managed by clients.
Some parts are still relying on it but they are not functional
(keycard), while others are still using it and will need to be updated
eventually (syncing), in order to get rid completely of node config.

Sets fleet to shards.test

90c31afe...1adcf02f
2023-12-20 13:04:29 +00:00
flexsurfer 800ca19c08
move keycard native module, removed outdated code (#18252) 2023-12-20 13:53:53 +01:00
mmilad75 b70493691c
Implement Link Card component (#18080)
* add basics

* finalize component

* add test structure

* add tests

* fix lint issues

* move color to props

* move variants to props

* change file structure

* working

* finalize loader

* fix tests

* fix lint issues

* fix style issues

* fix typos

* resolve comments

---------

Co-authored-by: Jamie Caprani <jamiecaprani@gmail.com>
2023-12-20 14:07:04 +03:30
Ajay Sivan a40862c5a9
Disable component tests that use `wait-for` helper function (#18243) 2023-12-20 02:26:57 -08:00
Parvesh Monu 17c442a373
Add placeholder illustration in jump-to screen (#18229) 2023-12-20 14:56:33 +05:30
Parvesh Monu c74461db3a
remove unused react-native-intersection-observer library (#18230) 2023-12-20 14:21:07 +05:30
yqrashawn 4bc5efb855
fix: universal link regex (#18020)
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
2023-12-20 11:25:09 +08:00
Yevheniia Berdnyk 711e64bc75
e2e: android14 2023-12-20 01:51:58 +02:00
flexsurfer 602b27105b
FINAL BOSS! rename status-im2 to status-im (#18241) 2023-12-19 20:59:07 +01:00
flexsurfer f89fd8ca54
move status-im under legacy (#18237) 2023-12-19 18:41:30 +01:00
flexsurfer 842203a4d0
move community code to status-im2 (#18218) 2023-12-19 15:59:50 +01:00
Siddarth Kumar 36c2f4706f
Fix crash on x86_64 emulators (#17773)
In this commit we bump jenkins lib tag to enable building e2e with 64bit 

Co-authored-by: Anton Iakimov <yakimant@gmail.com>
2023-12-19 20:11:25 +05:30
Brian Sztamfater a4f99de8d5
feat: implement getSuggestedRoutes in the wallet Send Flow (#18104)
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-12-19 02:59:58 -08:00
Parvesh Monu d40f70dca4
Optimize chat screen navigation view (#18055) 2023-12-19 16:01:13 +05:30
Alexander 1df96ae3e0
Invite friends (#17570) (#18124)
* Invite friends (#17570)

* Small update

* Update

* Fix
2023-12-19 10:36:49 +01:00
Siddarth Kumar 771fb111e6
make purge script more robust for Darwin (#18192)
The existing purge script for Darwin would fail and stop at many stages.

This commit makes the script more robust to certain failures that were observed and documented in https://github.com/status-im/status-mobile/issues/16404
2023-12-19 08:46:19 +05:30
Mohamed Javid da61233302
Wallet - Watched Account UI Updates (#18190)
This commit:

- Updates the account switcher in the "page-nav" component to use "account-avatar" instead of "dropdown"
- Updates the account avatar (on the top right corner of the account screen) to display the watched account variant correctly
- Updates the accounts list in the account switcher to display the correct background for the watched account with the eye icon

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-18 23:31:36 +05:30
Jamie Caprani 8a869be01c
chore(wallet): add images to select address page (#18119) 2023-12-18 03:55:42 -08:00
Siddarth Kumar 8d0bb7ba9e
fix: modify permissions of all files to read (#18214)
`react-native-reanimated` generates write protected files during build time which are problematic because we copy over `node_modules` from `nix` store and when replacing them with new node modules we are manually asked to confirm this overwrite.

This used to happen before with `.cxx` files but now it also happens with `.so` files. 

This commit fixes those permissions.

partially fixes #18211
2023-12-18 14:38:34 +05:30
Siddarth Kumar d9a242fcab
set `make run-metro` target to `clojure` (#18215)
The metro terminal no longer needs to have `android` target anymore.
I had to do this in https://github.com/status-im/status-mobile/pull/17241 

This commit sets the target of metro terminal back to `clojure`.

I tested building `android` and `iOS` on my MacOS and on my linux machines and found no side effect.
Now metro terminal is fast again.
2023-12-18 14:03:24 +05:30
Parvesh Monu 8ba9f45e44
Upgrade react-native-reanimated to 3.6.1 (#18216) 2023-12-18 09:44:53 +05:30