mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Add a dedicated target for SDK mocks to avoid type name conflicts on the generated code.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
extension AuthenticationClientFactoryMock {
|
||||
struct Configuration {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import Combine
|
||||
import Foundation
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
struct ClientProxyMockConfiguration {
|
||||
var homeserver = ""
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
struct NotificationItemProxyMockConfiguration {
|
||||
var event: NotificationEvent? = {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import Combine
|
||||
import Foundation
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
enum RoomSummaryProviderMockConfigurationState {
|
||||
case loading
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
extension ClientSDKMock {
|
||||
struct Configuration {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
import Foundation
|
||||
import LoremSwiftum
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
struct EventTimelineItemSDKMockConfiguration {
|
||||
var eventID: String = UUID().uuidString
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
extension GrantLoginWithQrCodeHandlerSDKMock {
|
||||
struct Configuration {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
extension IdentityResetHandleSDKMock {
|
||||
struct Configuration { }
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
extension LeaveSpaceHandleSDKMock {
|
||||
struct Configuration {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
import Combine
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
extension SpaceServiceProxyMock {
|
||||
struct Configuration {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
import Combine
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
@MainActor
|
||||
class AutoUpdatingTimelineItemProviderMock: TimelineItemProvider {
|
||||
|
||||
@@ -153,6 +153,10 @@ struct HomeScreenInviteCell: View {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
struct HomeScreenInviteCell_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View {
|
||||
VStack(spacing: 0) {
|
||||
|
||||
@@ -97,6 +97,10 @@ struct HomeScreenKnockedCell: View {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
struct HomeScreenKnockedCell_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View {
|
||||
ScrollView {
|
||||
|
||||
@@ -184,6 +184,10 @@ private extension View {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
struct HomeScreenRoomCell_Previews: PreviewProvider, TestablePreview {
|
||||
static let summaryProviderGeneric = RoomSummaryProviderMock(.init(state: .loaded(.mockRooms)))
|
||||
static let genericRooms = summaryProviderGeneric.roomListPublisher.value.compactMap(mockRoom)
|
||||
|
||||
@@ -97,6 +97,8 @@ struct LinkNewDeviceScreen: View {
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
struct LinkNewDeviceScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static let viewModel = makeViewModel(mode: .readyToLink(isGeneratingCode: false))
|
||||
static let generatingViewModel = makeViewModel(mode: .readyToLink(isGeneratingCode: true))
|
||||
|
||||
@@ -117,6 +117,7 @@ struct LeaveSpaceView: View {
|
||||
// MARK: - Previews
|
||||
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
struct LeaveSpaceView_Previews: PreviewProvider, TestablePreview {
|
||||
static let manyViewModel = makeViewModel(mode: .manyRooms)
|
||||
|
||||
@@ -221,6 +221,7 @@ targets:
|
||||
dependencies:
|
||||
- target: NSE
|
||||
- target: ShareExtension
|
||||
- target: MatrixRustSDKMocks
|
||||
- package: MatrixRustSDK
|
||||
embed: true
|
||||
- package: Compound
|
||||
|
||||
Reference in New Issue
Block a user