Add comprehensive unit tests for iOS and Android/KMM
This commit adds extensive unit test coverage for the entire application, including iOS ViewModels, design system, and shared Kotlin Multiplatform code. iOS Unit Tests (49 tests): - LoginViewModelTests: Authentication state and validation tests - ResidenceViewModelTests: Residence loading and state management - TaskViewModelTests: Task operations (cancel, archive, mark progress) - DocumentViewModelTests: Document/warranty CRUD operations - ContractorViewModelTests: Contractor management and favorites - DesignSystemTests: Color system, typography, spacing, radius, shadows Shared KMM Unit Tests (26 tests): - AuthViewModelTest: Login, register, verify email state initialization - TaskViewModelTest: Task state management verification - DocumentViewModelTest: Document state initialization tests - ResidenceViewModelTest: Residence state management tests - ContractorViewModelTest: Contractor state initialization tests Test Infrastructure: - Reorganized test files from iosAppUITests to MyCribTests - All shared KMM tests passing successfully (./gradlew test) - Tests focus on state initialization and core functionality - Ready for CI/CD integration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,13 @@
|
||||
remoteGlobalIDString = 1C07893C2EBC218B00392B46;
|
||||
remoteInfo = MyCribExtension;
|
||||
};
|
||||
1C685CD62EC5539000A9669B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 6A3E1D84F9F1A2FD92A75A6C /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D4ADB376A7A4CFB73469E173;
|
||||
remoteInfo = iosApp;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@@ -41,6 +48,7 @@
|
||||
1C07893F2EBC218B00392B46 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
|
||||
1C0789412EBC218B00392B46 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
|
||||
1C0789612EBC2F5400392B46 /* MyCribExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MyCribExtension.entitlements; sourceTree = "<group>"; };
|
||||
1C685CD22EC5539000A9669B /* MyCribTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyCribTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4B07E04F794A4C1CAA8CCD5D /* PhotoViewerSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoViewerSheet.swift; sourceTree = "<group>"; };
|
||||
96A3DDC05E14B3F83E56282F /* MyCrib.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyCrib.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
AD6CD907CA1045CBBC845D91 /* CompletionCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompletionCardView.swift; sourceTree = "<group>"; };
|
||||
@@ -72,6 +80,11 @@
|
||||
path = MyCrib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1C685CD32EC5539000A9669B /* MyCribTests */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
path = MyCribTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7A237E53D5D71D9D6A361E29 /* Configuration */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
path = Configuration;
|
||||
@@ -97,6 +110,13 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1C685CCF2EC5539000A9669B /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4C05B929016E54EA711D74CA /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -132,6 +152,7 @@
|
||||
7A237E53D5D71D9D6A361E29 /* Configuration */,
|
||||
E822E6B231E7783DE992578C /* iosApp */,
|
||||
1C0789432EBC218B00392B46 /* MyCrib */,
|
||||
1C685CD32EC5539000A9669B /* MyCribTests */,
|
||||
1C07893E2EBC218B00392B46 /* Frameworks */,
|
||||
FA6022B7B844191C54E57EB4 /* Products */,
|
||||
1C078A1B2EC1820B00392B46 /* Recovered References */,
|
||||
@@ -143,6 +164,7 @@
|
||||
children = (
|
||||
96A3DDC05E14B3F83E56282F /* MyCrib.app */,
|
||||
1C07893D2EBC218B00392B46 /* MyCribExtension.appex */,
|
||||
1C685CD22EC5539000A9669B /* MyCribTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -172,6 +194,29 @@
|
||||
productReference = 1C07893D2EBC218B00392B46 /* MyCribExtension.appex */;
|
||||
productType = "com.apple.product-type.app-extension";
|
||||
};
|
||||
1C685CD12EC5539000A9669B /* MyCribTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1C685CD82EC5539000A9669B /* Build configuration list for PBXNativeTarget "MyCribTests" */;
|
||||
buildPhases = (
|
||||
1C685CCE2EC5539000A9669B /* Sources */,
|
||||
1C685CCF2EC5539000A9669B /* Frameworks */,
|
||||
1C685CD02EC5539000A9669B /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
1C685CD72EC5539000A9669B /* PBXTargetDependency */,
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
1C685CD32EC5539000A9669B /* MyCribTests */,
|
||||
);
|
||||
name = MyCribTests;
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = MyCribTests;
|
||||
productReference = 1C685CD22EC5539000A9669B /* MyCribTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
D4ADB376A7A4CFB73469E173 /* iosApp */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 293B4412461C9407D900D07D /* Build configuration list for PBXNativeTarget "iosApp" */;
|
||||
@@ -204,12 +249,16 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = 1;
|
||||
LastSwiftUpdateCheck = 2600;
|
||||
LastSwiftUpdateCheck = 2610;
|
||||
LastUpgradeCheck = 1620;
|
||||
TargetAttributes = {
|
||||
1C07893C2EBC218B00392B46 = {
|
||||
CreatedOnToolsVersion = 26.0.1;
|
||||
};
|
||||
1C685CD12EC5539000A9669B = {
|
||||
CreatedOnToolsVersion = 26.1.1;
|
||||
TestTargetID = D4ADB376A7A4CFB73469E173;
|
||||
};
|
||||
D4ADB376A7A4CFB73469E173 = {
|
||||
CreatedOnToolsVersion = 16.2;
|
||||
};
|
||||
@@ -231,6 +280,7 @@
|
||||
targets = (
|
||||
D4ADB376A7A4CFB73469E173 /* iosApp */,
|
||||
1C07893C2EBC218B00392B46 /* MyCribExtension */,
|
||||
1C685CD12EC5539000A9669B /* MyCribTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -243,6 +293,13 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1C685CD02EC5539000A9669B /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
50827B76877E1E3968917892 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -282,6 +339,13 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1C685CCE2EC5539000A9669B /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3B506EC7E4A1032BA1E06A37 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -297,6 +361,11 @@
|
||||
target = 1C07893C2EBC218B00392B46 /* MyCribExtension */;
|
||||
targetProxy = 1C0789512EBC218D00392B46 /* PBXContainerItemProxy */;
|
||||
};
|
||||
1C685CD72EC5539000A9669B /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D4ADB376A7A4CFB73469E173 /* iosApp */;
|
||||
targetProxy = 1C685CD62EC5539000A9669B /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
@@ -398,6 +467,52 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1C685CD92EC5539000A9669B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = V3PF3M6B6U;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 26.1;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.t-t.MyCribTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
SWIFT_APPROACHABLE_CONCURRENCY = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyCrib.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MyCrib";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1C685CDA2EC5539000A9669B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = V3PF3M6B6U;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 26.1;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.t-t.MyCribTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
SWIFT_APPROACHABLE_CONCURRENCY = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyCrib.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MyCrib";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
468E4A6C96BEEFB382150D37 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReferenceAnchor = 7A237E53D5D71D9D6A361E29 /* Configuration */;
|
||||
@@ -563,6 +678,15 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1C685CD82EC5539000A9669B /* Build configuration list for PBXNativeTarget "MyCribTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1C685CD92EC5539000A9669B /* Debug */,
|
||||
1C685CDA2EC5539000A9669B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
293B4412461C9407D900D07D /* Build configuration list for PBXNativeTarget "iosApp" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
Reference in New Issue
Block a user