Skip to content
Open
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 comfy_cli/output/branding.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def _access_token_line(expires_at: int | None) -> Text:


# ---------------------------------------------------------------------------
# Welcome banner — the big one, shown after auth login success
# Welcome banner — the big one, shown after cloud login success
# ---------------------------------------------------------------------------


Expand Down
16 changes: 16 additions & 0 deletions tests/comfy_cli/command/test_run_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ def test_build_steps_contains_full_surface(self):
]:
assert needle in titles, f"missing coverage for: {needle}"

def test_whoami_step_targets_cloud_not_auth(self):
# Sign-in status lives under `comfy cloud whoami`; `comfy auth` is the
# model-host token group. Guard against regressing back to `auth whoami`.
state = run_cli._DemoState(workflow_path="/tmp/x.json")
steps = run_cli._build_steps(state)
whoami = [s for s in steps if "whoami" in s.title.lower()]
assert len(whoami) == 1, "expected exactly one whoami demo step"
invs = whoami[0].invocations or []
assert invs, "whoami step should expose invocations"
for inv in invs:
assert "whoami" in inv.argv, f"unexpected whoami argv: {inv.argv}"
assert "cloud" in inv.argv, f"whoami step must target cloud: {inv.argv}"
assert "auth" not in inv.argv, f"whoami step must not use auth: {inv.argv}"
assert "cloud whoami" in inv.label, f"unexpected whoami label: {inv.label}"
assert "auth whoami" not in inv.label, f"whoami label must not use auth: {inv.label}"

def test_build_steps_includes_parallel_fleet(self):
state = run_cli._DemoState(workflow_path="/tmp/x.json")
steps = run_cli._build_steps(state)
Expand Down
2 changes: 2 additions & 0 deletions tests/comfy_cli/output/test_branding.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def test_intro_banner_signed_out_includes_wordmark_and_login_hint():
assert "comfy install" in out
assert "comfy launch" in out
assert "comfy cloud login" in out
assert "comfy auth login" not in out # `comfy auth ...` is the model-host token group, not Cloud sign-in
assert "comfy discover" in out
assert "comfy --help" in out
assert "not signed in" in out
Expand Down Expand Up @@ -230,4 +231,5 @@ def test_signed_out_banner_points_at_login():
out = _render(signed_out_banner(base_url="https://testcloud.comfy.org"))
assert "not signed in" in out
assert "comfy cloud login" in out
assert "comfy auth login" not in out # `comfy auth ...` is the model-host token group, not Cloud sign-in
assert "testcloud.comfy.org" in out
Loading