Commit graph

437 commits

Author SHA1 Message Date
Adam Brown
804513c808 adding case for result ignoring register actions 2022-03-15 17:49:44 +00:00
Adam Brown
75cbb727a4 cleaning up test names and bodies to be clearer 2022-03-15 17:49:43 +00:00
Adam Brown
b2a1aa17bd adding commas to separate the test name sections 2022-03-15 17:49:17 +00:00
Adam Brown
3fa415007c extracting registration steps to separate handler to make testing the flow simpler 2022-03-15 17:49:16 +00:00
Adam Brown
4225f62120 adding test helper for asserting states whilst combining previous updates 2022-03-15 17:42:42 +00:00
Maxime Naturel
094e62c95b Adding unit tests for use case 2022-03-15 17:09:31 +01:00
Onuray Sahin
1a76914828
Merge pull request #5345 from vector-im/feature/ons/fix_unstable_prefixes
Support both unstable and stable prefixes
2022-03-15 15:16:16 +03:00
Adam Brown
c84ce5a2e0 making use of the fake overrides for testing 2022-03-14 11:54:42 +00:00
Adam Brown
4b9b177104 forwarding to the profile picture flow when display name changing isn't supported but pictures are when personalising the profile 2022-03-14 11:54:42 +00:00
Adam Brown
b5778bd6c5 formatting 2022-03-14 11:54:42 +00:00
Adam Brown
716928d9d2 dynamically switching the onboarding flow based on the capabilities of the homeserver
- when avatars can't be changed we complete the personlisation flow
2022-03-14 11:54:42 +00:00
Adam Brown
a033243475 adding test around account creation via dummy 2022-03-14 11:54:42 +00:00
Adam Brown
10e4fd1707 updating upstream avatar on profile picture save and continue step
- moves the personalisation state to a dedicated model to allow for back and forth state restoration
2022-03-14 11:54:42 +00:00
Benoit Marty
20c1886fed Support both unstable and stable prefixes.
Author: Onuray
2022-03-09 10:40:43 +01:00
Adam Brown
9a02543afd
FTUE - Choose a display picture (#5323)
* adding tests around the onboarding view model
- cases for the personalisation and display name actions

* adding base choose name fragment with UI

* add click handling for the display name actions

* adding tests around the onboarding view model
- cases for the personalisation and display name actions

* adding barebones profile picture fragment with ability to select a user avatar

* extracting uri filename resolving to a class which can be injected
- includes tests

* updating upstream avatar on profile picture save and continue step
- moves the personalisation state to a dedicated model to allow for back and forth state restoration

* adding test case for skipping profile picture setting

* taking the profile loading into account when rendering the onboarding loading

* extracting method for the handling of the profile picture selection

* adding dedicated camera icon for choosing profile picture

* adding toolbar to back to profile picture page
- this toolbar will fade in with the fragment as it sits at the fragment level, probably worth revisiting once more pages have a toolbar

* changing edit/add picture icon based on if we're already selected an image

* making use of debounced clicks to avoid potential extra clicks

* making the avatar height and camera icon relative percentage based
- also makes the avatar itself clicking, including a foreground ripple

* fixing formatting

* making use of fake session id for user id assertion

* using a real  matrix id syntax for the fake session user id

* removing duplicated dimens

* using self closing imageview tag
2022-03-07 14:07:22 +00:00
ericdecanini
6836a12557 Fixes legal comments 2022-03-07 13:49:23 +01:00
ericdecanini
e1f227a545 Fixes legal comments in matrix sdk files added 2022-03-07 13:14:10 +01:00
Adam Brown
10f480b88d adding missing VectorOverrides param from test instance creation and removing unused VectorDatastore 2022-03-02 18:27:12 +00:00
Adam Brown
99e5a8f2fa
FTUE - Choose a display name (#5211)
* adding base choose name fragment with UI

* add click handling for the display name actions

* updating real account display name

* setting the initial disabled state when the view is created

* adding header padding which would have been a toolbar

* exiting the flow on display name updated or skipped, the next PR will introduce the profile picture screen

* updating view model state testing to take all emissions into account

* adding tests around the onboarding view model
- cases for the personalisation and display name actions

* using colorSecondary instead of accent as per quality script rule

* making use of viewevent delegating action for the back handling

* using debounced clicks

* consuming the back action when existing the display name fragment via viewmodel

* making the keyboard imeDone update the display name
2022-03-02 17:59:40 +00:00
Maxime Naturel
562780a169 Adding a FakeFile class for unit tests 2022-02-28 11:55:14 +01:00
Maxime Naturel
0170171caa Adding missing spaces after comments 2022-02-28 10:28:45 +01:00
Maxime Naturel
56c6301151 Adding unit tests 2022-02-25 16:39:26 +01:00
Adam Brown
d99a2f8d14 creating and passing stored user properties on post hog initialisation
- this allows information captured during the onboarding to be sent once the user has opt'd in
2022-02-15 16:03:21 +00:00
Adam Brown
e36e67c54c adding unit tests around the analytics impl 2022-02-15 15:16:24 +00:00
Adam Brown
580ecc9c44 adding lateinit user property factory for use when calling the initial identify tracking
- this will allow us send the pending onboarding properties once consent is given
2022-02-15 12:19:39 +00:00
Onuray Sahin
c590bbdb9b Code review fixes. 2022-02-03 12:53:59 +03:00
Onuray Sahin
c2daab4211 Code review fixes. 2022-02-02 19:33:34 +03:00
Onuray Sahin
a131d28b3e Merge branch 'develop' into feature/ons/generic_location_pin
* develop: (146 commits)
  exhaustive not needed anymore
  Invert if condition and split long line
  Use kotlin string builder
  Same issue but in the test
  Format
  Fix a crash: java.util.IllegalFormatPrecisionException https://github.com/matrix-org/element-android-rageshakes/issues/33398
  add changelog file for threads feature
  add changelog file for threads feature
  Formatting
  Improve hidden events for threads
  Add TODO for the next Weblate sync
  ktlint format
  PR remarks
  Fix a lint false positive? Anyway this was not used. Restricted API ../../../matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncWorker.kt:61: ListenableWorker.getTaskExecutor can only be called from within the same library group (referenced groupId=androidx.work from groupId=element-android)
  It seems that now lint rule `MissingQuantity` is an error and not a warning by default.
  Whitelist group 'org.webjars' on MavenCentral to fix lint execution
  Fix conflicts
  Formating & remove unused comments
  Fix error in unit test
  ktlint format
  ...

# Conflicts:
#	vector/src/main/java/im/vector/app/features/navigation/Navigator.kt
2022-02-02 14:35:30 +03:00
Onuray Sahin
37d35c9a7f Support generic location pin. 2022-02-02 14:25:54 +03:00
ariskotsomitopoulos
d509b3324c Merge branch 'develop' into feature/aris/threads 2022-01-31 15:58:12 +02:00
ariskotsomitopoulos
f07c23fdda Formating & remove unused comments 2022-01-31 14:52:09 +02:00
ariskotsomitopoulos
ec9b6aa993 Fix error in unit test 2022-01-31 14:50:57 +02:00
Benoit Marty
303a858423 Create an extension, improve the parsing algorithm, add robustness and unit test it 2022-01-29 08:13:11 +01:00
Benoit Marty
6710f9320b Add some unit test for the command parser.
Not all commands are covered, could add more tests later.
2022-01-19 20:52:31 +01:00
Adam Brown
f61474cb83 lifting the seenIds cache to the event queue rather than chaining it through, allows us to simplify the state model 2021-11-18 13:39:07 +00:00
Benoit Marty
df60b0c2b7
Merge pull request #4430 from vector-im/feature/adm/feature-notification-images
Notification images
2021-11-15 12:46:51 +01:00
Adam Brown
b90b396753 fixing compilation error in unit test 2021-11-10 09:44:16 +00:00
Adam Brown
145ceacf78 fixing auto merge issues 2021-11-08 15:24:08 +00:00
Adam Brown
57037c9ac6 adding test cases around the mutating of the notification event queue 2021-11-08 15:24:08 +00:00
Adam Brown
6bc121ad4a extracting notifiable event fixtures to their own file 2021-11-08 15:24:08 +00:00
ganfra
bb4a820c31 Flow migration: update after PR reviews 2021-10-28 19:19:59 +02:00
ganfra
da47bfde2b Flow migration: remove Shortcuts process from main thread 2021-10-27 19:26:51 +02:00
ganfra
b93e67ed11 Flow migration: clean up 2021-10-27 16:12:01 +02:00
ganfra
635ca8e276 Merge branch 'develop' into feature/fga/rx_flow_migration 2021-10-27 16:05:43 +02:00
Adam Brown
6d9877d79c filtering out redacted simple message events, we handle them by updating the notifications 2021-10-26 20:03:10 +01:00
Adam Brown
a5fe6f7212 removing redacted events from the room notification message list 2021-10-26 20:03:10 +01:00
Adam Brown
743a71c78d renaming event lists to give more context and remove the list suffix/inconsistencies 2021-10-26 20:03:10 +01:00
Adam Brown
d1f6db4236 using dedicated ProcessedEvent data class instead of type alias for passing around the process notificatiable events
- also includes @JvmName on all conflicting extensions for consistency
2021-10-26 20:03:10 +01:00
Adam Brown
63090ef681 updating tests with shortcut placement changes 2021-10-26 20:03:10 +01:00
Adam Brown
86ce6a404e adding missing fixture parameter from rebase 2021-10-26 20:03:10 +01:00
Adam Brown
c67b9ee81e ensuring that we remove read messages when they come through by respecting the processed type when creating the notifications 2021-10-26 20:03:10 +01:00
Adam Brown
0bdc65b47f diffing the notification events against the currently rendered events allow us to dismiss notifications from removed events 2021-10-26 20:03:10 +01:00
Adam Brown
b27fb264fc using a process state of keep/removed rather than mapping to an ignored event id
- this state will be used to diff the currently rendered events against the new ones
2021-10-26 20:03:10 +01:00
Adam Brown
b7b4c01bde splitting the event processing from the rendering
- this allows us to only synchronise of the event list modifications rather than the entire notification creation/rendering which should in turn reduce some of our ANRs https://github.com/vector-im/element-android/issues/4214
2021-10-26 20:03:10 +01:00
Adam Brown
03fe45da60 ensuring that we removing the summary group before removing individual notifications
- adds some comments to explain the positioning
2021-10-26 20:03:10 +01:00
Adam Brown
a94a1a0523 formatting 2021-10-26 20:03:10 +01:00
Adam Brown
0d316e69de handling creating the summary when notification events are filtered to empty due to only containing removals 2021-10-26 20:03:10 +01:00
Adam Brown
3d567d0dcd removing no longer needed hasBeenDisplayed state, the eventList is our source of truth
- when events have finished being displayed they should be removed from the eventList via notification delete actions
2021-10-26 20:03:10 +01:00
Adam Brown
c85afa96d3 lifting settings change to cancel all notifications out of the renderer
- the renderer's responsibility it handling events
2021-10-26 20:03:10 +01:00
Adam Brown
3023cb4d39 chaining the event process, notification creation and display logic into a NotificationRender
- extract the displaying into its own class to avoid leaking the entire notificationutils
- cancel/display notification actions are completely driven by the event or abscense of event from the eventList
- attempts to avoid redundant render passes by checking if the eventList has changed since the last render
2021-10-26 20:03:10 +01:00
Adam Brown
0f4ec65b7a creating the notifications separate to where they're displayed
- also handles when the event diff means the notifications should be removed
2021-10-26 20:03:10 +01:00
Adam Brown
7b0c483134 creating dedicated class for the processing the serialized events
- updates the logic to track when events are removed as a way for the notifications to remove themselves, null events mean they've been removed
2021-10-26 20:03:10 +01:00
ganfra
a9d192fa39 Flow migration: add back some test 2021-10-26 18:09:07 +02:00
ganfra
c936954119 Flow migration: start replacing Rx by Flow 2021-10-26 14:24:23 +02:00
ganfra
e1f4e4f934 Hilt: fix test 2021-10-22 18:38:48 +02:00
Adam Brown
fc793c442b reverting back to using an array for the circular cache, makes preloading and setting the value simpler
- adds unit tests to show it working
2021-10-14 14:02:23 +01:00
ganfra
a24a9b43fa Mavericks 2: make the UT happy. Let SDK exposes MatrixCoroutineDispatchers. 2021-10-12 13:47:32 +02:00
ganfra
f6b81b36d0 Mavericks 2: switch from MvRxState to MavericksState 2021-10-01 10:08:06 +02:00
Adam Brown
b55e94b938 extracting the rx instant setup to a reuseable test rule 2021-09-29 13:23:40 +01:00
Adam Brown
daa3125e57 adding test cases around the SharedSecureStorageViewModel initial state and back flow
- introduces a temporary workaorund the unit tests Mavericks by including a no op LifecycleRegistry
- manually sets instant rx schedulers via the static helpers, the layers that set the schedulers are not currently injectable
2021-09-29 13:14:22 +01:00
Adam Brown
19d1d981c3 linting 2021-09-27 17:39:21 +01:00
Adam Brown
509c61c1a8 extracting the test fakes to their own package 2021-09-27 17:23:07 +01:00
Adam Brown
ac0c7067e0 updating the keys exporter to validate the generated file size in an attempt to warn the user of malformed outputs
- injects the io dispatcher to allow the testing
- adds unit tests around the different error flows
2021-09-27 17:23:07 +01:00
ganfra
84e6a67a51 Jitsi widget: refact a bit so we use data instead of url when possible 2021-08-27 14:03:52 +02:00
Benoit Marty
047c59eba0 Rework colors management 2021-06-09 15:36:20 +02:00
Constantin Wartenburger
26b8ef8af9
Changed rainbow algorithm 2020-10-05 17:28:05 +02:00
Benoit Marty
31029e90cc Fix test compilation issue (no detected since Olm was not available) 2020-09-24 12:46:14 +02:00
Benoit Marty
a1f90abcd2 Rename package im.vector.riotx to im.vector.app (IDE) 2020-08-03 18:46:29 +02:00
Benoit Marty
27fe4e3680 Fix build and add tests 2020-01-29 09:44:53 +01:00
Benoit Marty
007b0cabf2 Add a few TUs 2020-01-28 22:43:10 +01:00
Benoit Marty
b2338dfcd3 Make the TU passes 2020-01-28 22:35:40 +01:00
Benoit Marty
6d7d4993a6 Add TUs for RainbowGenerator (not all passing) 2020-01-28 21:56:02 +01:00
ganfra
7c0f2d6e32 Test: fix import 2020-01-15 11:48:02 +01:00
Benoit Marty
8fc1400bab Improve user color computation and add unit tests 2019-12-14 10:38:50 +01:00
Benoit Marty
8422c6de17 Remove test sample 2019-10-24 17:21:19 +02:00
Benoit Marty
504009499f Rename im.vector.riotredesign to im.vector.riotx 2019-07-02 17:27:08 +02:00
Benoit Marty
9048a1dbbe Rename app to vector 2019-04-02 11:24:54 +02:00