mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
fix: remove rlement endpoints and links from the HealthChat
* fix(healthchat): switch off analytics, crash and bug reporting endpoints Upstream ships *.localhost placeholders in Secrets.swift and marks the file assume-unchanged; with analytics on, the Element Call widget was handed Element's own PostHog and Sentry. nil hides the analytics prompt, the Analytics and Report a problem entries until HealthChat runs its own services. * feat(healthchat): hide the Labs entry in settings * fix(healthchat): point Copyright and the analytics terms at healthchat.ch * docs(healthchat): add the 26.11.1 release notes * feat(healthchat): drop the Element help links * feat(healthchat): switch off location sharing * test(healthchat): skip the analytics suite without PostHog
This commit is contained in:
@@ -11,6 +11,7 @@ import AnalyticsEvents
|
||||
import PostHog
|
||||
import Testing
|
||||
|
||||
@Suite(.enabled(if: Secrets.postHogHost != nil && Secrets.postHogAPIKey != nil, "HealthChat ships without a PostHog configuration."))
|
||||
@MainActor
|
||||
final class AnalyticsTests {
|
||||
private let appSettings: AppSettings
|
||||
|
||||
@@ -104,9 +104,12 @@ final class BugReportServiceTests {
|
||||
@Test
|
||||
@MainActor
|
||||
func configurations() async throws {
|
||||
guard case let .url(initialURL) = userSettings.app.bugReportRageshakeURL.publisher.value else {
|
||||
Issue.record("Unexpected initial configuration.")
|
||||
return
|
||||
// HealthChat ships without a rageshake server (Secrets.rageshakeURL is nil), so the default
|
||||
// configuration is `.disabled`; the transitions below are exercised from remote values instead.
|
||||
let initialURL: URL? = if case let .url(url) = userSettings.app.bugReportRageshakeURL.publisher.value {
|
||||
url
|
||||
} else {
|
||||
nil
|
||||
}
|
||||
|
||||
let service = BugReportService(rageshakeURLPublisher: userSettings.app.bugReportRageshakeURL.publisher,
|
||||
@@ -114,7 +117,7 @@ final class BugReportServiceTests {
|
||||
sdkGitSHA: "1234",
|
||||
session: .mock,
|
||||
appHooks: AppHooks())
|
||||
#expect(service.isEnabled)
|
||||
#expect(service.isEnabled == (initialURL != nil))
|
||||
|
||||
userSettings.app.bugReportRageshakeURL.applyRemoteValue(.disabled)
|
||||
#expect(!service.isEnabled)
|
||||
@@ -137,6 +140,10 @@ final class BugReportServiceTests {
|
||||
#expect(customConfigurationResponse.reportURL == "https://bugs.server.net/123")
|
||||
|
||||
userSettings.app.bugReportRageshakeURL.reset()
|
||||
guard let initialURL else {
|
||||
#expect(!service.isEnabled)
|
||||
return
|
||||
}
|
||||
#expect(service.isEnabled)
|
||||
|
||||
let defaultConfigurationResponse = try await service.submitBugReport(bugReport, progressListener: progressSubject).get()
|
||||
|
||||
Reference in New Issue
Block a user