feat: add --refresh flag to onboard command for non-interactive config updates
This commit is contained in:
committed by
Xubin Ren
parent
ea7f4679f1
commit
f074aa7d80
@@ -218,6 +218,20 @@ def test_onboard_existing_config_refresh(mock_paths):
|
||||
assert (workspace_dir / "AGENTS.md").exists()
|
||||
|
||||
|
||||
def test_onboard_existing_config_refresh_non_interactive(mock_paths):
|
||||
"""Config exists, user specifies --refresh — should refresh non-interactively (no prompt)."""
|
||||
config_file, workspace_dir, _ = mock_paths
|
||||
config_file.write_text('{"existing": true}')
|
||||
|
||||
result = runner.invoke(app, ["onboard", "--refresh"])
|
||||
|
||||
assert result.exit_code == 0
|
||||
assert "Config already exists" not in result.stdout
|
||||
assert "existing values preserved" in result.stdout
|
||||
assert workspace_dir.exists()
|
||||
assert (workspace_dir / "AGENTS.md").exists()
|
||||
|
||||
|
||||
def test_onboard_existing_config_overwrite(mock_paths):
|
||||
"""Config exists, user confirms overwrite — should reset to defaults."""
|
||||
config_file, workspace_dir, _ = mock_paths
|
||||
@@ -261,6 +275,7 @@ def test_onboard_help_shows_workspace_and_config_options():
|
||||
assert "--config" in stripped_output
|
||||
assert "-c" in stripped_output
|
||||
assert "--wizard" in stripped_output
|
||||
assert "--refresh" in stripped_output
|
||||
assert "--dir" not in stripped_output
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user