fix: reconcile the repository, platform and admin streams

Share one yesNo helper, drop the unused confirmTyped now that typed
confirmations go through confirmAction, keep Markdown raw in view tests
through the markdown preference, and print doctor latency in whole
milliseconds so fast instances do not show 0s.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-11 23:54:37 +02:00
1 parent e093610ade
commit 70443acce0
6 files changed
+18 -27

No files matched your search

+4 -2
View File
@@ -86,7 +86,8 @@ func TestRepoViewShowsStateAndReadme(t *testing.T) {
}))
defer server.Close()
deps, out, _ := repoTTYDeps(t, server.URL)
deps.Getenv = serverEnv(server.URL, map[string]string{"TERM": "dumb", "TEA_MARKDOWN": "raw"})
deps.Getenv = serverEnv(server.URL, map[string]string{"TERM": "dumb"})
rawMarkdown(t, deps)
require.NoError(t, Execute(context.Background(), deps, []string{"repo", "view", "bob/project", "--branch", "develop"}))
require.Equal(t, `bob/project
public • fork • archived (read-only) • ★ 1 · 0 forks · 2 open issues · 1 open pull request · updated about 1 hour ago
@@ -150,7 +151,8 @@ func TestRepoViewOfAnEmptyRepositorySkipsTheReadme(t *testing.T) {
}))
defer server.Close()
deps, out, _ := repoTTYDeps(t, server.URL)
deps.Getenv = serverEnv(server.URL, map[string]string{"TERM": "dumb", "TEA_MARKDOWN": "raw"})
deps.Getenv = serverEnv(server.URL, map[string]string{"TERM": "dumb"})
rawMarkdown(t, deps)
require.NoError(t, Execute(context.Background(), deps, []string{"repo", "view", "alice/empty"}))
require.Contains(t, out.String(), "private • empty • ★ 0")
require.Contains(t, out.String(), "_This repository is empty._")