Commit graph

96 commits

Author SHA1 Message Date
Benoit Marty
c087becee1 Fix test present - with CallType RoomCall sets call as active, loads URL, runs WidgetDriver and notifies the other clients a call started not passing. 2024-10-30 21:00:52 +01:00
Benoit Marty
29356b96c1
Merge pull request #3554 from element-hq/feature/bma/testEmptyTimeline
Add unit tests on TimelineItemsSubscriber
2024-10-02 14:04:48 +02:00
Jorge Martin Espinosa
79c17f714f
Use Anvil KSP instead of the Square KAPT one (#3564)
* Use Anvil KSP instead of the Square KAPT one

* Fix several configuration cache, lint and test issues

* Allow incremental kotlin compilation in the CI

* Workaround Robolectric + Compose issue that caused `AppNotIdleException`

* Update the `enterprise` commit hash

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2024-10-02 11:52:17 +00:00
Jorge Martin Espinosa
eeec7cc785
Centralise the DI code generation logic (#3562)
* Create Anvil extension helper

* Use the helper everywhere
2024-09-30 12:20:28 +00:00
Benoit Marty
f89463c3a1 Remove runCancellableScopeTest and runCancellableScopeTestWithTestScope, we can use TestScope.backgroundScope instead. 2024-09-27 18:37:16 +02:00
ganfra
269889da83 Pinned messages analytics : branch analytics 2024-09-23 20:10:04 +02:00
ganfra
d0f363bf7d Pinned messages analytics : introduce LocalAnalyticsService so we can easily inject it in views 2024-09-20 18:28:25 +02:00
Jorge Martin Espinosa
663362ac7f
Add forced logout flow when the proxy is no longer available (#3458)
* Add `MatrixClient.isSlidingSyncProxySupported` function

* Update localazy strings

* Modify `ErrorDialog` to have an `onSubmit` call, which will be used for the submit action.

Also make the title text optional and dismissing the dialog by tapping outside/going back configurable.

* Check if a forced migration to SSS is needed because the proxy is no longer available.

In that case, display the non-dismissable dialog and force the user to log out after enabling SSS.

* Enable native/simplified sliding sync by default.

* Refactor the login to make sure we:

1. Always try native/simplified sliding sync login first, if available.
2. Then, if it wasn't available or failed with an sliding sync not supported error, try with the proxy instead (either discovered proxy or forced custom one).

* Move logic to `LoggedInPresenter` and the UI to `LoggedInView`

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-09-16 09:13:02 +00:00
Benoit Marty
375ac25d8d Migrate license to AGPL - XML files. 2024-09-06 17:43:35 +02:00
Benoit Marty
f61df38e55 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
ganfra
0b32dbebb5 tests : refactor some classes 2024-07-31 21:14:29 +02:00
Jorge Martin Espinosa
b0cebf5ca0
Improve screenshot testing with ComposablePreviewScanner (#3125)
* Use ComposablePreviewScanner to rework how screenshot testing works
* Add test sharding
* Update screenshots
* Fixes for Element Gallery

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-07-03 13:05:06 +02:00
Benoit Marty
849f64f4aa
Merge pull request #3044 from element-hq/feature/bma/testDefaultClearCacheUseCase
Add test on DefaultClearCacheUseCase
2024-06-18 10:27:45 +02:00
Jorge Martin Espinosa
b741c32e91
Add full screen intent permissions banner (#3024)
* Add full screen intent permissions banner, creating `:libraries:fullscreenintent` modules.
* Add it to notification settings too:
    - Create `libraries:fullscreenintent` modules for the permission presenter and associated data.
    - Add the presenter and states to `NotificationSettingsPresenter` and `NotificationSettingsView`.
* Use the right API to check for full screen intent permissions.
- Use the right package name for `:libraries:permission` contents.
* Fix broken tests (flaky?)
* Ignore coverage verification for fake and small presenters

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-06-18 07:41:10 +00:00
Benoit Marty
b68b08300a Add test on DefaultFtueService.reset(). 2024-06-17 15:04:20 +02:00
Benoit Marty
698254744a
Merge pull request #2970 from element-hq/feature/bma/moreAnalytics
Track when the user starts a room call and when they enable formatting options on the message composer
2024-06-05 09:21:28 +02:00
Benoit Marty
9567119e31 Ensure Posthog is only used for Element builds. 2024-06-04 17:04:19 +02:00
Benoit Marty
6fc4450c56 Analytics: track screen MobileScreen.ScreenName.RoomCall 2024-06-03 17:55:52 +02:00
Valere
ca660de348 Add missing impl in Sentry 2024-05-31 14:07:03 +02:00
Valere
920293ea83 Test | Fix missing updateSuperProperties impl 2024-05-31 14:07:03 +02:00
Valere
bf6ad4c5ca Analytics | Add support for SuperProperties 2024-05-31 14:07:02 +02:00
Benoit Marty
635a88e585 Cleanup import 2024-05-29 01:54:06 +02:00
Benoit Marty
7156dab7dc Make anId a const. 2024-05-29 00:37:28 +02:00
Benoit Marty
edded63473 Fix compilation issue 2024-05-29 00:30:38 +02:00
Benoit Marty
15dc423345 Add test on DefaultAnalyticsService 2024-05-28 18:27:53 +02:00
Benoit Marty
5a1896ae3d Remove dead code AnalyticsService.onSignOut.
DefaultAnalyticsService is observing the Session.
2024-05-28 17:37:25 +02:00
Benoit Marty
011aba4887 Make AnalyticsStore an interface and create DefaultAnalyticsStore 2024-05-28 17:36:48 +02:00
Benoit Marty
22329b9678 Provide serverNames when available and fix issue around analytics 2024-05-14 15:58:10 +02:00
Valere
6ad40fc6e0 Code review - more tests 2024-05-07 09:38:26 +02:00
Valere
a761215e31 Add support for Verification state analytics 2024-05-06 19:06:54 +02:00
SpiritCroc
6e2d163dcf Fix compile with noop analytics provider 2024-04-12 21:12:44 +02:00
Benoit Marty
5a0e76677b Improve ScreenTracker. 2024-04-02 18:12:36 +02:00
Benoit Marty
5e27c54deb FakeStringProvider: Ensure parameter are included in the result of getString() 2024-04-02 16:15:03 +02:00
Benoit Marty
ef48c2b5a3 Track NotificationTroubleshoot screen 2024-04-02 16:15:02 +02:00
Benoit Marty
46008c2887 Fix analytics: spaceId have the same syntax as roomId. Use MatrixRoom.isSpace instead of MatrixPatterns.isSpaceId (#2612)
Also remoce useless orFalse() calls.
2024-03-28 12:13:49 +01:00
Benoit Marty
a9e67c070d Improve UtdTracker test. 2024-03-15 12:33:54 +01:00
Benoit Marty
73f80b314f Add extra properties "cryptoSDK" to Error.CryptoSDK.Rust to all events and screen sent to PostHog. 2024-03-15 11:27:53 +01:00
ganfra
66030aeb64 Analytics : add analytics on read status and favorite toggles 2024-02-19 17:38:17 +01:00
Benoit Marty
5d086ad82d Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
renovate[bot]
c8bd362397
Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
Benoit Marty
2b764a1e56 Migrate to PostHog 3.0.0 2023-12-05 16:12:17 +01:00
Benoit Marty
a02c5c2b44 Add test for DefaultNotificationDrawerManager 2023-11-27 16:44:47 +01:00
Benoit Marty
628d02beb1 Add test for DefaultBugReporter 2023-11-24 16:30:06 +01:00
Benoit Marty
ec459165db Add tests for NotifiableEventResolver 2023-11-23 17:36:23 +01:00
Benoit Marty
21200df294 Konsist: check that if sealed interface is used in parameter of Composable, it has the @Stable or @Immutable annotation 2023-11-03 15:19:55 +01:00
Benoit Marty
b4cc11ec1e Test coverage: Add test on DefaultNavigationStateService 2023-10-24 17:17:15 +02:00
jonnyandrew
f1b142f002
Add voice message recording duration indicator and limit (#1628)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-24 11:44:53 +00:00
Benoit Marty
510bdd47af Remove AppNameProvider, we have buildMeta now. 2023-10-20 10:41:39 +02:00
Benoit Marty
8929a90970 Konsist: add test to ensure filename match top level Composable View, and fix existing issue 2023-10-10 15:39:22 +02:00
ganfra
5ec6d7c235 Navigation: fix test and update log. 2023-09-26 11:06:49 +02:00