mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Remove support for handling SPA calls within the app. (#5515)
* Remove support for handling SPA call links. They were a stop-gap solution whilst we were building support for embedded room calling. * Simplify ElementCallConfiguration now that there is only 1 type of call to handle. * Remove the unused overlayModule from NavigationRoomCoordinator.
This commit is contained in:
@@ -20,43 +20,6 @@ struct AppRouteURLParserTests {
|
||||
appRouteURLParser = AppRouteURLParser(appSettings: appSettings)
|
||||
}
|
||||
|
||||
@Test
|
||||
func elementCallRoutes() throws {
|
||||
let url = try #require(URL(string: "https://call.element.io/test"))
|
||||
|
||||
#expect(appRouteURLParser.route(from: url) == AppRoute.genericCallLink(url: url))
|
||||
|
||||
let customSchemeURL = try #require(URL(string: "io.element.call:/?url=https%3A%2F%2Fcall.element.io%2Ftest"))
|
||||
|
||||
#expect(appRouteURLParser.route(from: customSchemeURL) == AppRoute.genericCallLink(url: url))
|
||||
}
|
||||
|
||||
@Test
|
||||
func customDomainUniversalLinkCallRoutes() throws {
|
||||
let url = try #require(URL(string: "https://somecustomdomain.element.io/test"))
|
||||
|
||||
#expect(appRouteURLParser.route(from: url) == nil)
|
||||
}
|
||||
|
||||
@Test
|
||||
func customSchemeLinkCallRoutes() throws {
|
||||
let urlString = "https://somecustomdomain.element.io/test?param=123"
|
||||
let url = try #require(URL(string: urlString))
|
||||
|
||||
let encodedURLString = try #require(urlString.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed))
|
||||
|
||||
let customSchemeURL = try #require(URL(string: "io.element.call:/?url=\(encodedURLString)"))
|
||||
|
||||
#expect(appRouteURLParser.route(from: customSchemeURL) == AppRoute.genericCallLink(url: url))
|
||||
}
|
||||
|
||||
@Test
|
||||
func httpCustomSchemeLinkCallRoutes() throws {
|
||||
let customSchemeURL = try #require(URL(string: "io.element.call:/?url=http%3A%2F%2Fcall.element.io%2Ftest"))
|
||||
|
||||
#expect(appRouteURLParser.route(from: customSchemeURL) == nil)
|
||||
}
|
||||
|
||||
@Test
|
||||
func matrixUserURL() throws {
|
||||
let userID = "@test:matrix.org"
|
||||
|
||||
@@ -33,23 +33,6 @@ struct NavigationRootCoordinatorTests {
|
||||
assertCoordinatorsEqual(secondRootCoordinator, navigationRootCoordinator.rootCoordinator)
|
||||
}
|
||||
|
||||
@Test
|
||||
func overlay() {
|
||||
let rootCoordinator = SomeTestCoordinator()
|
||||
navigationRootCoordinator.setRootCoordinator(rootCoordinator)
|
||||
|
||||
let overlayCoordinator = SomeTestCoordinator()
|
||||
navigationRootCoordinator.setOverlayCoordinator(overlayCoordinator)
|
||||
|
||||
assertCoordinatorsEqual(rootCoordinator, navigationRootCoordinator.rootCoordinator)
|
||||
assertCoordinatorsEqual(overlayCoordinator, navigationRootCoordinator.overlayCoordinator)
|
||||
|
||||
navigationRootCoordinator.setOverlayCoordinator(nil)
|
||||
|
||||
assertCoordinatorsEqual(rootCoordinator, navigationRootCoordinator.rootCoordinator)
|
||||
#expect(navigationRootCoordinator.overlayCoordinator == nil)
|
||||
}
|
||||
|
||||
// MARK: - Dismissal Callbacks
|
||||
|
||||
@Test
|
||||
@@ -67,19 +50,6 @@ struct NavigationRootCoordinatorTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
func overlayDismissalCallback() async {
|
||||
let overlayCoordinator = SomeTestCoordinator()
|
||||
|
||||
await confirmation("Wait for callback") { confirm in
|
||||
navigationRootCoordinator.setOverlayCoordinator(overlayCoordinator) {
|
||||
confirm()
|
||||
}
|
||||
|
||||
navigationRootCoordinator.setOverlayCoordinator(nil)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func assertCoordinatorsEqual(_ lhs: CoordinatorProtocol?, _ rhs: CoordinatorProtocol?) {
|
||||
|
||||
Reference in New Issue
Block a user