From c4c0ddc8c265c82e077d21d05ad100cc2dbe7406 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Tue, 2 Sep 2025 13:13:35 -0600 Subject: [PATCH] Add test for web mode with repo flag in listRun Added a test case to ensure that web mode in listRun uses the global URL even when the --repo flag is set. This improves coverage for scenarios where both web mode and repo are specified. --- pkg/cmd/agent-task/list/list_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/cmd/agent-task/list/list_test.go b/pkg/cmd/agent-task/list/list_test.go index 43884f553..a1c34ac32 100644 --- a/pkg/cmd/agent-task/list/list_test.go +++ b/pkg/cmd/agent-task/list/list_test.go @@ -191,6 +191,15 @@ func Test_listRun(t *testing.T) { wantStderr: "Opening https://github.com/copilot/agents in your browser.\n", wantBrowserURL: "https://github.com/copilot/agents", }, + { + name: "web mode with repo still uses global URL, even when --repo is set", + tty: true, + web: true, + baseRepo: ghrepo.New("OWNER", "REPO"), + wantOut: "", + wantStderr: "Opening https://github.com/copilot/agents in your browser.\n", + wantBrowserURL: "https://github.com/copilot/agents", + }, } for _, tt := range tests {