diff --git a/Tests/ParcelAppTests/HighlightNoticeTests.swift b/Tests/ParcelAppTests/HighlightNoticeTests.swift index 86bad21e..a0496a2a 100644 --- a/Tests/ParcelAppTests/HighlightNoticeTests.swift +++ b/Tests/ParcelAppTests/HighlightNoticeTests.swift @@ -11,9 +11,8 @@ struct HighlightNoticeTests { notices.report(NoticeFailure(), kind: .workspaceMemory) notices.report(NoticeFailure(), kind: .highlights) #expect(notices.visible.count == 2) - #expect( - notices.visible.contains( - "Layout memory needs attention. Inspect or reset remembered layouts in Settings.")) + #expect(notices.counts[.workspaceMemory] == 1) + #expect(notices.counts[.highlights] == 1) notices.clear(.workspaceMemory) #expect(notices.visible.count == 1) #expect(notices.counts[.highlights] == 1) diff --git a/Tests/ParcelConfigTests/MemoryConfigurationTests.swift b/Tests/ParcelConfigTests/MemoryConfigurationTests.swift index ea329558..a1ee9eff 100644 --- a/Tests/ParcelConfigTests/MemoryConfigurationTests.swift +++ b/Tests/ParcelConfigTests/MemoryConfigurationTests.swift @@ -33,14 +33,14 @@ struct MemoryConfigurationTests { #expect(result.diagnostics.first?.severity == .warning) } - @Test func underscoreSpellingIsUnknownAndDoesNotChangeRestoration() throws { + @Test func underscoreSpellingIsRejected() throws { let result = ConfigValidator.validate(try TOMLDocument(parsing: "[memory]\nrestore_windows = false\n")) let diagnostic = try #require(result.diagnostics.first) #expect(result.diagnostics.count == 1) - #expect(diagnostic.severity == .warning) + #expect(diagnostic.severity == .error) #expect(diagnostic.location.line == 2) #expect(diagnostic.message.contains("restore_windows")) - #expect(result.configuration?.memory.restoreWindows == true) + #expect(result.configuration == nil) } @Test func schemaMatchesMemoryDefaults() throws { diff --git a/Tests/ParcelEngineTests/ConfigurationMergeRegressionTests.swift b/Tests/ParcelEngineTests/ConfigurationMergeRegressionTests.swift index 77299cbc..84440b2f 100644 --- a/Tests/ParcelEngineTests/ConfigurationMergeRegressionTests.swift +++ b/Tests/ParcelEngineTests/ConfigurationMergeRegressionTests.swift @@ -31,7 +31,7 @@ struct ConfigurationMergeRegressionTests { try harness.scheduler.runReady() try harness.finishMotion() let before = harness.engine.snapshot - let memory = try WorkspaceMemory.capture(before.state) + let memory = try WorkspaceMemory.capture(before.state, titleSalt: Data(repeating: 7, count: 32)) harness.engine.pendingRestorationMemory = memory let passes = harness.engine.layoutPassCount let scheduled = harness.scheduler.scheduledCount @@ -58,7 +58,8 @@ struct ConfigurationMergeRegressionTests { try harness.add([3, 4], workspace: second) try harness.finishMotion() let before = harness.engine.snapshot.state - harness.engine.pendingRestorationMemory = try WorkspaceMemory.capture(before) + harness.engine.pendingRestorationMemory = try WorkspaceMemory.capture( + before, titleSalt: Data(repeating: 7, count: 32)) let passes = harness.engine.layoutPassCount var configuration = harness.engine.configuration var values = configuration.layout.global diff --git a/Tests/ParcelPlatformTests/WorkspaceStateStoreTests.swift b/Tests/ParcelPlatformTests/WorkspaceStateStoreTests.swift index 133a5e65..87bbab01 100644 --- a/Tests/ParcelPlatformTests/WorkspaceStateStoreTests.swift +++ b/Tests/ParcelPlatformTests/WorkspaceStateStoreTests.swift @@ -596,7 +596,8 @@ import Testing #expect(throws: (any Error).self) { try directoryStore.load() } #expect(throws: (any Error).self) { try directoryStore.save(memory()) } #expect(throws: (any Error).self) { try directoryStore.reset() } - #expect(try FileManager.default.contentsOfDirectory(atPath: directory.path) == ["blocker"]) + #expect( + try FileManager.default.contentsOfDirectory(atPath: directory.path).sorted() == ["blocker", "destination"]) } @Test func symlinkStoreAndLockAreRejectedWithoutFollowingTheirTargets() throws {