56 Commits

Author SHA1 Message Date
Stefan Ceriu
dc6d7f2985
Integration test improvements (#3330)
* Send a message from integration tests and check that it doesn't show up in the app logs
* Increase photo library timeout

* Wait for image tapping to process

* Send a message using the rich text editor too

* Wait for the various pickers to finish loading

* Set all logs to `trace` in integration tests

* Close formatting options after sending the second message

* Make sure logs are actually sent to tracing and get redirected to the right file

* Switch from using a custom `trace` log configuration to the lowest level `TracingConfiguration` we support
2024-09-26 10:15:09 +03:00
Stefan Ceriu
6759a66533 Fixes #3146 - Remove the account migration screen 2024-09-09 12:41:28 +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
Stefan Ceriu
35803b479d Fix integration tests
- remove the invites flow as the button visibility depends on the number of invites and invites are moving to the room list anyway
2024-05-07 16:55:39 +03:00
Stefan Ceriu
5221e9fb5d Fix integration tests following room detail screens title changes. 2024-04-08 12:28:07 +03:00
Stefan Ceriu
a730689b1f Various reliability tweaks for the UI and integration tests. 2024-04-01 12:27:54 +03:00
Stefan Ceriu
a62c96f1c5
Onboarding flow coordinator and FTUE changes (#2578)
Fixes #2595, fixes #2594, fixes #2593, fixes #2592, fixes #2591
2024-03-21 14:01:23 +02:00
Doug
3ba34c0704
Final changes for Room Moderation (#2576)
* Add confirmation that the user would like to discard unsaved changes.

* Update string on permissions screen.

* Fix UI tests and update snapshots.

* Fix integration tests.

* Run periphery for Moderation feature.
2024-03-15 13:41:23 +00:00
Stefan Ceriu
5944550721
In preparation of FTUE changes... (#2556)
* Remove the welcome screen

* Allow the UserSessionFlowCoordinator to control the whole app hierarchy, not only its splitView

* Start using the new verification state listener

* Rename Onboarding to AuthenticationStart in preparation for the new OnboardingFlowCoordinator; update snapshots and tests

* Make the AuthenticationCoordinator a proper FlowCoordinator

* Add some padding around the authentication start screen report a problem button

* Bump the RustSDK to v1.1.49

* Only add bottom padding on the authentication start screen report a problem button
2024-03-13 11:24:48 +02:00
Doug
5f0c782ce2
Use xcresultparser in all workflows. (#2510)
* Fix integration tests.
2024-02-28 18:01:20 +00:00
Mauro
dc7f45a77f
removed unused button check (#2498) 2024-02-26 14:00:43 +01:00
Stefan Ceriu
db48656dda Tweak integration tests in an attempt to make them more reliable 2024-01-30 16:29:08 +02:00
Stefan Ceriu
fcf78e93e0
More integration test tweaks (#2321)
* Improve integration test timings and alert handing

* Add missing `receive(on: DispatchQueue.main` on the invites screen

* Wait for photo library to load

* Disable the preferForLoop swiftformat rule and fix a couple of new warnings

* Delay invites screen snapshotting after dispatch main queue addition
2024-01-11 16:35:03 +02:00
Stefan Ceriu
cf7e09e22e Various integration test tweaks following test homeserver and account change 2024-01-10 16:57:25 +02:00
Mauro
09fb5461e6
Removing dead code part 3 (#2264) 2023-12-19 12:12:16 +01:00
Doug
5586405c4f
Make the attachment menu an actual menu. (#2199)
There was a bug with the sheet/popover when overriding the colour scheme where the button renders in light mode when the app is in dark mode.
2023-12-05 11:14:16 +00:00
Stefan Ceriu
a8be8f839b Fix new swiftformat warnings: convert types used for hosting only static members into enums. 2023-11-13 13:47:14 +02:00
Alfonso Grillo
6898419211
Enable voiceover in timeline menu (#1907) 2023-10-16 14:00:36 +00:00
Doug
a2812525e4
Fix integration tests. (#1793)
There was a bug where another button existed with the same label.
2023-09-25 13:45:50 +01:00
Stefan Ceriu
97aa930852
Parse markdown and html from push notifications (#1688)
* Extract notification content building outside of the NotificationItemProxy. First step in a bigger refactoring of the NSE

* Import the attributed string buider into the NSE, sort `sources` imports

* Extract message event string building into the RoomMessageEventStringBuilder and reuse it building content for push notifications

* Cleanup

* Add changelog
2023-09-13 12:30:41 +03:00
aringenbach
c9962a4459
Add RTE formatting buttons (#1614)
* Add RTE formatting buttons

* Update UUID as stored properties

* Disable autocorrection on URL fields

* Alert ids to let

* Add ComposerToolbar_Previews

* Cleanup

* Cleanup

* Refactor FormatItem colors

* Fix composer layout issue

* Fix ui tests

* Nest ComposerToolbar A11y ids under RoomScreen

* Add composer reply ui tests

* Add UTs

---------

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>
2023-09-05 15:39:54 +00:00
Stefan Ceriu
08ca969526 Attempt to fix attachment media in the integration tests 2023-08-29 13:18:44 +03:00
Stefan Ceriu
78d1fd631b Fix integration tests, remove attachments camera picker step, avoid camera permissions 2023-08-29 11:31:27 +03:00
Stefan Ceriu
569620c52f Check more screens in the integration tests. Refactor flows 2023-08-28 11:41:37 +03:00
Stefan Ceriu
76c5693a59 Split up the tests into performance tests that are measured, and user flow tests that access more screens and aren't 2023-08-25 13:33:06 +03:00
Stefan Ceriu
8c522e7966 Fix MeasurementParser's signpost metrics following previous refactor 2023-08-24 18:36:46 +03:00
Stefan Ceriu
7712bb0082 Go through more screens in the integration tests 2023-08-24 18:36:46 +03:00
Doug
07651bd3f5
Specify ElementX target for coverage in integrations plan. (#1398) 2023-07-27 16:03:26 +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
Michael Kaye
28d241d39b
Stop asserting integration test run time & move to performance testing runner. (#1132)
* Stop asserting integration test run time.
* Move integration testing to the perf runner.
2023-06-23 13:44:33 +01:00
Doug
74b36ce870
Server Confirmation Screen (#959)
* Add ServerConfirmationScreen.
2023-05-30 10:31:18 +01: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
Stefan Ceriu
be8adb19b5
Structured logging (#831)
* Structured logging support

* Bump the SDK, fix breaking changes

* Enabled more logging of timeline diffs

* Keep only source file last path components in logs

* Bump the SDK, tweaks following code review
2023-04-25 14:48:20 +03:00
Stefan Ceriu
0ed69d5649 Add integration tests support for password saving, notifications and the analytics screen 2023-04-20 16:12:01 +03: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
Alfonso Grillo
f67207616b
Add test plans for all test targets (#740)
* Add UnitTests test plan

* Add IntegrationTests plan

* Add changelog.d file

* Update ElementX schema
2023-03-29 10:48:06 +00:00
Stefan Ceriu
50417ee8fc Fix integration tests 2023-02-16 14:17:10 +02:00
Stefan Ceriu
6333de802a Fixes #533 - Fix integration tests 2023-02-15 14:52:25 +02:00
Michael Kaye
a06365517c
Align accessibility IDs with elementX android (#567)
* Rename onboarding and login user/pass accessibility ids.

* Refactor remaining server change accessibility IDs

* Avoid accessibilityIdentifier spreading to all decorations on the textBox.

Required because otherwise there are multiple items tagged with the accessibilityId
which means we can't click on "the" item.

* Move all accessibility identifiers to `AccessibilityIdentifiers.swft`
- use same naming convention on all of them
- remove the unused ones
- fix build errors in integration tests and invalid identifiers (still broken until autodiscovery lands on rosa)

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-02-15 07:53:04 +02:00
Stefan Ceriu
8932e83929 Fixes #464 - Incorrect regex usage on extended grapheme clusters 2023-02-10 09:50:52 +02:00
Stefan Ceriu
ae8009d040
Various performance tweaks (#474)
* Store and reuse room list placeholder avatars and last messages

* Cache and reuse HomeScreenRooms

* Reduce RoomSummaryProvider diff collection time

* Promote more logs to info

* Slighty tweak RustTracing to make it easier to configure

* Move TimelineProvider and RoomTimelineController item processing to background queues

* Prevent the timeline from stopping an ogoing decelerating scroll when starting backpaginating
2023-01-20 14:40:23 +00:00
Stefan Ceriu
5b9d45e461 Increased fastlane xcode timeouts and integration login test expected duration (again!) 2022-12-20 12:45:00 +02:00
Stefan Ceriu
5b90f37f2e
Various UI test fixes (#370)
* Increase integration tests time limits again as they're still ocasionally failing

* Fixed NavigationRootCoordinator name in logs

* Refactor UI tests hierarchy and introduce new userFlowScreen

* Introduce a RoomTimelineControllerFactory so that it can be mocked in the UserFlow UI tests

* Start using a mock timeline controller for the UserSession flows

* Remove the WeakDictionary dependency and replce it with a plain NSMapTable in the BackgroundTaskService

* Allow multiple UITests screenshots per screen

* Prevent the view hierarchy changing when taking screenshots

* Add UserSessionScreen UI tests

* Fix label triaging workflow project identifier as per vector-im/element-ios/pull/7150

* Fix settings screen tests

* Fix roomPlainNoAvatar and roomEncryptedWithAvatar UI tests

* Fix modal server selection screen UI tests

* Fix bug report and login screen UI tests

* Fix text typing missing characters on UI tests

* Fix sliding sync configuration on integration tests

* Stop crashing if not finding a particular room through the MockClientProxy
2022-12-15 15:22:39 +02:00
Aleksandrs Proskurins
5ef53e9220
Added schema to target.yml for IntegrationTests (#358)
* Added schema to IntegrationTests

* Environment variables

* Removed captureScreenshotsAutomatically
2022-12-08 16:50:12 +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
Stefan Ceriu
fabb0bc95f
New timeline (#276) (#280)
* Fixes #276 - Rebuilt room timeline:
    - Removed the need for the ListCollectionViewAdapter
    - Rewrote the TimelineItemList without using introspection
    - Added ReversedScrollView for laying out items at the bottom/trailing
    - Rewrote TimelineProvider diffing through CollectionDifference (similar to the RoomSummaryProvider)
    - Added back `scrollDismissesKeyboard`  behavior
    - Various other tweaks and fixes
- Fixed various warnings:
    - removed async AttributedStringBuilder as AttributedString is non-sendable, made the RoomTimelineItemFactory synchronous
    - removed unused virtual timeline items
    - removed unused isOutgoing property from the FormattedBodyText
* Make TimelineItemContextMenuActions indentifiable and specify contextMenu identifiers
* Bump the matrix-rust-components-swift to v1.0.16-alpha
* Add changes file and changelog contribution guide
* Fix attributed string builder unit tests
2022-11-02 13:03:34 +02:00
Johannes Marbach
09b2f939ab
Fixes #225 - Use a properly defined user agent
* Set a proper user agent
* Add fallback when UA comes out nil
* Remove unused Bundle extension
* Return nil when asciification fails
* Add whitespace handling and further emoji test case
* Explicitly check if string is already in ASCII
* Rename factory to builder
* Use allSatisfy instead of reduce
* Use key path syntax
2022-10-28 17:11:10 +03:00
Stefan Ceriu
80babf1cd8
Xcode Cloud Support (#234)
* Removed now unnecessary code from alpha builds
* Add nightly build configuration
* Update ruby dependencies
* Stop changing the app name for PRs and Nightly, the icon is sufficient
* Add ITSAppUsesNonExemptEncryption flag as per https://developer.apple.com/documentation/bundleresources/information_property_list/itsappusesnonexemptencryption and https://stackoverflow.com/questions/35841117/missing-compliance-status-in-testflight
* Updated app groups to reflect various environments: production, nightly and PR. Remove keychain access group as they should be inferred from the access groups
2022-10-24 16:00:17 +03:00
Stefan Ceriu
aa5a2e0ee8
Integration tests: Increase XCTApplicationLaunchMetric limit (#241)
Increase XCTApplicationLaunchMetric limit. There's no reason to believe this was caused by any change of the app itself but on the Github infra. It started happening on the 4th of october with no code being commited between the 29th of September and the 14th of October.
2022-10-24 12:53:57 +03:00