Fixes vector-im/element-x-ios/issues/117 - Event permalink timeline action

* moved NSRegularExpression outside of the AttributedString builder into the MatrixEntityRegex
* fixed eventId v3 regex
* added permalink builders for users, room identifiers and aliases, and events
* added timeline item permalink contextual menu actions and error alerts
* added an app wide ServiceLocator and moved the top level userIndicatorPresenter to it.
* added URL constructor that takes a StaticString and returns an non-optional
* Include Unit and UI tests in the swiftlint search paths
This commit is contained in:
Stefan Ceriu
2022-09-12 21:34:53 +03:00
committed by GitHub
parent 42d263eec0
commit 223dd45629
25 changed files with 414 additions and 103 deletions

View File

@@ -33,21 +33,21 @@ class BugReportServiceTests: XCTestCase {
files: [])
XCTAssertFalse(result.reportUrl.isEmpty)
}
func testInitialStateWithRealService() throws {
let service = try BugReportService(withBaseUrlString: "https://www.example.com",
sentryEndpoint: "mock_sentry_dsn",
applicationId: "mock_app_id",
session: .mock)
let service = BugReportService(withBaseURL: URL(staticString: "https://www.example.com"),
sentryURL: URL(staticString: "https://1234@sentry.com/1234"),
applicationId: "mock_app_id",
session: .mock)
XCTAssertFalse(service.crashedLastRun)
}
@MainActor func testSubmitBugReportWithRealService() async throws {
let service = try BugReportService(withBaseUrlString: "https://www.example.com",
sentryEndpoint: "mock_sentry_dsn",
applicationId: "mock_app_id",
session: .mock)
let service = BugReportService(withBaseURL: URL(staticString: "https://www.example.com"),
sentryURL: URL(staticString: "https://1234@sentry.com/1234"),
applicationId: "mock_app_id",
session: .mock)
let result = try await service.submitBugReport(text: "i cannot send message",
includeLogs: true,
includeCrashLog: true,