feat(dashboard): add milestone view and configurable columns
fixes #16, fixes #19 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,9 +26,10 @@ class TestMainNominal:
|
||||
|
||||
mock_client_cls.assert_called_once_with("http://localhost:3000", "test-token-123")
|
||||
mock_collect.assert_called_once_with(mock_client, include=None, exclude=None)
|
||||
mock_render.assert_called_once_with(
|
||||
mock_collect.return_value, sort_key="name", show_description=True
|
||||
)
|
||||
mock_render.assert_called_once()
|
||||
call_kwargs = mock_render.call_args
|
||||
assert call_kwargs[1]["sort_key"] == "name"
|
||||
assert call_kwargs[1]["show_description"] is True
|
||||
|
||||
@patch("gitea_dashboard.cli.render_dashboard")
|
||||
@patch("gitea_dashboard.cli.collect_all")
|
||||
@@ -365,9 +366,10 @@ class TestMainNoDesc:
|
||||
with patch.dict("os.environ", env, clear=True):
|
||||
main(["--no-desc"])
|
||||
|
||||
mock_render.assert_called_once_with(
|
||||
mock_collect.return_value, sort_key="name", show_description=False
|
||||
)
|
||||
mock_render.assert_called_once()
|
||||
call_kwargs = mock_render.call_args
|
||||
assert call_kwargs[1]["sort_key"] == "name"
|
||||
assert call_kwargs[1]["show_description"] is False
|
||||
|
||||
|
||||
class TestMainFormatJson:
|
||||
@@ -472,7 +474,7 @@ class TestMainColumnsHelp:
|
||||
mock_collect.return_value = []
|
||||
|
||||
with patch.dict("os.environ", env, clear=True):
|
||||
main(["--no-desc", "--columns", "-commit"])
|
||||
main(["--no-desc", "--columns=-commit"])
|
||||
|
||||
# render_dashboard should be called with columns excluding both description and commit
|
||||
call_kwargs = mock_render.call_args
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
from io import StringIO
|
||||
|
||||
import pytest
|
||||
from rich.console import Console
|
||||
|
||||
from gitea_dashboard.display import (
|
||||
|
||||
Reference in New Issue
Block a user