Commit Graph

51 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
6f8de0b2c6 Element Call ringing notifications (#2978)
- Add `ActiveCallManager` to handle incoming and ongoing calls.
- Add ringing call notifications with full screen intents and missed call ones as part of the 'conversation' notifications.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-06-10 11:51:19 +02:00
Jorge Martin Espinosa
801f0b955d Notifications: simplify the flow by removing persistence (#2924)
* Notifications: simplify the flow by removing persistence. 
* Bump of minSdk to `24` (Android 7).
* Add migration to remove `notification.bin` file
2024-05-29 08:03:23 +00:00
Benoit Marty
4fc3c6f889 Introduce lambdaError instead of using TODO, to handle error when a lambda is invoked and it should not. 2024-05-23 09:12:40 +02:00
Jorge Martin Espinosa
2e93d842c7 UX cleanup: DM details screen (#2820)
* UX cleanup: user profile.

- Move send DM to a CTA button.
- Add 'Call' CTA button too when there is a DM with that user and a call is possible.
- Add missing tests.

* Update screenshots

* Add tests for clicking on the avatar

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-05-08 16:05:02 +02:00
ganfra
9ffed34303 Timeline : continue to fix more tests... 2024-04-25 12:41:34 +02:00
ganfra
35b12f265f Room directory : add tests and cleanup 2024-03-28 17:03:34 +01:00
ganfra
13aa578e11 Tests : improve lambda recorder 2024-03-28 14:59:22 +01:00
ganfra
00613da64c Tests : create lambda recorder 2024-03-28 10:34:12 +01:00
Jorge Martin Espinosa
eabdb9ae4d Add isInDebug variable to simulate debug/release configs for tests (#2566)
* `isInDebug` as `ThreadLocal<Boolean>`

* Use a simple var for `isInDebug` and add a helper method to test release mode, when running the debug test.

* Add some more docs

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-03-18 17:56:07 +01:00
ganfra
9d6f68ac82 Tests: raise default timeout of consumeItemsUntilPredicate to 3 seconds (like awaitItem) 2024-03-13 12:44:59 +01:00
ganfra
dbba95a830 Merge branch 'develop' into feature/fga/room_list_filter_iteration 2024-03-13 12:07:20 +01:00
Jorge Martin Espinosa
d19b3fe091 Change a room's permissions power levels (#2525)
* Change a room's permissions power levels

* Make `currentPermissions` use a `MatrixRoomPowerLevels?` instance instead.

* Update strings

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-03-12 15:45:06 +01:00
ganfra
3cb189f475 RoomList: refactor and fix tests 2024-03-12 15:38:33 +01:00
Benoit Marty
6801ef9524 Add test on RoomDetailsView 2024-02-22 15:23:22 +01:00
Benoit Marty
addc3d4782 Improve test framework. 2024-02-21 18:30:57 +01:00
Benoit Marty
7077b8e1bd Add missing period. 2024-02-07 23:23:49 +01:00
Benoit Marty
f9599a6a6f Add tests on MessagesView 2024-02-07 23:02:32 +01:00
Benoit Marty
6c96b53d9f Add result type to EnsureCalledOnceWithParam 2024-02-07 23:02:32 +01:00
Benoit Marty
28f26b1aae Add test for TimelineItemPollView 2024-02-06 18:30:27 +01:00
Benoit Marty
824de9cc11 Add test to ensure that TimelineView loads more Events. 2024-02-06 17:12:14 +01:00
Jorge Martin Espinosa
f9c5cd07a9 Return cached room members before fetching new ones, do it in batches (#2274)
* Use cached users from the Rust SDK.

Also lazy load received users by batches.

* Create `RoomMemberListFetcher` to wrap all the room member loading logic

* Ensure we clear `RoomMember` Rust references if the fetching coroutine is canceled
2024-01-23 18:23:20 +01:00
Benoit Marty
7baaac09ba Add missing test for LogoutView 2024-01-09 17:53:24 +01:00
Benoit Marty
0628ceabc1 Iterate on EnsureCalledOnce devX 2024-01-08 10:07:48 +01:00
Benoit Marty
ba2c297118 Add run method to EnsureCalledOnce and EnsureCalledOnceWithParam to ensure that assertSuccess is always called. 2024-01-08 10:01:26 +01:00
Benoit Marty
6798352fb7 Use string resource instead of hard-coded strings. 2024-01-08 09:50:08 +01:00
Benoit Marty
6b2f79959d Improve assertion message. 2024-01-08 09:35:14 +01:00
Benoit Marty
69e8384163 Add first tests on compose click interaction. 2024-01-05 18:00:44 +01:00
Benoit Marty
06c9da277b Let consumeItemsUntilPredicate fail if predicate is never true or if Complete occurs.
Do not fail on error for `consumeItemsUntilTimeout`
2023-12-15 20:07:11 +01:00
ganfra
bde2705654 Pin create: add test for presenter 2023-10-19 15:45:11 +02:00
Jorge Martin Espinosa
ae7c2257df Improve coverage in permalinks package (#1502)
* Improve coverage in permalinks package
2023-10-06 11:37:26 +02:00
Marco Romano
5d8666a507 Warmup molecule only once. 2023-09-13 15:42:48 +02:00
jonnyandrew
301e49c3a3 Reduce test flakiness by warming up molecule tests (#1226) 2023-09-06 10:08:21 +00:00
Benoit Marty
3f8e7eaef8 Add missing tests. 2023-08-23 13:49:03 +02:00
Jorge Martin Espinosa
75137c1469 Fix detekt issues in develop (#1004)
Co-authored-by: Marco Romano <marcor@element.io>
2023-07-31 14:01:08 +02:00
ganfra
c6e023b053 Add consumeItemsUntilPredicate to check how it goes... 2023-07-26 13:07:11 +02:00
ganfra
b96b0b10f5 Turbine: introduce consumeItemsUntilTimeout 2023-07-25 18:37:32 +02:00
ganfra
92db07ff83 Merge branch 'develop' into feature/fga/better_timeline_scroll 2023-07-17 23:35:41 +02:00
Jorge Martin Espinosa
e61af2eb7d Fix: make sure we ignore notifications for open rooms (#867)
* Make sure we ignore notifications for open rooms
- Listen to process lifecycle changes in `AppForegroundStateService`. Use initializers to reliable create it.
- Merge `AppNavigationState` with `AppForegroundState`. Renamed the previous `AppNavigationState` to `NavigationState`, created a new `AppNavigationState` which contains both the navigation state and the foreground state.
2023-07-17 17:02:06 +02:00
ganfra
231f278adb Timeline: fix some tests and a one more 2023-07-13 17:09:20 +02:00
ganfra
c2c81d3747 Coroutine: remove diffUpdateDispatcher, not used anymore 2023-07-11 11:40:55 +02:00
Benoit Marty
9321a9f718 Introduce simulateLongTask to ensure that the Presenter State Loading is visible.
Also do some cleanup on the tests.
2023-06-15 10:57:05 +02:00
Benoit Marty
ef7ddb8d0f Merge pull request #549 from vector-im/feature/bma/onboardingServer
Onboarding iteration
2023-06-13 09:21:50 +02:00
Benoit Marty
91d20e1b78 Enforce usage of TestScope.testScheduler 2023-06-12 19:49:56 +02:00
ganfra
730f50a433 Media actions: add more tests 2023-06-06 22:08:57 +02:00
Benoit Marty
b15abe0509 Reduce number of warnings 2023-05-30 11:43:38 +02:00
Marco Romano
993fec1b74 Enable one last ignored test for LeaveRoomPresenterImpl (#462)
Most of the tests in `LeaveRoomPresenterImplTest.kt` where using `UnconfinedTestDispatcher` which was conflating some of the state returned by the presenter. This prevented to test one specific case which had been left with an `@Ignore` annotation.
This PR switches to `StandardTestDispatcher` so that the ignored test case can work and also fixes some other test cases whose behavior is now more correct under the `StandardTestDispatcher`.

Also updates our test factory method for `CoroutineDispatchers` to more easily obtain a `CoroutineDispatchers` which uses `StandardTestDispatcher`.
2023-05-26 07:51:41 +02:00
Benoit Marty
3704564198 Use default material3 version again and cleanup @OptIn annotations.
Material3 is now 1.1.0
2023-05-15 12:28:31 +02:00
ganfra
b0152059ff Room : continue improving members loading 2023-04-21 14:39:47 +02:00
Jorge Martin Espinosa
e704870e3f Validate several ids in constructors (#336)
* Validate ids in constructors.

* Remove redundant `.value` usage in string interpolation.

* Make a distinction between `SessionId` and `UserId` in `TestData`.
2023-04-18 16:17:13 +00:00
Jorge Martin Espinosa
afd58f1634 Update Gradle to 8.1 and AGP to v8.0 (#329)
* Update AGP to 8.0.0.

* Set JAVA_HOME to JDK17

* Update lint version.

* Use right JDK for dependency analysis, replace deprecated env var.

* Upgrade to Gradle 8.1.

* Remove `@Supress(DSL_SCOPE_VIOLATION)` as it's no longer needed.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 08:49:52 +00:00