Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Add autofill matching unit tests to iOS Xcode project

Leendert de Borst5b3f36936a16
diff --git a/apps/browser-extension/src/entrypoints/contentScript/__tests__/Filter.test.ts b/apps/browser-extension/src/entrypoints/contentScript/__tests__/Filter.test.ts
index 10baed347..a836a1618 100644
--- a/apps/browser-extension/src/entrypoints/contentScript/__tests__/Filter.test.ts
+++ b/apps/browser-extension/src/entrypoints/contentScript/__tests__/Filter.test.ts
@@ -230,7 +230,7 @@ describe('Filter - Credential URL Matching', () => {
function createSharedTestCredentials(): Credential[] {
return [
createTestCredential('Gmail', 'https://gmail.com', '[email protected]'),
- createTestCredential('Google', 'https://google.com', '[email protected]'),
+ createTestCredential('Google', 'https://google.com', '[email protected]'),
createTestCredential('Coolblue', 'https://www.coolblue.nl', '[email protected]'),
createTestCredential('Amazon', 'https://amazon.com', '[email protected]'),
createTestCredential('Coolblue App', 'com.coolblue.app', '[email protected]'),
diff --git a/apps/mobile-app/ios/AliasVault.xcodeproj/project.pbxproj b/apps/mobile-app/ios/AliasVault.xcodeproj/project.pbxproj
index 9fe2e720f..0b9821052 100644
--- a/apps/mobile-app/ios/AliasVault.xcodeproj/project.pbxproj
+++ b/apps/mobile-app/ios/AliasVault.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ 0EF28D873AC559A33A3B178F /* libPods-VaultUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A795EF04BF70F714FA4B0E5 /* libPods-VaultUITests.a */; };
1381C2F6D317F2404928BA59 /* libPods-VaultUI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C32D89DCBA51D7C8CDE51DD2 /* libPods-VaultUI.a */; };
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
@@ -22,6 +23,7 @@
CE48FCEC2DBE939A00E5E3D6 /* VaultModels.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEE482AA2DBE8EFE00F4A367 /* VaultModels.framework */; };
CE48FD372DBE95EB00E5E3D6 /* VaultModels.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEE482AA2DBE8EFE00F4A367 /* VaultModels.framework */; };
CE48FD632DBEA3B800E5E3D6 /* VaultUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEE4816A2DBE8AC800F4A367 /* VaultUI.framework */; };
+ CE59C7632E4F47FE0024A246 /* VaultUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEE4816A2DBE8AC800F4A367 /* VaultUI.framework */; };
CE73B3A02DFC8A0C0081B6CB /* AppIcon.icon in Resources */ = {isa = PBXBuildFile; fileRef = CE73B39F2DFC8A0C0081B6CB /* AppIcon.icon */; };
CE9A58FC2DBA982100CB0A4C /* RCTNativeVaultManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = CE9A58FB2DBA982100CB0A4C /* RCTNativeVaultManager.mm */; };
CE9A5A022DBAAE5000CB0A4C /* RCTNativeVaultManager.h in Sources */ = {isa = PBXBuildFile; fileRef = CE9A58FA2DBA982100CB0A4C /* RCTNativeVaultManager.h */; };
@@ -49,6 +51,13 @@
remoteGlobalIDString = CEE481692DBE8AC800F4A367;
remoteInfo = VaultUI;
};
+ CE59C7642E4F47FE0024A246 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = CEE481692DBE8AC800F4A367;
+ remoteInfo = VaultUI;
+ };
CEE480932DBE86DD00F4A367 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
@@ -138,6 +147,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 017AFF1289CCDC7514CC84DA /* Pods-VaultUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VaultUITests.release.xcconfig"; path = "Target Support Files/Pods-VaultUITests/Pods-VaultUITests.release.xcconfig"; sourceTree = "<group>"; };
+ 0185B497D6794232013782D4 /* Pods-VaultUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VaultUITests.debug.xcconfig"; path = "Target Support Files/Pods-VaultUITests/Pods-VaultUITests.debug.xcconfig"; sourceTree = "<group>"; };
09DFCC3CBA13D19073CBCC7F /* Pods-VaultStoreKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VaultStoreKit.debug.xcconfig"; path = "Target Support Files/Pods-VaultStoreKit/Pods-VaultStoreKit.debug.xcconfig"; sourceTree = "<group>"; };
0E23F2188770B15FCBFEBC57 /* libPods-AliasVault.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AliasVault.a"; sourceTree = BUILT_PRODUCTS_DIR; };
13B07F961A680F5B00A75B9A /* AliasVault.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AliasVault.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -158,6 +169,7 @@
83C4F2FD713FB96C56BB0D24 /* Pods-VaultStoreTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VaultStoreTests.release.xcconfig"; path = "Target Support Files/Pods-VaultStoreTests/Pods-VaultStoreTests.release.xcconfig"; sourceTree = "<group>"; };
962DE0FB93C9458BAFEEED60 /* AliasVault-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "AliasVault-Bridging-Header.h"; path = "AliasVault/AliasVault-Bridging-Header.h"; sourceTree = "<group>"; };
9668BBEEC62508A81A7214E2 /* Pods-PreviewHost.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PreviewHost.release.xcconfig"; path = "Target Support Files/Pods-PreviewHost/Pods-PreviewHost.release.xcconfig"; sourceTree = "<group>"; };
+ 9A795EF04BF70F714FA4B0E5 /* libPods-VaultUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VaultUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
9E9AD944E3A0F270C797F5DD /* libPods-VaultStoreKitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VaultStoreKitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
A9E70CCF7AAA4E05B57CCCC4 /* Pods-VaultStoreKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VaultStoreKitTests.debug.xcconfig"; path = "Target Support Files/Pods-VaultStoreKitTests/Pods-VaultStoreKitTests.debug.xcconfig"; sourceTree = "<group>"; };
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = AliasVault/SplashScreen.storyboard; sourceTree = "<group>"; };
@@ -170,6 +182,7 @@
C87FA54AAFE121325F22CDDE /* Pods-PreviewHost.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PreviewHost.debug.xcconfig"; path = "Target Support Files/Pods-PreviewHost/Pods-PreviewHost.debug.xcconfig"; sourceTree = "<group>"; };
CE26D68C2DA7FCD2006DC04D /* VaultManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VaultManager.swift; sourceTree = "<group>"; };
CE3AE2B02DC7ACD700E7745E /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = "<group>"; };
+ CE59C75F2E4F47FD0024A246 /* VaultUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VaultUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
CE73B39F2DFC8A0C0081B6CB /* AppIcon.icon */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = AppIcon.icon; sourceTree = "<group>"; };
CE9A58FA2DBA982100CB0A4C /* RCTNativeVaultManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTNativeVaultManager.h; sourceTree = "<group>"; };
CE9A58FB2DBA982100CB0A4C /* RCTNativeVaultManager.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RCTNativeVaultManager.mm; sourceTree = "<group>"; };
@@ -188,7 +201,7 @@
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
- CEE9098F2DA548C7008D568F /* Exceptions for "Autofill" folder in "Autofill" target */ = {
+ CEE9098F2DA548C7008D568F /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
@@ -198,62 +211,12 @@
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
- CEE480882DBE86DC00F4A367 /* VaultStoreKit */ = {
- isa = PBXFileSystemSynchronizedRootGroup;
- exceptions = (
- );
- explicitFileTypes = {
- };
- explicitFolders = (
- );
- path = VaultStoreKit;
- sourceTree = "<group>";
- };
- CEE480972DBE86DD00F4A367 /* VaultStoreKitTests */ = {
- isa = PBXFileSystemSynchronizedRootGroup;
- exceptions = (
- );
- explicitFileTypes = {
- };
- explicitFolders = (
- );
- path = VaultStoreKitTests;
- sourceTree = "<group>";
- };
- CEE4816B2DBE8AC800F4A367 /* VaultUI */ = {
- isa = PBXFileSystemSynchronizedRootGroup;
- exceptions = (
- );
- explicitFileTypes = {
- };
- explicitFolders = (
- );
- path = VaultUI;
- sourceTree = "<group>";
- };
- CEE482AB2DBE8EFE00F4A367 /* VaultModels */ = {
- isa = PBXFileSystemSynchronizedRootGroup;
- exceptions = (
- );
- explicitFileTypes = {
- };
- explicitFolders = (
- );
- path = VaultModels;
- sourceTree = "<group>";
- };
- CEE909812DA548C7008D568F /* Autofill */ = {
- isa = PBXFileSystemSynchronizedRootGroup;
- exceptions = (
- CEE9098F2DA548C7008D568F /* Exceptions for "Autofill" folder in "Autofill" target */,
- );
- explicitFileTypes = {
- };
- explicitFolders = (
- );
- path = Autofill;
- sourceTree = "<group>";
- };
+ CE59C7602E4F47FD0024A246 /* VaultUITests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VaultUITests; sourceTree = "<group>"; };
+ CEE480882DBE86DC00F4A367 /* VaultStoreKit */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VaultStoreKit; sourceTree = "<group>"; };
+ CEE480972DBE86DD00F4A367 /* VaultStoreKitTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VaultStoreKitTests; sourceTree = "<group>"; };
+ CEE4816B2DBE8AC800F4A367 /* VaultUI */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VaultUI; sourceTree = "<group>"; };
+ CEE482AB2DBE8EFE00F4A367 /* VaultModels */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VaultModels; sourceTree = "<group>"; };
+ CEE909812DA548C7008D568F /* Autofill */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (CEE9098F2DA548C7008D568F /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Autofill; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */
@@ -268,6 +231,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ CE59C75C2E4F47FD0024A246 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ CE59C7632E4F47FE0024A246 /* VaultUI.framework in Frameworks */,
+ 0EF28D873AC559A33A3B178F /* libPods-VaultUITests.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
CEE480842DBE86DC00F4A367 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -348,6 +320,7 @@
456ACD01FF420AE789429A59 /* libPods-VaultStoreTests.a */,
C32D89DCBA51D7C8CDE51DD2 /* libPods-VaultUI.a */,
9E9AD944E3A0F270C797F5DD /* libPods-VaultStoreKitTests.a */,
+ 9A795EF04BF70F714FA4B0E5 /* libPods-VaultUITests.a */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -371,6 +344,7 @@
CEE480972DBE86DD00F4A367 /* VaultStoreKitTests */,
CEE4816B2DBE8AC800F4A367 /* VaultUI */,
CEE482AB2DBE8EFE00F4A367 /* VaultModels */,
+ CE59C7602E4F47FD0024A246 /* VaultUITests */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
D65327D7A22EEC0BE12398D9 /* Pods */,
@@ -390,6 +364,7 @@
CEE480912DBE86DD00F4A367 /* VaultStoreKitTests.xctest */,
CEE4816A2DBE8AC800F4A367 /* VaultUI.framework */,
CEE482AA2DBE8EFE00F4A367 /* VaultModels.framework */,
+ CE59C75F2E4F47FD0024A246 /* VaultUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -439,6 +414,8 @@
1A927300CBD3BFE2B7A3CA37 /* Pods-VaultUI.release.xcconfig */,
A9E70CCF7AAA4E05B57CCCC4 /* Pods-VaultStoreKitTests.debug.xcconfig */,
B18F3A7E310165C29C8C6DFE /* Pods-VaultStoreKitTests.release.xcconfig */,
+ 0185B497D6794232013782D4 /* Pods-VaultUITests.debug.xcconfig */,
+ 017AFF1289CCDC7514CC84DA /* Pods-VaultUITests.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@@ -507,6 +484,28 @@
productReference = 13B07F961A680F5B00A75B9A /* AliasVault.app */;
productType = "com.apple.product-type.application";
};
+ CE59C75E2E4F47FD0024A246 /* VaultUITests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = CE59C7682E4F47FE0024A246 /* Build configuration list for PBXNativeTarget "VaultUITests" */;
+ buildPhases = (
+ 2E8B1031EFFD64F99242A5C1 /* [CP] Check Pods Manifest.lock */,
+ CE59C75B2E4F47FD0024A246 /* Sources */,
+ CE59C75C2E4F47FD0024A246 /* Frameworks */,
+ CE59C75D2E4F47FD0024A246 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ CE59C7652E4F47FE0024A246 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ CE59C7602E4F47FD0024A246 /* VaultUITests */,
+ );
+ name = VaultUITests;
+ productName = VaultUITests;
+ productReference = CE59C75F2E4F47FD0024A246 /* VaultUITests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
CEE480862DBE86DC00F4A367 /* VaultStoreKit */ = {
isa = PBXNativeTarget;
buildConfigurationList = CEE4809E2DBE86DD00F4A367 /* Build configuration list for PBXNativeTarget "VaultStoreKit" */;
@@ -626,12 +625,15 @@
83CBB9F71A601CBA00E9B192 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastSwiftUpdateCheck = 1630;
+ LastSwiftUpdateCheck = 1640;
LastUpgradeCheck = 1130;
TargetAttributes = {
13B07F861A680F5B00A75B9A = {
LastSwiftMigration = 1250;
};
+ CE59C75E2E4F47FD0024A246 = {
+ CreatedOnToolsVersion = 16.4;
+ };
CEE480862DBE86DC00F4A367 = {
CreatedOnToolsVersion = 16.3;
};
@@ -659,6 +661,10 @@
en,
Base,
nl,
+ fr,
+ es,
+ uk,
+ de,
);
mainGroup = 83CBB9F61A601CBA00E9B192;
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
@@ -670,6 +676,7 @@
CEE480862DBE86DC00F4A367 /* VaultStoreKit */,
CEE480902DBE86DD00F4A367 /* VaultStoreKitTests */,
CEE481692DBE8AC800F4A367 /* VaultUI */,
+ CE59C75E2E4F47FD0024A246 /* VaultUITests */,
CEE482A92DBE8EFE00F4A367 /* VaultModels */,
);
};
@@ -688,6 +695,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ CE59C75D2E4F47FD0024A246 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
CEE480852DBE86DC00F4A367 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -784,6 +798,28 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AliasVault/Pods-AliasVault-resources.sh\"\n";
showEnvVarsInLog = 0;
};
+ 2E8B1031EFFD64F99242A5C1 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-VaultUITests-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
5DC7F827F296E839DC4DE7BD /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -1005,6 +1041,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ CE59C75B2E4F47FD0024A246 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
CEE480832DBE86DC00F4A367 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -1048,6 +1091,11 @@
target = CEE481692DBE8AC800F4A367 /* VaultUI */;
targetProxy = CE48FD652DBEA3B800E5E3D6 /* PBXContainerItemProxy */;
};
+ CE59C7652E4F47FE0024A246 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = CEE481692DBE8AC800F4A367 /* VaultUI */;
+ targetProxy = CE59C7642E4F47FE0024A246 /* PBXContainerItemProxy */;
+ };
CEE480942DBE86DD00F4A367 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = CEE480862DBE86DC00F4A367 /* VaultStoreKit */;
@@ -1215,10 +1263,7 @@
LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\"";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
- OTHER_LDFLAGS = (
- "$(inherited)",
- " ",
- );
+ OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
@@ -1272,10 +1317,7 @@
);
LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\"";
MTL_ENABLE_DEBUG_INFO = NO;
- OTHER_LDFLAGS = (
- "$(inherited)",
- " ",
- );
+ OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
@@ -1283,6 +1325,75 @@
};
name = Release;
};
+ CE59C7662E4F47FE0024A246 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 0185B497D6794232013782D4 /* Pods-VaultUITests.debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ DEVELOPMENT_TEAM = 8PHW4HN3F7;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu17;
+ GENERATE_INFOPLIST_FILE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.6;
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+ MARKETING_VERSION = 1.0;
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+ MTL_FAST_MATH = YES;
+ OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
+ PRODUCT_BUNDLE_IDENTIFIER = net.aliasvault.app.VaultUITests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
+ SWIFT_EMIT_LOC_STRINGS = NO;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ CE59C7672E4F47FE0024A246 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 017AFF1289CCDC7514CC84DA /* Pods-VaultUITests.release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CODE_SIGN_STYLE = Automatic;
+ COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 1;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEVELOPMENT_TEAM = 8PHW4HN3F7;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu17;
+ GENERATE_INFOPLIST_FILE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.6;
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+ MARKETING_VERSION = 1.0;
+ MTL_FAST_MATH = YES;
+ OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
+ PRODUCT_BUNDLE_IDENTIFIER = net.aliasvault.app.VaultUITests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_EMIT_LOC_STRINGS = NO;
+ SWIFT_VERSION = 5.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Release;
+ };
CEE4809F2DBE86DD00F4A367 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 09DFCC3CBA13D19073CBCC7F /* Pods-VaultStoreKit.debug.xcconfig */;
@@ -1765,6 +1876,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ CE59C7682E4F47FE0024A246 /* Build configuration list for PBXNativeTarget "VaultUITests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ CE59C7662E4F47FE0024A246 /* Debug */,
+ CE59C7672E4F47FE0024A246 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
CEE4809E2DBE86DD00F4A367 /* Build configuration list for PBXNativeTarget "VaultStoreKit" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/apps/mobile-app/ios/Podfile b/apps/mobile-app/ios/Podfile
index 639fa04ad..8fb3f05b0 100644
--- a/apps/mobile-app/ios/Podfile
+++ b/apps/mobile-app/ios/Podfile
@@ -92,3 +92,7 @@ end
target 'VaultUI' do
pod 'Macaw', '~> 0.9.7'
end
+
+target 'VaultUITests' do
+ pod 'Macaw', '~> 0.9.7'
+end
diff --git a/apps/mobile-app/ios/Podfile.lock b/apps/mobile-app/ios/Podfile.lock
index 08e567507..558e16850 100644
--- a/apps/mobile-app/ios/Podfile.lock
+++ b/apps/mobile-app/ios/Podfile.lock
@@ -2679,6 +2679,6 @@ SPEC CHECKSUMS:
SWXMLHash: dd733a457e9c4fe93b1538654057aefae4acb382
Yoga: feb4910aba9742cfedc059e2b2902e22ffe9954a
-PODFILE CHECKSUM: e97319487cdfeb6c1e66b945d3e9c4bb0468c12d
+PODFILE CHECKSUM: 9254f97341788b3995b61300689a0fff1692f333
COCOAPODS: 1.16.2
diff --git a/apps/mobile-app/ios/VaultUITests/CredentialFilterTests.swift b/apps/mobile-app/ios/VaultUITests/CredentialFilterTests.swift
new file mode 100644
index 000000000..61aae1709
--- /dev/null
+++ b/apps/mobile-app/ios/VaultUITests/CredentialFilterTests.swift
@@ -0,0 +1,284 @@
+import XCTest
+@testable import VaultUI
+@testable import VaultModels
+
+final class CredentialFilterTests: XCTestCase {
+ private var testCredentials: [Credential] = []
+
+ override func setUp() {
+ super.setUp()
+
+ // Create test credentials using shared test data structure
+ testCredentials = createSharedTestCredentials()
+ }
+
+ override func tearDown() {
+ testCredentials.removeAll()
+ super.tearDown()
+ }
+
+ func testExactUrlMatch() {
+ let matches = filterCredentials(testCredentials, searchText: "www.coolblue.nl")
+
+ XCTAssertEqual(matches.count, 1)
+ XCTAssertEqual(matches.first?.service.name, "Coolblue")
+ }
+
+ func testBaseUrlMatch() {
+ let matches = filterCredentials(testCredentials, searchText: "https://gmail.com/signin")
+
+ XCTAssertEqual(matches.count, 1)
+ XCTAssertEqual(matches.first?.service.name, "Gmail")
+ }
+
+ func testRootDomainMatch() {
+ let matches = filterCredentials(testCredentials, searchText: "https://mail.google.com")
+
+ XCTAssertEqual(matches.count, 1)
+ XCTAssertEqual(matches.first?.service.name, "Google")
+ }
+
+ func testNoMatches() {
+ let matches = filterCredentials(testCredentials, searchText: "https://nonexistent.com")
+
+ XCTAssertTrue(matches.isEmpty)
+ }
+
+ // New comprehensive test cases
+ func testPartialUrlMatchWithFullUrl() {
+ // Test case: stored URL is "dumpert.nl", search with full URL
+ let matches = filterCredentials(testCredentials, searchText: "https://www.dumpert.nl")
+
+ XCTAssertEqual(matches.count, 1)
+ XCTAssertEqual(matches.first?.service.name, "Dumpert")
+ }
+
+ func testFullUrlMatchWithPartialUrl() {
+ // Test case: stored URL is full, search with partial
+ let matches = filterCredentials(testCredentials, searchText: "coolblue.nl")
+
+ XCTAssertEqual(matches.count, 1)
+ XCTAssertTrue(matches.contains { $0.service.name == "Coolblue" })
+ }
+
+ func testProtocolVariations() {
+ // Test that http and https variations match
+ let httpsMatches = filterCredentials(testCredentials, searchText: "https://github.com")
+ let httpMatches = filterCredentials(testCredentials, searchText: "http://github.com")
+ let noProtocolMatches = filterCredentials(testCredentials, searchText: "github.com")
+
+ XCTAssertEqual(httpsMatches.count, 1)
+ XCTAssertEqual(httpMatches.count, 1)
+ XCTAssertEqual(noProtocolMatches.count, 1)
+ XCTAssertEqual(httpsMatches.first?.service.name, "GitHub")
+ XCTAssertEqual(httpMatches.first?.service.name, "GitHub")
+ XCTAssertEqual(noProtocolMatches.first?.service.name, "GitHub")
+ }
+
+ func testWwwVariations() {
+ // Test that www variations match
+ let withWww = filterCredentials(testCredentials, searchText: "www.dumpert.nl")
+ let withoutWww = filterCredentials(testCredentials, searchText: "dumpert.nl")
+
+ XCTAssertEqual(withWww.count, 1)
+ XCTAssertEqual(withoutWww.count, 1)
+ XCTAssertEqual(withWww.first?.service.name, "Dumpert")
+ XCTAssertEqual(withoutWww.first?.service.name, "Dumpert")
+ }
+
+ func testSubdomainMatching() {
+ // Test subdomain matching
+ let appSubdomain = filterCredentials(testCredentials, searchText: "https://app.example.com")
+ let wwwSubdomain = filterCredentials(testCredentials, searchText: "https://www.example.com")
+ let noSubdomain = filterCredentials(testCredentials, searchText: "https://example.com")
+
+ XCTAssertEqual(appSubdomain.count, 1)
+ XCTAssertEqual(appSubdomain.first?.service.name, "Subdomain Example")
+ XCTAssertEqual(wwwSubdomain.count, 1)
+ XCTAssertEqual(wwwSubdomain.first?.service.name, "Subdomain Example")
+ XCTAssertEqual(noSubdomain.count, 1)
+ XCTAssertEqual(noSubdomain.first?.service.name, "Subdomain Example")
+ }
+
+ func testPathAndQueryIgnored() {
+ // Test that paths and query strings are ignored
+ let withPath = filterCredentials(testCredentials, searchText: "https://github.com/user/repo")
+ let withQuery = filterCredentials(testCredentials, searchText: "https://stackoverflow.com/questions?tab=newest")
+ let withFragment = filterCredentials(testCredentials, searchText: "https://gmail.com#inbox")
+
+ XCTAssertEqual(withPath.count, 1)
+ XCTAssertEqual(withPath.first?.service.name, "GitHub")
+ XCTAssertEqual(withQuery.count, 1)
+ XCTAssertEqual(withQuery.first?.service.name, "Stack Overflow")
+ XCTAssertEqual(withFragment.count, 1)
+ XCTAssertEqual(withFragment.first?.service.name, "Gmail")
+ }
+
+ func testComplexUrlVariations() {
+ // Test complex URL matching scenario
+ let matches = filterCredentials(testCredentials, searchText: "https://www.coolblue.nl/product/12345?ref=google")
+
+ XCTAssertEqual(matches.count, 1)
+ XCTAssertTrue(matches.contains { $0.service.name == "Coolblue" })
+ }
+
+ func testTitleOnlyMatching() {
+ // Test service name matching when no URL is available
+ let matches = filterCredentials(testCredentials, searchText: "newyorktimes")
+
+ XCTAssertEqual(matches.count, 1)
+ XCTAssertEqual(matches.first?.service.name, "Title Only newyorktimes")
+ }
+
+ // MARK: - Shared Test Data
+
+ /**
+ * Creates the shared test credential dataset used across all platforms.
+ * This ensures consistent testing across Browser Extension, iOS, and Android.
+ */
+ private func createSharedTestCredentials() -> [Credential] {
+ return [
+ createTestCredential(serviceName: "Gmail", serviceUrl: "https://gmail.com", username: "[email protected]"),
+ createTestCredential(serviceName: "Google", serviceUrl: "https://google.com", username: "[email protected]"),
+ createTestCredential(serviceName: "Coolblue", serviceUrl: "https://www.coolblue.nl", username: "[email protected]"),
+ createTestCredential(serviceName: "Amazon", serviceUrl: "https://amazon.com", username: "[email protected]"),
+ createTestCredential(serviceName: "Coolblue App", serviceUrl: "com.coolblue.app", username: "[email protected]"),
+ createTestCredential(serviceName: "Dumpert", serviceUrl: "dumpert.nl", username: "[email protected]"),
+ createTestCredential(serviceName: "GitHub", serviceUrl: "github.com", username: "[email protected]"),
+ createTestCredential(serviceName: "Stack Overflow", serviceUrl: "https://stackoverflow.com", username: "[email protected]"),
+ createTestCredential(serviceName: "Subdomain Example", serviceUrl: "https://app.example.com", username: "[email protected]"),
+ createTestCredential(serviceName: "Title Only newyorktimes", serviceUrl: "", username: ""),
+ ]
+ }
+
+ /**
+ * Helper function to create test credentials with standardized structure.
+ * @param serviceName The name of the service
+ * @param serviceUrl The URL of the service
+ * @param username The username for the service
+ * @returns A test credential matching the iOS Credential type
+ */
+ private func createTestCredential(
+ serviceName: String,
+ serviceUrl: String,
+ username: String
+ ) -> Credential {
+ return Credential(
+ id: UUID(),
+ alias: nil, service: Service(
+ id: UUID(),
+ name: serviceName,
+ url: serviceUrl,
+ logo: nil,
+ createdAt: Date(),
+ updatedAt: Date(),
+ isDeleted: false
+ ),
+ username: username,
+ notes: nil, password: Password(
+ id: UUID(), credentialId: UUID(),
+ value: "password123",
+ createdAt: Date(),
+ updatedAt: Date(),
+ isDeleted: false
+ ),
+ createdAt: Date(),
+ updatedAt: Date(),
+ isDeleted: false
+ )
+ }
+}
+
+// MARK: - Standalone Filtering Logic
+
+/**
+ * Standalone filtering function extracted from CredentialProviderViewModel.
+ * This allows testing the filtering logic in isolation without needing to instantiate the view model.
+ * Based on the filterCredentials() method in CredentialProviderView.swift
+ */
+func filterCredentials(_ credentials: [Credential], searchText: String) -> [Credential] {
+ if searchText.isEmpty {
+ return credentials
+ }
+
+ func extractDomain(from urlString: String) -> String {
+ var domain = urlString.lowercased().trimmingCharacters(in: .whitespacesAndNewlines)
+ // Remove protocol if present
+ domain = domain.replacingOccurrences(of: "https://", with: "")
+ domain = domain.replacingOccurrences(of: "http://", with: "")
+ // Remove www. prefix
+ domain = domain.replacingOccurrences(of: "www.", with: "")
+ // Remove path, query, and fragment
+ if let firstSlash = domain.firstIndex(of: "/") {
+ domain = String(domain[..<firstSlash])
+ }
+ if let firstQuestion = domain.firstIndex(of: "?") {
+ domain = String(domain[..<firstQuestion])
+ }
+ if let firstHash = domain.firstIndex(of: "#") {
+ domain = String(domain[..<firstHash])
+ }
+ return domain
+ }
+
+ func extractRootDomain(from domain: String) -> String {
+ let parts = domain.components(separatedBy: ".")
+ return parts.count >= 2 ? parts.suffix(2).joined(separator: ".") : domain
+ }
+
+ func domainsMatch(_ domain1: String, _ domain2: String) -> Bool {
+ let d1 = extractDomain(from: domain1)
+ let d2 = extractDomain(from: domain2)
+
+ // Exact match
+ if d1 == d2 { return true }
+
+ // Check if one domain contains the other (for subdomain matching)
+ if d1.contains(d2) || d2.contains(d1) { return true }
+
+ // Check root domain match
+ let d1Root = extractRootDomain(from: d1)
+ let d2Root = extractRootDomain(from: d2)
+
+ return d1Root == d2Root
+ }
+
+ // Try to parse as URL first
+ let searchDomain = extractDomain(from: searchText)
+
+ if !searchDomain.isEmpty {
+ var matches: Set<Credential> = []
+
+ // Check for domain matches with priority
+ credentials.forEach { credential in
+ guard let serviceUrl = credential.service.url, !serviceUrl.isEmpty else { return }
+
+ if domainsMatch(searchText, serviceUrl) {
+ matches.insert(credential)
+ }
+ }
+
+ // If no domain matches found, try text search in service name
+ if matches.isEmpty {
+ let domainParts = searchDomain.components(separatedBy: ".")
+ let domainWithoutExtension = domainParts.first?.lowercased() ?? searchDomain.lowercased()
+
+ let nameMatches = credentials.filter { credential in
+ let serviceNameMatch = credential.service.name?.lowercased().contains(domainWithoutExtension) ?? false
+ let notesMatch = credential.notes?.lowercased().contains(domainWithoutExtension) ?? false
+ return serviceNameMatch || notesMatch
+ }
+ matches.formUnion(nameMatches)
+ }
+
+ return Array(matches)
+ } else {
+ // Non-URL fallback: simple text search in service name, username, or notes
+ let lowercasedSearch = searchText.lowercased()
+ return credentials.filter { credential in
+ (credential.service.name?.lowercased().contains(lowercasedSearch) ?? false) ||
+ (credential.username?.lowercased().contains(lowercasedSearch) ?? false) ||
+ (credential.notes?.lowercased().contains(lowercasedSearch) ?? false)
+ }
+ }
+}