import Testing @testable import ParcelEngine @MainActor struct MouseInputSnapshotTests { @Test func availabilityIsIndependentOfConfiguredDirectGestures() async throws { let harness = try EngineHarness() #expect(!harness.engine.acceptsMouseInput) #expect(!harness.engine.mouseInputSnapshot.enabled) try await harness.start() #expect(harness.engine.acceptsMouseInput) #expect(harness.engine.mouseInputSnapshot.enabled) try harness.add([1, 2]) try harness.finishMotion() var configuration = harness.engine.configuration configuration.mouse.enabled = false try harness.engine.applyConfiguration(configuration) #expect(harness.engine.acceptsMouseInput) #expect(!harness.engine.mouseInputSnapshot.enabled) #expect(Set(harness.engine.mouseInputSnapshot.managedWindows.map(\.windowNumber)) == [1, 2]) #expect(harness.engine.mouseInputSnapshot.edges.isEmpty) harness.engine.setAutomaticTilingEnabled(false) #expect(!harness.engine.acceptsMouseInput) harness.engine.setAutomaticTilingEnabled(true) #expect(harness.engine.acceptsMouseInput) harness.engine.writesPermitted = false #expect(!harness.engine.acceptsMouseInput) #expect(!harness.engine.mouseGestureConsumesEscape) await harness.engine.stop() #expect(!harness.engine.acceptsMouseInput) } }