Merge pull request #1379 from manaflow-ai/task-drag-related-regression
Fix internal drag regressions from bundle type declarations
This commit is contained in:
commit
f3a0bd9d15
2 changed files with 34 additions and 1 deletions
|
|
@ -93,15 +93,27 @@
|
|||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UTImportedTypeDeclarations</key>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>com.splittabbar.tabtransfer</string>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>Bonsplit Tab Transfer</string>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>com.cmux.sidebar-tab-reorder</string>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>cmux Sidebar Tab Reorder</string>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
|
|
|||
|
|
@ -11001,6 +11001,27 @@ final class InternalTabDragConfigurationTests: XCTestCase {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
final class InternalTabDragBundleDeclarationTests: XCTestCase {
|
||||
private func exportedTypeIdentifiers(bundle: Bundle) -> Set<String> {
|
||||
let declarations = (bundle.object(forInfoDictionaryKey: "UTExportedTypeDeclarations") as? [[String: Any]]) ?? []
|
||||
return Set(declarations.compactMap { $0["UTTypeIdentifier"] as? String })
|
||||
}
|
||||
|
||||
func testAppBundleExportsInternalDragTypes() {
|
||||
let exported = exportedTypeIdentifiers(bundle: Bundle(for: AppDelegate.self))
|
||||
|
||||
XCTAssertTrue(
|
||||
exported.contains("com.splittabbar.tabtransfer"),
|
||||
"Expected app bundle to export bonsplit tab-transfer type, got \(exported)"
|
||||
)
|
||||
XCTAssertTrue(
|
||||
exported.contains("com.cmux.sidebar-tab-reorder"),
|
||||
"Expected app bundle to export sidebar tab-reorder type, got \(exported)"
|
||||
)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@MainActor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue