Add a service and flow coordinator for the LinkNewDevice feature. (#4859)
* Add a LinkNewDeviceService that exposes the SDK's grant QR code login methods. * Add a flow coordinator for linking a new device. Changes the presentation too.
This commit is contained in:
26
UITests/Sources/LinkNewDeviceTests.swift
Normal file
26
UITests/Sources/LinkNewDeviceTests.swift
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Copyright 2025 Element Creations Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
@MainActor
|
||||
class LinkNewDeviceTests: XCTestCase {
|
||||
enum Step {
|
||||
static let selectDevice = 1
|
||||
static let dismissed = 99
|
||||
}
|
||||
|
||||
func testFlow() async throws {
|
||||
let app = Application.launch(.linkNewDevice)
|
||||
try await app.assertScreenshot(step: Step.selectDevice)
|
||||
|
||||
let cancelButton = app.buttons[A11yIdentifiers.linkNewDeviceScreen.cancel]
|
||||
cancelButton.tap()
|
||||
|
||||
try await app.assertScreenshot(step: Step.dismissed)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9dbfadaaf361b79c626e35ab3cf5f42149e18de2538175e796a704cc21dc8411
|
||||
size 158261
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:da689e9ce1dc5b5fb809eda3e1886a9cec9d4b7c04271b9c8652a9893f910674
|
||||
size 115287
|
||||
Binary file not shown.
Reference in New Issue
Block a user