native macOS codings agent orchestrator
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix test expectation for alert state in createRandomWorktreeFailed

The test was missing the expected alert state that gets set when
worktree creation fails. The reducer sets an error alert but the
test wasn't expecting it, causing a state mismatch assertion.

khoi 9adfb44c c5ed2a52

+11
+11
supacodeTests/RepositoriesFeatureTests.swift
··· 495 495 $0.gitClient.worktrees = { _ in [existingWorktree] } 496 496 } 497 497 498 + let expectedAlert = AlertState<RepositoriesFeature.Alert> { 499 + TextState("Unable to create worktree") 500 + } actions: { 501 + ButtonState(role: .cancel) { 502 + TextState("OK") 503 + } 504 + } message: { 505 + TextState("boom") 506 + } 507 + 498 508 await store.send( 499 509 .createRandomWorktreeFailed( 500 510 title: "Unable to create worktree", ··· 514 524 $0.worktreeInfoByID = [:] 515 525 $0.selectedWorktreeID = existingWorktree.id 516 526 $0.repositories = [updatedRepository] 527 + $0.alert = expectedAlert 517 528 } 518 529 519 530 await store.receive(\.delegate.repositoriesChanged)