feat: copper accent theme, always-expanded group filter, app icon; rename MyPass to KeeVault
- Custom copper AccentColor and warm VaultBackground color assets (light/dark), applied to both the main app and the AutoFill extension (which needed its own copy of the asset catalog plus ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME and an explicit .tint() modifier, since extensions don't pick up the app-wide accent color the same way a full SwiftUI App/Scene does). - GroupFilterView no longer uses DisclosureGroup for subgroups -- the whole tree renders always-expanded (indented per depth) so active filters are visible at a glance instead of requiring tap-to-expand. - Added a placeholder app icon (padlock glyph, light/dark/tinted variants plus macOS sizes) -- previously the icon slot existed but had no actual images, which blocks App Store/TestFlight archive validation. - Added ITSAppUsesNonExemptEncryption = NO (standard encryption only, via KeePassKit) to skip the export-compliance prompt on each upload. - Renamed the app from MyPass to KeeVault throughout: Xcode project/targets/ schemes, the MyPassCore package (now KeeVaultCore) and every import site, folder and file names, bundle identifiers (org.antiloop222.keevault) and their App Group/Keychain-group entitlements, and remaining UI/string references -- MyPass was already taken as an App Store app name.
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import XCTest
|
||||
@testable import KeeVaultCore
|
||||
|
||||
final class GroupSelectionTests: XCTestCase {
|
||||
private func makeSampleTree() -> (root: Group, work: Group, email: Group, personal: Group) {
|
||||
let email = Group(name: "Email")
|
||||
let work = Group(name: "Work", subgroups: [email])
|
||||
let personal = Group(name: "Personal")
|
||||
let root = Group(name: "Root", subgroups: [work, personal])
|
||||
return (root, work, email, personal)
|
||||
}
|
||||
|
||||
func test_subtreeIds_includesGroupAndAllDescendants() {
|
||||
let (root, work, email, _) = makeSampleTree()
|
||||
let ids = GroupSelection.subtreeIds(of: work.id, in: root)
|
||||
XCTAssertEqual(ids, [work.id, email.id])
|
||||
}
|
||||
|
||||
func test_subtreeIds_leafGroup_returnsOnlyItself() {
|
||||
let (root, _, email, _) = makeSampleTree()
|
||||
let ids = GroupSelection.subtreeIds(of: email.id, in: root)
|
||||
XCTAssertEqual(ids, [email.id])
|
||||
}
|
||||
|
||||
func test_toggling_selectsGroupAndSubtree() {
|
||||
let (root, work, email, _) = makeSampleTree()
|
||||
let result = GroupSelection.toggling(work.id, in: root, current: [])
|
||||
XCTAssertEqual(result, [work.id, email.id])
|
||||
}
|
||||
|
||||
func test_toggling_deselectsGroupAndSubtree() {
|
||||
let (root, work, email, _) = makeSampleTree()
|
||||
let result = GroupSelection.toggling(work.id, in: root, current: [work.id, email.id])
|
||||
XCTAssertEqual(result, [])
|
||||
}
|
||||
|
||||
func test_toggling_doesNotAffectUnrelatedSelection() {
|
||||
let (root, work, email, personal) = makeSampleTree()
|
||||
let result = GroupSelection.toggling(work.id, in: root, current: [personal.id])
|
||||
XCTAssertEqual(result, [personal.id, work.id, email.id])
|
||||
}
|
||||
|
||||
func test_subtreeIds_groupNotFound_returnsEmptySet() {
|
||||
let (root, _, _, _) = makeSampleTree()
|
||||
let nonExistentId = UUID()
|
||||
let ids = GroupSelection.subtreeIds(of: nonExistentId, in: root)
|
||||
XCTAssertEqual(ids, [])
|
||||
}
|
||||
|
||||
func test_toggling_groupNotFound_returnsCurrentUnchanged() {
|
||||
let (root, _, _, personal) = makeSampleTree()
|
||||
let nonExistentId = UUID()
|
||||
let current: Set<UUID> = [personal.id]
|
||||
let result = GroupSelection.toggling(nonExistentId, in: root, current: current)
|
||||
XCTAssertEqual(result, current)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user