Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 143 additions & 0 deletions Click2Minimize.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,46 @@
objects = {

/* Begin PBXBuildFile section */
0962BC99C082EF83653125E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F6287BA1C5F7E6E1AAF7859 /* Foundation.framework */; };
21498BA82D00A20600EE1BF3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21498BA72D00A20600EE1BF3 /* ContentView.swift */; };
21B199F72CFF981D00EA628D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 21B199F62CFF981D00EA628D /* Assets.xcassets */; };
21B19A052CFF9D1300EA628D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21B19A042CFF9D1300EA628D /* AppDelegate.swift */; };
21E5E2E72D009E7E00B51E70 /* Accessibility.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21E5E2E62D009E7E00B51E70 /* Accessibility.framework */; };
3D8F877CF6DB29746B4FD40A /* DockItemTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3502CCB658BD53C00B5DF323 /* DockItemTests.swift */; };
B529B13A68C1E6906EF6FFAD /* DockItemTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9CC13C6387AAD369226A1BD /* DockItemTests.swift */; };
FCDC7BDFBB970BDDFDB92904 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F6287BA1C5F7E6E1AAF7859 /* Foundation.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
0435D51EAFF1F8A3E6F88F2A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 21B199E72CFF981C00EA628D /* Project object */;
proxyType = 1;
remoteGlobalIDString = 21B199EE2CFF981C00EA628D;
remoteInfo = Click2Minimize;
};
3BC710B76E2A62D17FAB1412 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 21B199E72CFF981C00EA628D /* Project object */;
proxyType = 1;
remoteGlobalIDString = 21B199EE2CFF981C00EA628D;
remoteInfo = Click2Minimize;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
1F6287BA1C5F7E6E1AAF7859 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
21498BA72D00A20600EE1BF3 /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
21B199EF2CFF981C00EA628D /* Click2Minimize.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Click2Minimize.app; sourceTree = BUILT_PRODUCTS_DIR; };
21B199F62CFF981D00EA628D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
21B199FB2CFF981D00EA628D /* Click2Minimize.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Click2Minimize.entitlements; sourceTree = "<group>"; };
21B19A042CFF9D1300EA628D /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
21B19A082D009C6E00EA628D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
21E5E2E62D009E7E00B51E70 /* Accessibility.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accessibility.framework; path = System/Library/Frameworks/Accessibility.framework; sourceTree = SDKROOT; };
3502CCB658BD53C00B5DF323 /* DockItemTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DockItemTests.swift; sourceTree = "<group>"; };
41C6F42ED4F0AD7EECA8B56D /* Click2MinimizeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Click2MinimizeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
A9CC13C6387AAD369226A1BD /* DockItemTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DockItemTests.swift; path = Click2MinimizeTests/DockItemTests.swift; sourceTree = "<group>"; };
FE2EE569A5A7BE7985AC7687 /* Click2MinimizeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Click2MinimizeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -32,6 +58,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
5765A62A6EAFE73F7E23C522 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0962BC99C082EF83653125E4 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -41,13 +75,16 @@
21B199F12CFF981C00EA628D /* Click2Minimize */,
21B199F02CFF981C00EA628D /* Products */,
21E5E2E52D009E7E00B51E70 /* Frameworks */,
A15A8269E11C9E9B8103DF87 /* Click2MinimizeTests */,
);
sourceTree = "<group>";
};
21B199F02CFF981C00EA628D /* Products */ = {
isa = PBXGroup;
children = (
21B199EF2CFF981C00EA628D /* Click2Minimize.app */,
FE2EE569A5A7BE7985AC7687 /* Click2MinimizeTests.xctest */,
41C6F42ED4F0AD7EECA8B56D /* Click2MinimizeTests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -68,10 +105,28 @@
isa = PBXGroup;
children = (
21E5E2E62D009E7E00B51E70 /* Accessibility.framework */,
313B94A8DB2AB990C5CEA506 /* OS X */,
);
name = Frameworks;
sourceTree = "<group>";
};
313B94A8DB2AB990C5CEA506 /* OS X */ = {
isa = PBXGroup;
children = (
1F6287BA1C5F7E6E1AAF7859 /* Foundation.framework */,
);
name = "OS X";
sourceTree = "<group>";
};
A15A8269E11C9E9B8103DF87 /* Click2MinimizeTests */ = {
isa = PBXGroup;
children = (
3502CCB658BD53C00B5DF323 /* DockItemTests.swift */,
A9CC13C6387AAD369226A1BD /* DockItemTests.swift */,
);
name = Click2MinimizeTests;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -92,6 +147,24 @@
productReference = 21B199EF2CFF981C00EA628D /* Click2Minimize.app */;
productType = "com.apple.product-type.application";
};
E4F43DCB37080094F07AB6FD /* Click2MinimizeTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2829D048907C27F0CE37689C /* Build configuration list for PBXNativeTarget "Click2MinimizeTests" */;
buildPhases = (
0930E36F09566A548CA0693B /* Sources */,
5765A62A6EAFE73F7E23C522 /* Frameworks */,
C72E101A0CFE05ABB8D1191A /* Resources */,
);
buildRules = (
);
dependencies = (
58D88CF1FCC9C5554593EDC3 /* PBXTargetDependency */,
);
name = Click2MinimizeTests;
productName = Click2MinimizeTests;
productReference = 41C6F42ED4F0AD7EECA8B56D /* Click2MinimizeTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand Down Expand Up @@ -121,6 +194,7 @@
projectRoot = "";
targets = (
21B199EE2CFF981C00EA628D /* Click2Minimize */,
E4F43DCB37080094F07AB6FD /* Click2MinimizeTests */,
);
};
/* End PBXProject section */
Expand All @@ -134,9 +208,24 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
C72E101A0CFE05ABB8D1191A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
0930E36F09566A548CA0693B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B529B13A68C1E6906EF6FFAD /* DockItemTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
21B199EB2CFF981C00EA628D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -148,7 +237,28 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
58D88CF1FCC9C5554593EDC3 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Click2Minimize;
target = 21B199EE2CFF981C00EA628D /* Click2Minimize */;
targetProxy = 3BC710B76E2A62D17FAB1412 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
17E07DBAD5E109B945B80CDD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
MACOSX_DEPLOYMENT_TARGET = 13.0;
PRODUCT_BUNDLE_IDENTIFIER = com.idemfactor.Click2MinimizeTests;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Click2Minimize.app/Contents/MacOS/Click2Minimize";
};
name = Debug;
};
21B199FC2CFF981D00EA628D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -335,6 +445,30 @@
};
name = Release;
};
23EFAFB58686C001F47F99D9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Release;
};
647A0D1835D30CABC4EE29E0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
MACOSX_DEPLOYMENT_TARGET = 13.0;
PRODUCT_BUNDLE_IDENTIFIER = com.idemfactor.Click2MinimizeTests;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Click2Minimize.app/Contents/MacOS/Click2Minimize";
};
name = Release;
};
6F9B6AAB4FE1E08182767405 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Debug;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -356,6 +490,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2829D048907C27F0CE37689C /* Build configuration list for PBXNativeTarget "Click2MinimizeTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
647A0D1835D30CABC4EE29E0 /* Release */,
17E07DBAD5E109B945B80CDD /* Debug */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 21B199E72CFF981C00EA628D /* Project object */;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "21B199EE2CFF981C00EA628D"
BuildableName = "Click2Minimize.app"
BlueprintName = "Click2Minimize"
ReferencedContainer = "container:Click2Minimize.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4F43DCB37080094F07AB6FD"
BuildableName = "Click2MinimizeTests.xctest"
BlueprintName = "Click2MinimizeTests"
ReferencedContainer = "container:Click2Minimize.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
18 changes: 18 additions & 0 deletions Click2MinimizeTests/DockItemTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import XCTest
@testable import Click2Minimize

class DockItemTests: XCTestCase {

func testDockItemInitialization() {
// Arrange
let expectedRect = NSRect(x: 10, y: 20, width: 30, height: 40)
let expectedAppID = "com.apple.Safari"

// Act
let dockItem = AppDelegate.DockItem(rect: expectedRect, appID: expectedAppID)

// Assert
XCTAssertEqual(dockItem.rect, expectedRect, "The rect should be correctly initialized.")
XCTAssertEqual(dockItem.appID, expectedAppID, "The appID should be correctly initialized.")
}
}