111 Commits

Author SHA1 Message Date
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
0d5f249196 Make SwiftFormat 0.54.4 happy. 2024-09-09 08:23:53 +03:00
Stefan Ceriu
664e87fe87
Switch license to AGPL (#3237)
* Switch license file to AGPL

* Update file copyright headers

* Update the default project file header
2024-09-06 16:34:30 +03:00
Stefan Ceriu
dc85cb10ed Stop running and publishing performance metrics to gh-pages 2024-09-05 13:49:56 +03:00
Doug
0c9da2cee9
Use SwiftPackageList to generate acknowledgements. (#3117) 2024-08-06 12:39:37 +01: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
Doug
2487895207
Adopt Rust's new sessionPath that replaces the basePath (#2903) 2024-06-06 18:35:57 +01: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
Doug
8da1752493 Update the tools to use swift-command-line-tools. 2024-05-15 11:32:45 +01:00
Doug
8e4f62d639 Fix SDK build script. 2024-05-14 11:06:46 +01:00
Doug
11b683601b
Update build-sdk tool. (#2835)
- Support new --target option on Rust allowing multiple targets to be built.
- Add new --device and --simulator shortcuts.
2024-05-14 10:48:52 +01: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
Stefan Ceriu
83f5ae9192
Prefire multiple devices (#2543)
* Update Prefire, setup multiple snapshot devices and languages
Squashed commits:
[28cb4ae6d] Switch to macos-14, iOS 17 and the iPhone 15 simulator
[080fc82cb] Update snapshots
[c874ca9c7] Bump Compound and Prefire, reduce perceptual precission to 0.98
[a59b8a54c] Update snapshots after adding iPad and pseudolanguage snapshotting
[f30cc3277] Setup multi-language snapshotting
[aeb11c7e7] Update prefire template, setup multiple snapshot devices

* Update ruby dependencies and fastlane plugins

* Bump Compound, switch back to the original prefire - version 2.0.4

* Remove preview test simulator version specifiers
2024-03-12 13:08:54 +02:00
Stefan Ceriu
7615e97c7f
Fixes #2486 - Implement blocked users management in the app settings 2024-02-28 13:21:54 +02:00
Mauro
d380c2de56
Removed unused context menu + some unused code cleaning (#2487) 2024-02-20 14:36:04 +01:00
Mauro
1a8fd7d8ff
Download SAS Strings Tool + Localised SAS emojis (#2409) 2024-01-31 13:29:52 +01:00
Stefan Ceriu
756b96f7ff
Translation workflow fix (#2271)
* Setup the translations workflow through ci_scripts
2023-12-19 19:50:04 +02:00
Stefan Ceriu
c7276a6524 Remove debug flag from brew installs 2023-12-19 15:56:55 +02:00
Stefan Ceriu
9dd601e321 Add verbose and debug flags to brew installs 2023-12-19 15:01:17 +02:00
Mauro
09fb5461e6
Removing dead code part 3 (#2264) 2023-12-19 12:12:16 +01:00
Doug
af562eabf7
Process InfoPlist.strings in Localazy config. (#2249)
Also merge the 2 configs into one using a group to download all strings.
2023-12-15 08:58:34 +00:00
Mauro
b9a6ebe03a
Periphery to detect dead code (#2227) 2023-12-12 10:17:15 +00:00
Doug
37d88e622c
Add UI tests for AppLockFlowCoordinator. (#2055)
* Add UITests for the App Lock flow.

* Add Notification Signal

Fix unwanted imports in UITests.
2023-11-10 15:38:54 +00: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
a4bf16bffa
Remove link LFS step in setup-project. (#1987) 2023-10-30 17:37:26 +00:00
Mauro
1ba6fb0a60
Suggestions view design improvements (#1955)
* snapshot tests

* making the padding of the composer internal

* setting the max width using the line fragment

* setting the max width using the line fragment

* Update ElementX/Sources/Screens/ComposerToolbar/View/CompletionSuggestionView.swift

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

* updated tests and pr suggestions

* better stencil

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-10-24 19:09:36 +02:00
Stefan Ceriu
68442d5cd9 Revert "Debug is no longer crashing as of matrix-rust-sdk/pull/2595, time to make it the default again so that debugging works properly"
This reverts commit eb9c69ce20a05ebabee7a9580e1a8a7f8cc3ebb9.
2023-10-23 17:09:58 +03:00
Doug
ebd9f4c916
Add App Lock settings screen (#1917) 2023-10-19 12:26:34 +01:00
Stefan Ceriu
eb9c69ce20 Debug is no longer crashing as of matrix-rust-sdk/pull/2595, time to make it the default again so that debugging works properly 2023-10-18 15:46:08 +03:00
Doug
56a9820ded
Add remaining iOS 17 introspections. (#1806)
* Update compound.

* Update Ruby gems.

* Skip smudging in Fastlane.

* Link Git LFS for Xcode in setup-project.
2023-09-29 17:29:27 +01:00
Mauro
8b69308e05 Prefire compatibility with Xcode 15 (#1773)
* xcode ready solution

* now the previews won't fail but get generated

* delay in some screens that require a waiting state (the bloom does not work in previews)

* better code

* longer delay

removed and redone lfs

readded as lfs
2023-09-21 11:02:50 +02:00
Mauro
9d91cd4fc0
Preview Tests (#1768)
* preview testing

* removed some views that are not really testabl in UnitTests and improved other tests
2023-09-20 17:33:31 +02:00
Mauro
341b177e23
Prefire basic implementation (#1743)
* prefire basic implementation

force the unit tests to run on iPhone 14

skipping plugin validation

archive artifacts

better workflow

removed the OS restriction

lfs

custom stencil

new test file

deleting

* git lfs

* lfs

* test

* customised the stencil to support our internal protocol

* for now we can remove the OS check from the stencil

* added a delay

* tests have been moved

* improvement

* recommit

* perceptual precision lowered

* updated snapshot testing and selected also iOS version

* added ios version control
2023-09-20 14:07:18 +02:00
Doug
b3a0680d64
Update App Icon (#1720)
Remove original TestFlight icon and unused iconizer.sh script.
2023-09-15 12:34:01 +01:00
Stefan Ceriu
a4e5e4f0ed
Switch callbacks to combine (#1710)
* #750 - Convert the SoftLogoutScreen to combine

* #750 - Convert the UserSessionFlowCoordinator to Combine

* #750 - Convert the AnalyticsPromptScreen to Combine

* #750 - Convert the LoginScreen to Combine

* #750 - Convert the ServerSelectionScreen to Combine

* #750 - Convert the EmojiPickerScreen to Combine

* #750 - Convert the HomeScreen to Combine

* #750 - Convert the MediaUploadPreviewScreen to Combine

* #750 - Convert the OnboardingScreen to Combine

* Rename `Onboarding` to `OnboardingScreen`

* #750 - Convert the ReportContentScreen to Combine

* #750 - Convert the RoomDetailsSscreen to Combine

* #750 - Convert the RoomMemberDetailsScreen to Combine

* #750 - Convert the RoomMembersListScreen to Combine

* #750 - Convert the SessionVerificationScreen to Combine

* #750 - Convert the SettingsScreen to Combine

* #750 - Convert the AdvancedSettingsScreen to Combine

* #750 - Convert the DeveloperOptionsScreen to Combine

* Fix the unit tests

* Use .sink action and the same cancellables constructor everywhere

* Cleanup cancellables when setting up tests
2023-09-14 12:53:33 +03:00
Stefan Ceriu
5eb82d3c88 Fix integration test performance parsing 2023-08-28 13:44:34 +03:00
Stefan Ceriu
6171d878b0 Signposting: split sync into initialSync and firstRooms which will track how long the very first sync takes separately from how long the first rooms appear in the list 2023-08-24 18:19:42 +03:00
Doug
c64fb44c96
Use Compound ListRow instead of Compound form styles. (#1484)
* Adopt ListRow Component.

* Update snapshots.

To check in future PR:
- Pseudo Bug Report Attach Screenshot label
- Bug Report screenshot padding (Use ListRow .custom?)
- De-bold Analytics & Notification Settings footer links
- Inline picker alignment perhaps?

* Changelog

* Update Compound.

* Use the label on the login screen.
2023-08-16 16:08:30 +01:00
Stefan Ceriu
6e5854abf9 Simplify the screen templates 2023-08-02 14:15:35 +03: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
Michael Kaye
5e97a4a0fa
Performance tests (#1301)
* Add signposts to performance tests.

- Update flow to include support for the migration screen.

* If the welcome screen shows, click on the button.

* Ensure a clean simulator each run.

* Add accessibility identifier for migration screen if required.

* Handle walking into the room and back out again.

* use iphone 14 pro to match what's used in xcode.

* Remove ApplicationTests as duplicated in LoginTests.

We measure app startup time in LoginTests as part of the flow - we may as well avoid spending 60s doing only that measurement in ApplicationTests

* Sleep 10s, the ui is otherwise showing up in random order.

* Revert "Remove ApplicationTests as duplicated in LoginTests."

This reverts commit 8670710315bcd0d6c3c3046f534b32b4c728b837.

* Update script to parse out correct values from results file.

* Allow cancellation of password prompt in any order.

* Remove test timeout, performance tests will always take a while.

* Adjust parsing further

* Remove ApplicationTests.

* Move to a more elegant way to wait for something to disappear.

* Linting.

* Fix unit tests.

---------

Co-authored-by: Doug <douglase@element.io>
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-07-11 10:32:24 +01:00
Stefan Ceriu
e65a2d2431
Various tweaks (#1129)
* Fixes #1121 - Hide the loading indicator after the logout task finishes

* Manually restart the sync only when entering the `error` state

* Use stopSync instead of the roomListService directly on client deinit

* Replace WeakClientProxyWrapper with callback based delegate

* Fix homescreen user avatar not automatically updating

* Replace default Build SDK profile with reldbg, which is fast but also doesn't crash

* Always show the loading indicator when the room list is not in a `running` state

* Implement delayed user indicator presentations through the normal API

* Fix the unit tests

* Replace UserIndicatorController delayedIndicators dictionary with a plain set
2023-06-22 15:04:20 +03:00
Doug
de0213abb2
Adopt Compound Colours (#1086)
* Delete deprecated font tokens.

* Migrate from primaryContent to textPrimary/iconPrimary.

* Migrate from links to textLinkExternal.

* Migrate from secondaryContent to textSecondary/iconSecondary.

* Migrate from accent to textActionPrimary.

- Some uses changed to textPrimary or iconPrimary as necessary.
- Some manual tints removed now that that Sentry is fixed.

* Migrate alert to textCriticalPrimary/iconCriticalPrimary.

* Migrate from brand to textActionAccent/iconAccentTertiary.

* Migrate from background to bgCanvasDefault or text/iconOnSolidPrimary

* Migrate system to bgSubtleSecondary.

* Remove ElementUIColors and obsolete migrated colours.

* Migrate tertiaryContent/quaternaryContent/quinaryContent to Compound.

* Migrate bubblesYou/bubblesNotYou to use Compound.

* Update Compound.
2023-06-16 10:49:13 +01:00
Mauro
0f358a6b2d
buildSDK.sh script, build the sdk without encountering target problems (#1063)
* Script that allows to build the sdk without any issue

* target independent solution

* Update CONTRIBUTING.md

* better more scalable solution

* Revert "Update CONTRIBUTING.md"

This reverts commit 5cc20019ad4277f5745f32eb9472e21bdb6f2160.

* Update Tools/Sources/BuildSDK.swift

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

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-06-12 09:11:53 +00: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
Michael Kaye
9b347c0ea4
Tweak parsing of output (#1058) 2023-06-09 11:22:10 +01:00
Michael Kaye
e8caacc85c
Parse output from IntegrationTests performance metrics (#1054)
* Parse output and leave as CSV on disk for later usage.
* Minor tweaks to step & file names

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-06-09 08:44:50 +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
Mauro
a5d555a33d
Fixing Tests for Xcode 14.3 (#888)
* settting macOS to 13, and let's runa test of... the tests

* I want the artifacts of the test, might give me some more insight in Xcode

* archive artifact

* trying a thing with the xcode version

* push notifications alert makes this test fail

* test improvement

* let's try with a very long time

* let's disable autocorrection

* sleep

* 1 seconds fixed 90% of the issue, 2 should fix 100%

* waiting some more time in flaky tests and updated the content of a test that was failing

* updated a screenshot test that had a notification

* this integration test is a bit so flaky increased the timing

* controlled delay waited a bit moe for the timeline to settle

* try await

* MainActor everywhere

* milliseconds fix

* trying with a bit more waiting time after the tap and a slow velocity for the swipe

* let's try waiting more time
2023-05-15 13:42:40 +00:00