* Initial plan
* Migrate 3 test files from XCTest to Swift Testing
- MediaUploadPreviewScreenViewModelTests: @MainActor @Suite struct with init(),
BundleFinder class for Bundle(for:), mutating test/setup functions,
[self] capture replacing [weak self] in closures
- NotificationManagerTests: @MainActor @Suite final class with init()/deinit,
expectation/fulfillment(of:) replaced with confirmation(...), test_ prefix stripped
- NotificationSettingsScreenViewModelTests: @MainActor @Suite struct with
init() throws, non-optional stored properties, test prefix stripped
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Migrate 3 XCTest files to Swift Testing
- NotificationSettingsEditScreenViewModelTests: @MainActor @Suite struct with init() throws, mutating test methods
- TimelineViewModelTests: @MainActor @Suite final class with init() async throws + deinit
- AttributedStringBuilderTests: @Suite struct with init() async throws
All XCT assertions replaced with #expect/#require/Issue.record
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Migrate 4 test files from XCTest to Swift Testing
- TimelineMediaPreviewViewModelTests: @Suite struct, mutating @Test funcs,
testLoadingItem renamed to loadingItem (called internally by other tests)
- ServerConfirmationScreenViewModelTests: @Suite final class with init()/deinit
- CompletionSuggestionServiceTests: @Suite struct with init()
- RoomFlowCoordinatorTests: @Suite final class with deinit
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Migrate 4 test files from XCTest to Swift Testing
- VoiceMessageRecorderTests: @Suite struct with init() async throws,
added BundleFinder class for Bundle lookup, migrated all assertions
- SpaceScreenViewModelTests: @Suite struct, private mutating setupViewModel,
all test funcs mutating, XCTestExpectation → confirmation
- RoomNotificationSettingsScreenViewModelTests: @Suite struct with
init() throws, cancellable tests marked mutating
- JoinRoomScreenViewModelTests: @Suite final class with init()/deinit,
XCTestExpectation → confirmation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Migrate 6 test files from XCTestCase to Swift Testing
Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
* Fix trailing blank line in RoomPollsHistoryScreenViewModelTests
Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
* Migrate 3 test files from XCTest to Swift Testing
- MediaUploadingPreprocessorTests: @Suite final class with init()/deinit,
removed executionTimeAllowance, XCTAssertEqual(accuracy:) → abs(Double)
- SecurityAndPrivacyScreenViewModelTests: @MainActor @Suite final class,
5 expectation+fulfillment → await confirmation(...)
- CreateRoomViewModelTests: @MainActor @Suite final class,
4 expectation+fulfillment → await confirmation(...)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Migrate RoomScreenViewModelTests and RoomDetailsScreenViewModelTests to Swift Testing
- Replace XCTest with Testing framework
- RoomScreenViewModelTests: final class with init() async throws + deinit
- RoomDetailsScreenViewModelTests: struct with init() and mutating funcs
- Convert XCT assertions to #expect / Issue.record
- Convert XCTestExpectation patterns to confirmation { confirm in }
- Strip 'test' prefix from all test function names
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Migrate ComposerToolbarViewModelTests from XCTest to Swift Testing
- Replace import XCTest with import Testing
- Convert XCTestCase class to @MainActor @Suite final class
- Replace setUp()/tearDown() with init()/deinit
- Strip 'test' prefix from all 41 test method names and add @Test
- Replace XCTAssert* with #expect()/#require()
- Replace try XCTUnwrap() with try #require()
- Convert expectation+wait patterns to deferFulfillment with PassthroughSubject
- Convert isInverted expectation to boolean flag checked after await
- Use deferFulfillment on $viewState for state-transition tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address comments with Copilot.
* Fix the failing tests.
* Fixed flaky tests (#5137)
resolved flaky tests
* Tweaks and fixes.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
* migrated a lot of unit tests to Swift Testing and added a new implementation for deferred fulfillment
more tests migration
Cleaned the code manually to establish some good patterns
more code improvements
some more code improvements
removed empty tests
update project
* more pr suggestions and cleanups
* removed the TestSetup pattern
* fixing claude not reusing tests
* pr suggestion + added indent rule to swiftformat so that we can prevent AIs to change that
* Revert "Address the real lifetime issue of the SDK's `Client` by making `Context.mediaProvider` weak. (#4466)"
This reverts commit b9d1558216.
* Better docs.
* Make the map tiler key optional.
* Make the bug report URL optional.
* Make the sentry URL optional.
* Make the analytics configuration optional and handle consent taking Sentry into account.
* Stop prompting users to report crashes when Sentry is disabled.
* refactored the suggestion item structure
to scale with the room pill
* Implemented a way for the rooms
to appear in the suggestions view for the RTE, however I need to add the pills to the composer and the compatibility with the plain text composer
* small code correction
* fix
* fixed a bug where the suggestion wasn't returning
the right suggestion type and the suggestion text properly
* implementation done!
also updated some tests, but we need more of them
* updated toolbar view model tests
* updated tests
* updated preview tests
* renamed the Avatars case for the suggestions
* Fix message completion trigger to work anywhere in the message
* Add tests for display suggestion in difference message positions
* Fix suggestion trigger could support multiple mention symbol
* Remove optional parameter type and tweak argument name to hide
* Optimize the suggestions trigger using regex
* Fix the cursor at wrong position after selected suggestion
* Modify the rawSuggestionText pass data in right way
* Modify mention symbol to use regex type
* Update ElementX/Sources/Screens/RoomScreen/ComposerToolbar/CompletionSuggestionService.swift
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
* Update generated mock
---------
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
* feat(crypto): Warn and block sending on verification violation
* fixup: Fix ComposerToolbar previews
* fixup! add ComposerToolBarViewModelTests for canSend
* add new preview tests for verification violations
* Use `deferFulfillment`s in the unit tests.
---------
Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
* Introduce a `MediaEventsTimelineFlowCoordinator`
* Update SDK API and architecture
* Add a feature flag, add translations
* Move the media events timeline presentation under the room flow coordinator state machine
* Rename `TimelineViewState.timelineViewState` of type `TimelineState` to `timelineState`
* Enabled SwiftLint's `trailing_closure` rule and fix the warnings.
* Add a badge for verified users/room members.
* Reorder subviews.
* Add a (disabled) button to verify other users.
* PR comments.
* Update the SDK.
* Adopt the SDK changes introduced in matrix-rust-sdk/pull/4100
---------
Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
* Wait longer on authentication flow tests.
* Move default perceptualPrecision value into the snapshot preferences.
* Delay snapshots *before* setting up the test.
* Reset the simulators on GitHub before running?
* Remove a test that is now handled by Rust.
* Fix a test that was yielding.
* Seemlesly switch for the RichTextEditor based message composer to the plain one depending on whether formatting options are enabled or not.
* Address PR comments
* Fixes#2803 - Add extra padding at the bottom of the composer suggestions list
* Update preview test snapshots
* Update UI test snapshots
* Move ComposerToolbar files to withing the RoomScreen folder (as it's not a screen on its own)
* Switch the plain composer to NSAttributedStrings
* Enable suggestions on the plain composer
* Introduce a new `MatrixUserDisplayName` attributed string attributed and use it for mention building
* Implement mention pill rendering and sending on the plain message composer
* Fix plain composer snapshot tests
* Fix broken formatting options layout
* Add clarifying comment.
* for now I am using a local RTE solution, need to fix one test
* fixed a test
* new rte version
* pr suggestions
* @room added to the suggestions
* removed empty space
* revert
* code improvement
* project updated
* package
* for now this can only work locally
* works
* added a test
* updated RTE
* revert package
* pr suggestion
* reverting package versions
* better naming
* created the list but I need to find a way to overlay it
* make the list able to have an intrinsic height
* best solution so far but does not work with expansion
* needs testing
* more scalable solution
* tests completed
* changelog
* injecting the media provider
* fix tests
* pr suggestions
* better testing