Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fastapi_cloud_cli/commands/ci/print_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CIWorkflowOutput(BaseModel):


def _render_workflow_output(data: CIWorkflowOutput, toolkit: RichToolkit) -> None:
toolkit.console.print(data.content, markup=False, end="")
toolkit.console.print(data.content, markup=False, end="", soft_wrap=True)


@ci_app.command("print-workflow")
Expand Down
9 changes: 6 additions & 3 deletions tests/test_cli_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ def test_print_workflow_uses_default_branch() -> None:
assert result.stderr == ""


def test_print_workflow_uses_branch_option() -> None:
result = runner.invoke(app, ["ci", "print-workflow", "--branch", "main"])
@pytest.mark.parametrize("branch", ["main", "feature/" + "long-branch-name-" * 8])
def test_print_workflow_uses_branch_option(branch: str) -> None:
result = runner.invoke(
app, ["ci", "print-workflow", "--branch", branch], env={"COLUMNS": "80"}
)

assert result.exit_code == 0
assert result.stdout == _get_workflow_content("main")
assert result.stdout == _get_workflow_content(branch)
assert result.stderr == ""


Expand Down
Loading