Commit Graph

1513 Commits

Author SHA1 Message Date
Yevheniia Berdnyk 456ccb4c69
e2e: temp fix for image selection 2024-02-17 19:03:20 +02:00
Yevheniia Berdnyk 5fdaf0054d
e2e: updated join community 2024-02-13 15:26:19 +00:00
Yevheniia Berdnyk f1db73d149
e2e: updated deep/universal links tests 2024-02-09 15:51:14 +02:00
Yevheniia Berdnyk 2e7a9c82ff
e2e: fix for deep/universal links test 2024-02-05 16:08:18 +02:00
Nikolay 32442945ee
chore(wallet): connect remove account rpc request (#18601) 2024-02-05 04:29:25 -08:00
Yevheniia Berdnyk 3f9cd3a688
e2e: fixes 01.02 2024-02-01 20:36:51 +02:00
Yevheniia Berdnyk 205b74cd34
e2e: remived xfail marks 2024-01-26 20:03:12 +02:00
Yevheniia Berdnyk ad7a95ed3d
e2e: updated deep/universal links tests 2024-01-25 22:20:21 +02:00
Ibrahem Khalil 5bb4f3632a
[17514] Use OS emojis in emoji picker (#18397)
---------

Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
2024-01-23 14:41:43 +02:00
Jamie Caprani 3e787ff112
feat(shell): add share qr wallet accounts feature(#18511)
Co-authored-by: Paul Fitzgerald <paulfitz99@gmail.com>
2024-01-15 06:39:48 -08:00
Yevheniia Berdnyk 433be1daef
e2e: fixes 10.01 2024-01-10 16:10:31 +02:00
Yevheniia Berdnyk 4c4ba97308
e2e: added check for deleted 1-1 chat history 2024-01-08 21:49:20 +02:00
Yevheniia Berdnyk 5a832871fe
e2e: added checks for non-token gated community channels 2024-01-05 00:34:56 +02:00
Yevheniia Berdnyk 85c928f862
e2e: enabled tests for pinning messages 2024-01-04 11:22:58 +02:00
Tetiana Churikova 169a092e7f
e2e: wait for Join button to be available (#18316) 2023-12-28 16:31:54 +01:00
Yevheniia Berdnyk 734abc221c
e2e: tests fixes 2023-12-27 00:50:01 +02: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
Yevheniia Berdnyk 5d21b1f5ae
e2e: fix for getting public key 2023-12-24 01:47:16 +02:00
Yevheniia Berdnyk 5ec5838657
e2e: added validation of encoded data in community and profile urls 2023-12-21 19:00:29 +02:00
Tetiana Churikova ec41b30794
e2e: updated profile view (#18203) 2023-12-20 21:29:08 +01:00
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
Ibrahem Khalil 07d8bf0d19
Share community via URL with any privileges (#18131) 2023-12-15 14:29:13 +02:00
Yevheniia Berdnyk 3ddb76faed
e2e: fixes 2023-12-13 02:28:24 +02:00
Siddarth Kumar 761a7df06f
upgrade react-native to 0.72.5 (#17241)
This commit does many things :
- Upgrade `react-native ` to `0.72.5`
- Upgrade `react-native-reanimated` to  `3.5.4`
- Upgrade `react-native-navigation` to `7.37.0`
- `ndkVersion` has been bumped to `25.2.9519653`
- `cmakeVersion` has been bumped to `3.22.1`
- `kotlinVersion` has been bumped to `1.7.22`
- `AGP` has been bumped to `7.4.2`
- `Gradle` has been upgraded to `8.0.1`
- Android `CompileSDK` and `TargetSDK` have been bumped to 33
- `@react-native-async-storage/async-storage` has been upgraded to `1.19.3`
- `@walletconnect/client` has been nuked
- some of the old `react-native-reanimated` code has been nuked
- `react-native-keychain` fork has been replaced with `8.1.2`

- On Android we are currently relying on `Hermes` Engine.
- On iOS we are currently relying on `JSC`
- We are not enabling new architecture for now (I have plans for that in the future) ref: https://github.com/status-im/status-mobile/issues/18138

IOS only PR : https://github.com/status-im/status-mobile/pull/16721
Android only PR : https://github.com/status-im/status-mobile/pull/17062

- `make run-metro` now has a target of `android` which was `clojure` earlier, this will increase the time it takes to start metro terminal but this is needed otherwise you will get a nasty error while developing for android locally.
2023-12-11 21:22:23 +05:30
BalogunofAfrica f155d95d92
fix: 1:1 chat concerns (#17795) 2023-12-11 14:42:41 +01:00
Yevheniia Berdnyk 6093d56c90
e2e: increased wait time for PN and CR 2023-12-07 18:04:45 +02:00
Yevheniia Berdnyk 3b5fe36717
e2e: added test for edit/delete message when offline 2023-12-06 23:19:17 +02:00
Yevheniia Berdnyk 4376ee8908
e2e: disabled checks because of issues with restored contacts and channel links 2023-12-06 16:57:31 +02:00
Yevheniia Berdnyk 6b612588c4
e2e: skipped checks with bugs 2023-12-05 20:54:09 +02:00
Yevheniia Berdnyk 04dee8be45
e2e: updated data for waku backup test 2023-12-01 12:28:26 +02:00
Yevheniia Berdnyk b7f675aa5c
e2e: fix for deep links test 2023-11-30 01:09:42 +02:00
Yevheniia Berdnyk 0546a87e9a
e2e: deep links tests added 2023-11-29 14:09:31 +02:00
Yevheniia Berdnyk c7e230d070
e2e: changed test order 2023-11-28 12:05:47 +02:00
Yevheniia Berdnyk e6a7c420a2
e2e: APK upload time limit increased 2023-11-23 12:34:30 +02:00
Icaro Motta c1dcd7a764
Introduce malli library (#17867)
This commit is the foundational step to start using malli
(https://github.com/metosin/malli) in this project.

Take in consideration we will only be able to realize malli's full power in
future iterations.

For those without context: the mobile team watched a presentation about malli
and went through a light RFC to put everyone on the same page, among other
discussions here and there in PRs.

To keep things relatively short:

1. Unit, integration and component tests will short-circuit (fail) when
   inputs/outputs don't conform to their respective function schemas (CI should
   fail too).
2. Failed schema checks will not block the app from initializing, nor throw an
   exception that would trigger the LogBox. Exceptions are only thrown in the
   scope of automated tests.
3. There's zero performance impact in production code because we only
   instrument. Instrumentation is removed from the compiled code due to the
   usage of "^boolean js.goog/DEBUG".
4. We shouldn't expect any meaningful slowdown during development.

**What are we instrumenting in this PR?**

Per our team's agreement, we're only instrumenting the bare minimum to showcase 2 examples.

- Instrument a utility function utils.money/format-amount using the macro
  approach.
- Instrument a quo component quo.components.counter.step.view/view using the
  functional approach.

Both approaches are useful, the functional approach is powerful and allow us to
instrument anonymous functions, like the ones we pass to subscriptions or event
handlers, or the higher-order function quo.theme/with-theme. The macro approach
is perfect for functions already defined with defn.

**I evaluated the schema or function in the REPL but nothing changes**

- If you evaluate the source function, you need to evaluate schema/=> or
  schema/instrument as well.
- Remember to *var quote* when using schema/instrument.
- You must call "(status-im2.setup.schema/setup!)" after any var is
  re-instrumented. It's advisable to add a keybinding in your editor to send
  this expression automatically to the CLJS REPL, or add the call at the end of
  the namespace you are working on (similar to how some devs add "(run-tests)"
  at the end of test namespaces).

**Where should schemas be defined?**

For the moment, we should focus on instrumenting quo components, so define each
function schema in the same namespace as the component's public "view" var.

To be specific:

- A schema used only to instrument a single function and not used elsewhere,
  like a quo component schema, wouldn't benefit from being defined in a separate
  namespace because that would force the developer to constantly open two files
  instead of one to check function signatures.
- A common schema reused across the repo, like ":schema.common/theme" should be
  registered in the global registry "schema.registry" so that consumers can just
  refer to it by keyword, as if it was a built-in malli schema.
- A common schema describing status-go entities like message, notification,
  community, etc can be stored either in the respective
  "src/status_im2/contexts/*" or registered globally, or even somewhere else.
  This is yet to be defined, but since I chose not to include schemas for them,
  we can postpone this guideline.
2023-11-18 11:04:48 -03:00
Jamie Caprani 2e2d15adfb
chore: add floating button page component (#17737)
Co-authored-by: Ulises M <ulises.ssb@hotmail.com>
2023-11-17 09:16:55 -08:00
Yevheniia Berdnyk 1d1d586223
e2e: added back status link opening 2023-11-17 18:09:57 +02:00
Yevheniia Berdnyk 2e0643fabe
e2e: fixes 15.11 2023-11-16 15:54:35 +02:00
Jakub Sokołowski 5ceb7c2215
tests/appium: use requests for fetching APK
Also add more context for the error.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-11-15 18:08:11 +01:00
Jakub Sokołowski 2043e9353b
tests/appium: refactor conftest.py to be more readable
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-11-15 18:08:10 +01:00
Yevheniia Berdnyk 83a7402210
e2e: fix for terminated session 2023-11-13 02:27:36 +02:00
Yevheniia Berdnyk 4eda8bb6b3
e2e: temp fix for opening a link in Status 2023-11-08 18:47:56 +02:00
Yevheniia Berdnyk 422004f146
e2e: fix for creating a new user 2023-11-07 14:43:30 +02:00
Dmitri Akatov a5bb95cd18
add translation linting to the "make lint" pipeline. (#17820) 2023-11-07 11:33:59 +01:00
Yevheniia Berdnyk f1de077d9d
e2e: making 2 tests independent 2023-11-03 18:02:16 +02:00
Yevheniia Berdnyk 579b382c44
e2e: fix for edit message with a mention 2023-11-02 12:38:26 +02:00
yqrashawn 859cb19886
fix(universal-link): more new link format, handle old link format (#17721)
Co-authored-by: pavloburykh <pavlo@status.im>
2023-11-02 15:31:49 +08:00
Nikolay 94a3e266a9
Edit derivation path (#17741) 2023-11-01 14:04:21 +01:00