76 Commits

Author SHA1 Message Date
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
Mauro Romito
483d261504 removed clean process.environment 2023-05-09 11:56:48 +02:00
Mauro
542cefd703
Fix for the sender icon not being rendered in notifications sometimes (#862)
* fix for the sender icon not being rendered sometimes in notifications

* removing a line

* removing the environment every time we run a zsh command

* removed unused parameters that we already have stored in the notification

* changelog
2023-05-08 15:05:55 +00:00
Doug
5bb2ceedf4
Compound Fonts (#834)
* Use CompoundFonts in DesignKit (deprecate ElementFonts).

* Use compound fonts everywhere.

* Update Authentication snapshots.

* Update RoomMembersListScreen snapshots.

Delete unused snapshots.

* Fix tests.
2023-04-25 16:42:06 +01:00
Doug
50f674a111
Update template screen naming. (#824)
Update the script too.
2023-04-24 15:03:46 +01:00
Nicolas Mauri
5b7ec6c9e2
Set up Analytics to track data per session (#780) 2023-04-18 07:33:32 +00:00
Doug
d01349a60e
Use iOS localization handling for strings. (#803) 2023-04-17 14:58:39 +00:00
Alfonso Grillo
41994baa4f
Invites list (#787)
* Setup invites SS window

* Add invites label in the home screen

* Add empty invtes list

* Setup navigation to invites list

* Inject invitesSummaryProvider

* Show invites

* Add InviteCell

* Refine InviteCell UI

* Push invites

* Amend SS configuration

* Add inviter in RoomProxyProtocol

* Add Invite model type

* Improve InviteCell

* Fix media provider injection

* Refine InviteCell

* Refine invite cell

* Add invites feature flag

* Try different SS config for invites

* Regiester invites view in configureViewsPostInitialSync

* Cleanup

* Start tests

* Cleanup code

* Add changelog.d file

* Add tests

* Handle canonical alias

* Add InvitesListScreen previews

* Add localisations and improve UI tests

* Add reference screenshots

* Cleanup code

* Fix UT build errors

* Refactor InvitesList -> Invites

* Apply pr comments

* Remove reduntant @MainActor

* Naming cleanup

* Fix InvitesScreenCell.title

* Add accept/decline InvitesViewAction

* Revert Package.resolved

* Add warning in InvitesScreenCell

* Improve PlaceholderAvatarImage

* Record snapshots again

* Refactor Invite -> InvitesRoomDeatils

* Rename identifier in PlaceholderAvatarImage
2023-04-14 10:49:57 +00:00
Mauro
8403b07874
Fixing locheck tool (#788)
* fixing locheck

* fixing locheck tool

* Revert "fixing locheck tool"

This reverts commit 9bb3dbcd70d1ecbc62b4289623b5f9e584929997.

* locheck install

* using the original code to get the directory

* adding swiftgen to download strings

* setup project on ci

* added Strings.swift to the path

* adding String.swift
2023-04-12 10:03:11 +00:00
Doug
30a3efcf51
Fix project warnings (#791)
- Swift 5.8 warnings
- Run SwiftFormat 0.51.5
- Fix SwiftLint blanket_disable_command warnings. (Assets.swift will be fixed by SwiftGen).
2023-04-12 09:33:38 +00:00
Mauro
8a56649289
Translations workflow and tools (#768)
* Translations workflow and tools

* improved the name of the workflow

* need this commit to trigger the workflow for the first time

* swift tools can now run on CI

* only strings and stringsdict will be committed

* fixed a workflow issue

* starting the workflow to save it

* fixing downgrade issues

* fixing URL usage

* install localazy

* fixing add-paths typo

* downloaded strings

* removing on push trigger

* Update Tools/Sources/DownloadTranslations.swift

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

* Added locheck for string verification

* code formatting improvement

* Update Tools/Sources/Locheck.swift

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

* pr suggestion

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-04-05 19:36:51 +02:00
Alfonso Grillo
2439431287
Improve tests' reliability (#763)
* Create publisher extension into the unit test target

* Add ViewModelContext test extension

* Refactor BugReportViewModelTests

* Fix failing UTs

* Idea PublishedClosure

* Refactor RoomDetailsViewModelTests

* Replace more Task.yield/Task.sleep

* Move leaveRoom/ignore/unignore under the @MainActor

* Revert "Idea PublishedClosure"

This reverts commit 4ab25291041f0dbd99083baf9d95bc6647f1fd97.

* Make process(viewAction:) sync

* Refactor BugReportViewModel callback to a publisher

* Fix UTs

* Refactor ReportContentViewModel

* Fix ui test build error

* Try make sonar happy

* Empty commit

* Revert "Try make sonar happy"

This reverts commit 97804b19373a8f55f12174ccbf27f1fd8db583b7.

* Rename ui test identifier

* Cleanup

* Callback -> actions refactor

* Update template

* Add publisher in TemplateCoordinator

* Add env variable in IntegrationTests.xctestplan

* Add async sequence extension

* Amend integration test plan

* Remove env variable from target.yml

* Cleanup

* Fix failing UI tests
2023-04-05 17:07:12 +02:00
Mauro
d24ee73d15
Fixed translation bug when the locale contained the region (#765)
* Fixed the issue, added tests and italian translation

* changelog

* improved translation handling code and added more tests

* Update UnitTests/Sources/LocalizationTests.swift

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

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-04-05 10:36:02 +02:00
Doug
bb18ed1e91 Fix use of zsh in our tools. 2023-03-31 00:14:26 +02:00
Mauro
e1df5310b7
Ignore User UI (#737)
* generated files

* Revert "generated files"

This reverts commit f62c1dbcd9e505083ad4ff17532e2c054e253187.

* renaming files to RoomMembersList

* completed the renaming of the list files

* added generated files

* basic setup of the view and the mock

* added a new mock with a avatar

* share/copy link

* copyUserLink implemented

* removed unimplemented tests

* block user UI

* navigation to room member details added

* implemented but we require a sync from the Rust side

* adjusted some UI test screens

* alert for unblocking

* completed

* some tests

* changelog

* ignore user ui enabled

* loader inside the button when the request is fetching

* removed unused code

* blocking the button while loading

* improved the code

* changelog

* UI tests

* unit tests

* added collection concurrency kit

* Revert "added collection concurrency kit"

This reverts commit 499fbe129f73a75e903d9f4952fe2ad672930f04.

* replaced the asyncMap with a @MainActor builder function

* pr comments

* added localazy to setup

* sdk bump to 1.0.49
2023-03-28 09:00:40 +00:00
Doug
2b753b1135
Use strings from Localazy (#718)
* Adopt strings from Localazy.

* Remove all old Android strings.

* Disable german snapshot tests for now.

* Rebase and add latest strings.
2023-03-27 17:18:59 +00:00
Mauro
ca319e0bfe
Dpendencies update + improved dependencies version management (#721)
* updating dependencies

* minor version pinning

* update completed and also added a tool that checks for outdated swiftpm packages

* changelog

* DTCoreText uses exact version

* minor version for analytics

* pushing OutdatedPackages

* package.swift for the repo also using upToNextMinor

* fixing a typo

* Update Tools/Sources/OutdatedPackages.swift

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

* Update Tools/Sources/SetupProject.swift

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

* removing unused comment

* removed trailing comma

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-03-23 11:26:20 +01:00
Stefan Ceriu
05680a4696 Tools/BuildSDK - Expose option for selecting build profile, move targets to an enum. 2023-03-21 11:36:38 +02:00
Doug
4a7a861a4c
Add Localazy for Strings. (#706)
- Namespaced under L10n.
- Old strings moved to Legacy.strings[dict].
2023-03-17 16:17:45 +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
Doug
1a81768c62
Fix accent colour not being applied to Alerts etc. (#701) 2023-03-14 13:38:36 +00: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
Doug
21154c7eef
Disable broken UI Tests and remove navigation. (#577)
Add locale to signalling service name.
Type strings character by character.
Add a default test timeout of 1 minute.

* Directly set UI Tests screens as the root screen.

Speeds up test runs by removing scrolling and searching for buttons.

* Parallelise test runs from Xcode (not fastlane).

* Disable signalling based tests.
2023-02-14 16:25:24 +00:00
Stefan Ceriu
7ab64d4cb4
Project file removal (#569)
* Deleted project file

* Add back SPM Package.resolved + .gitignore

* Generate project file on release builds

* Converge on single CI setup scripts within `ci_scripts/ci_common.sh`

* Fix unit tests

* Use new `ci_common/setup_github_actions_environment` setup script on all workflows

* Move lfs validation check to the pre-commit hooks. Remove validate-lfs github actions workflow

* Fix integration tests workflow

* Tweaks following code review
2023-02-13 12:53:01 +00:00
Mauro
c8fb93e00d
Swiftformat on githooks + New swift run tools setup command (#563) 2023-02-10 15:04:00 +02:00
Doug
c8937505d7
Improvements to logging (#457)
* Use `.info` logging in most places.
* Remove old objc logging support.
* Fix table view controller.
* Make sure timeline item content isn't logged.
* Add tests.
2023-01-17 09:28:01 +00:00
Doug
30cb97ee4f
Add a tool to build MatrixRustSDK. (#369) 2022-12-15 09:35:00 +00:00
ismailgulek
232430ac95
Image viewer (#338)
* Resume other app's music when video playback finished

* Remove old media player

* Add `isModallyPresented` into the video player screen

* Create image viewer screen

* Add test screen identifier

* Display image viewer when message tapped

* Fix template script unit test path

* Tweaks on scaling

* Commit project file

* Add changelog

* Ignore safe areas on the file preview screen

* Display images in preview

* Remove image viewer screen

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-11-28 11:19:40 +00:00
Stefan Ceriu
9589c689c3 Remove unnecessary marks, they bring little value 2022-11-28 12:46:06 +02:00
Stefan Ceriu
1102580d6c
UI test fixes (#335)
* Remove status bars when running UITests
* Remove simulator OS versions from screenshot names, be less lenient with image diffing
* Rename UITests splash screen to onboarding
* Switch tests to Xcode 14.1, remove version names for used simulators and switched from iPhone 13 Pro Max to iPhone 14
* Fix ServiceLocator and fallbackLaguage for UI tests
* Drop snapshot diffing precision to 0.99 as 0.999 triggers false negatives
* Fix server selection UI tests after exposing the sliding sync proxy configuration
* Update reference screenshots
2022-11-24 10:35:00 +02:00
ismailgulek
d389ce7ad7
Notifications (#275) 2022-11-21 19:37:13 +03:00
Stefan Ceriu
2fd0491a18
SwiftUI NavigationController and UserNotificationControllers (#309)
* Fixes #286 - Adopted the new SwiftUI NavigationStack based NavigationController throughout the application
* Fixes #315 - Implemented new user notification components on top of SwiftUI and the new navigation flows
* Add home screen fade animation between skeletons and real rooms
* Bump the danger-swift version used on the CI and swiftlint with it
* Renamed Splash to Onboarding, Empty to Splash
2022-11-16 13:37:34 +00:00
Aleksandrs Proskurins
1c4dc89627
Update documentation files (#313)
* Updated md files

* Changelog

* Update CONTRIBUTING.md

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

* PR fixes

* Update README.md

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

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-11-15 11:49:13 +02:00
Stefan Ceriu
e979bd808b
UI test fixes (#235)
* Fix UI test simulator versions
* Pin the used Xcode version used by fastlane to `~> 14.0.1`, as simctl status_bar overrides don't work on the Xcode14.1 RC
* Update base screenshots, fix status bar script warning, fix settings screen test
2022-10-19 21:01:35 +03:00
Doug
0e90bff34c
Switch to Xcode 14 and handle the UICollectionView-backed List. (#229)
* Fix Timeline on Xcode 14/iOS 16

Raise requirement to iOS 16+
Reduce pagination jumping.
Sonarcloud fixes.
Fix verification test.
Adopt if let optional { syntax.

* Remove unused ScrollViewReader

The ScrollViewReader didn't appear to change the behaviour.

* Fix warnings on Run Scripts.

Run script build phase 'SwiftLint' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase.
2022-10-17 09:56:17 +01:00