Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031import Foundationimport Testing
@testable import ParcelTestSupport
extension RealAppEndToEndTests { @Test func aWindowlessApplicationIsDiscoveredWhenItGainsADocument() async throws { try await withSession { session in let (fixture, opened) = try await session.addFixture(arguments: ["--title", "Deferred Observation Fixture"]) let original = try #require(opened.windows.first) _ = try await fixture.control(FixtureControl(action: "close", window: original.index)) try await waitUntil("the fixture has no native document windows") { try await fixture.snapshot().windows.isEmpty && !serverWindows().contains { $0.pid == opened.pid && $0.layer == 0 && $0.bounds.width > 0 && $0.bounds.height > 0 } } try await session.startApp() #expect(try await session.windows(for: fixture).isEmpty) let created = try await fixture.control(FixtureControl(action: "create")) let document = try #require(created.windows.first) DistributedNotificationCenter.default().postNotificationName( Notification.Name("dev.vinnymac.parcel.e2e.\(session.e2eToken).wake"), object: nil, userInfo: nil, deliverImmediately: true) let admitted = try await session.settledWindows(for: fixture, count: 1) #expect(admitted.map(\.id) == [document.number]) try await session.expectLayout(admitted, fixture: fixture, layout: .columns) } }}