@@ -951,66 +951,6 @@ func TestSetupNonInteractiveJSON(t *testing.T) {
951951 }
952952}
953953
954- func TestSetupWizardCanInstallTerminalWithoutMCP (t * testing.T ) {
955- t .Setenv ("npm_command" , "exec" )
956- svc := & fakeService {setupResult : & cli.SetupReport {Operation : "setup" , Steps : []cli.SetupStep {{Name : "terminal" , Status : "installed" }}}}
957- c , _ , stderr := newTestCLI (svc , nil )
958- c .SetInput (strings .NewReader ("\n none\n none\n \n " ))
959-
960- if err := c .Run (context .Background (), []string {"setup" }); err != nil {
961- t .Fatal (err )
962- }
963- if ! svc .lastSetup .InstallCLI || ! svc .lastSetup .SkipMCP || len (svc .lastSetup .Clients ) != 0 {
964- t .Fatalf ("options = %+v" , svc .lastSetup )
965- }
966- for _ , prompt := range []string {
967- "Install the terminal app for CLI and TUI? [Y/n]:" ,
968- "Set up which MCP clients? [codex,claude,none]:" ,
969- } {
970- if ! strings .Contains (stderr .String (), prompt ) {
971- t .Fatalf ("missing prompt %q in %q" , prompt , stderr .String ())
972- }
973- }
974- }
975-
976- func TestSetupWizardPreviewsPlanBeforeConfirmation (t * testing.T ) {
977- t .Setenv ("npm_command" , "exec" )
978- svc := & fakeService {setupResult : & cli.SetupReport {
979- Operation : "setup" ,
980- DryRun : true ,
981- Steps : []cli.SetupStep {{
982- Name : "terminal" , Status : "would install" ,
983- Message : "npm install --global gitcontribute@0.1.1" ,
984- }},
985- }}
986- c , stdout , stderr := newTestCLI (svc , nil )
987- c .SetInput (strings .NewReader ("\n codex\n none\n n\n " ))
988-
989- if err := c .Run (context .Background (), []string {"setup" }); err != nil {
990- t .Fatal (err )
991- }
992- if len (svc .setupCalls ) != 1 || ! svc .setupCalls [0 ].DryRun || ! svc .setupCalls [0 ].InstallCLI {
993- t .Fatalf ("setup calls = %+v" , svc .setupCalls )
994- }
995- if ! strings .Contains (stdout .String (), "Setup plan" ) || ! strings .Contains (stdout .String (), "npm install --global gitcontribute@0.1.1" ) {
996- t .Fatalf ("stdout = %q" , stdout .String ())
997- }
998- if ! strings .Contains (stderr .String (), "Setup cancelled; no changes were made." ) {
999- t .Fatalf ("stderr = %q" , stderr .String ())
1000- }
1001- }
1002-
1003- func TestRemoveAllNonInteractive (t * testing.T ) {
1004- svc := & fakeService {setupResult : & cli.SetupReport {Operation : "remove" , Steps : []cli.SetupStep {{Name : "codex" , Status : "removed" }}}}
1005- c := cli .New (svc , & fakeMCPRunner {}, io .Discard , io .Discard )
1006- if err := c .Run (context .Background (), []string {"remove" , "--all-clients" , "--yes" }); err != nil {
1007- t .Fatal (err )
1008- }
1009- if ! svc .lastSetup .Remove || ! svc .lastSetup .AllClients {
1010- t .Fatalf ("options = %+v" , svc .lastSetup )
1011- }
1012- }
1013-
1014954func TestInvestigationStartShowAndList (t * testing.T ) {
1015955 svc := & fakeService {
1016956 startInvResult : & cli.InvestigationResult {
0 commit comments