20 Commits

Author SHA1 Message Date
Stefan Ceriu
fb8a1f33d8 Converge on same naming convention for snapshots in the preview tests as in the UI tests. 2025-03-05 11:43:08 +02:00
Stefan Ceriu
0bcc59ae0a Bump the RustSDK to v25.01.15 and fix (most) concurrency sendability warnings in the generated mocks. 2025-01-15 14:59:54 +02:00
Stefan Ceriu
536f01abbd
Retrofit deferFulfillment onto snapshot tests. (#3641)
* Retrofit `deferFulfillment` onto snapshot tests.

* Convert a bunch of preview tests to the new fulfillment publisher

* Convert more tests

* Remove unneeded delays from the remaining tests

* Remove snapshotting delay option.
2024-12-20 15:30:59 +02:00
Doug
2a865ce5bf
Implement the save action when previewing media. (#3630)
* Implement the save action on the media preview.

* Update Compound and use the correct icon.

Also fixes an icon that has been renamed.

* Update the add to photo library usage description to match the designs.

* PR comments.
2024-12-17 16:35:51 +00:00
Doug
3514eba4a5 Split up the generated tests from the snapshotting code. 2024-09-23 16:25:49 +01:00
Stefan Ceriu
84a3ffc135 Require a specific snapshotting device minor OS version when running PreviewTests 2024-09-11 15:24:25 +03:00
Stefan Ceriu
2f6fea29f3
Replace Prefire with a very similar but simpler and more direct approach (#3232)
* Replace Prefire with a very similar but simpler and more direct approach

* Move PreviewTest snapshots to their new location (snapshotting default, mirrors UITests)

* Update acknowledgements

* Switch snapshot configuration extensions to a custom version

* Exclude snapshots from the PreviewTests target

* Fix acknowledgements

* Rename snapshotting preference keys

* Remove `skipPackagePluginValidation`
2024-09-09 15:07:41 +03:00
Stefan Ceriu
b8dea8ac4e Handle multithreaded access crashes on unit tests using generated mocks
- always dispatch receivedInvocations mutations on the main queue
2024-06-13 14:38:33 +03:00
Stefan Ceriu
53fc5df55b Generate mocks for all SDK classes and introduce a simple TimelineItemFactory test to try them out 2024-06-05 17:51:45 +03:00
Stefan Ceriu
7645971812 Attempt to improve unit test reliability:
- synchronize mock properties on the main queue
- sleep for longer when processing routes
- finish encoding before deallocating the keyed archiver
- wait for NotificationCenter notifications to be delivered
- change were we process remote notification permissions
2024-04-10 17:40:47 +03:00
Nicolas Mauri
e04a55eaef
Voice message recording enhancements (#2042)
* Use Combine to report AudioRecorder state changes

* AudioRecorder is now using AVAudioEngine instead of AVAudioRecorder

* Stop recording when audio configuration changes

* AudioRecorder error handling

* UnitTests

* Use Accelerate to calculate RMS
2023-11-08 10:19:28 +01:00
Doug
ebd9f4c916
Add App Lock settings screen (#1917) 2023-10-19 12:26:34 +01:00
David Langley
bf91e97c88
Remove Task.sleep from NotificationTests. (#1326)
- Add `weak` to mock variables called `delegate`
- Delete `UserNotificationCenterSpy` and use `UserNotificationCenterMock`
- Remove Task.sleep in favour of mock closures along with expectations/fulfillment.
2023-07-14 13:45:42 +01:00
Mauro
1be74e6e69
SDK Bump to 1.0.74 (#1059)
* testing improvements

* code improvements and sdk bump

* improved the stencil file

* improved the build sdk function

* code improvement

* also added the tearDown
2023-06-09 16:27:08 +00:00
Mauro
4b2aba9367
Tapping on user avatar/name in the timeline opens the room member details (#1020)
* Implementation completed

* changelog

* code improvement

* Apply suggestions from code review

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>

* pr suggestions

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-06-06 08:46:04 +00:00
Mauro
088ca622a1
Generating SDK Mocks through the usage of swift run tools generate-sdk-mocks (#982)
* basic implementation, that works for now only with the local SDK

* replaced a handmade mock with a generated mock
2023-05-30 09:48:55 +02:00
Nicolas Mauri
5b7ec6c9e2
Set up Analytics to track data per session (#780) 2023-04-18 07:33:32 +00:00
Mauro
61d42a24ba
Leave Room (#699)
* created the row in the view and the alert, and added the new function to the RoomProxy

* fixed an issue with the alert function

* handling the navigation

* fixed a bug with the detail coordinators being dismissed incorrectly when inside a stack

* implementation completed

* replaced UI screenshots

* added a test for the fixed bug of the coordinators

* trying to increase the wait time for the expectation

* improved the test

* improved the buttons UI

* uploading artifacts for unit tests

* added result bundle true

* improved the tests

* added a new test

* pr suggestions

* updating mock

* PR suggestions

* improved tests

* fixed UI tests

* pr should be ready now

* removed testing code

* reduced complexity

* fixed test

* added a an assert to the new test case

* more tests and messages cases

* pr comments addressed

* completed
2023-03-17 13:57:08 +00:00
Mauro
7544619a55
Updated setPusher function (#684)
* updated set_pusher function from the SDK

* this fixes a crash and allows for the navigation to work by using the threadIdentifier of the notification

* adding NCE target

* project setup completed with xcodegen

* no need for those ugly storyboards

* code improvement

* removing unused outlet

* mocks generated with the comment instead of the marker protocol

* updated stencil

* fixed unit tests

* updated swiftformat

* pr comments
2023-03-16 16:39:10 +01:00
Mauro
c67c4e362e
Auto-Mocking with Sourcery (#597)
* work in progress, was able to generate a mock for the RoomProxyProtocol, I'll try if I can swap the mock we have with this one

* removing swiftformat from generated

* added the disable of swiftlint directly into the .stencil

* testing if danger still complains

* improved the stencil

* session verification controller proxy using auto mockable

* BugReport mocks and tests added

* changelog

* fixing a typo

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* fix typo in the test

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* removing the Protocol word from the type if present

* using extension in place of a subclass

* removed unused imports

* improved the yielding code

* moved Sourcery files

* stencil master

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-03-08 17:04:31 +01:00