diff --git a/comfy_cli/output/branding.py b/comfy_cli/output/branding.py index 151011b3..682a1f60 100644 --- a/comfy_cli/output/branding.py +++ b/comfy_cli/output/branding.py @@ -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 # --------------------------------------------------------------------------- diff --git a/tests/comfy_cli/command/test_run_cli.py b/tests/comfy_cli/command/test_run_cli.py index af36c86c..a04a1faf 100644 --- a/tests/comfy_cli/command/test_run_cli.py +++ b/tests/comfy_cli/command/test_run_cli.py @@ -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) diff --git a/tests/comfy_cli/output/test_branding.py b/tests/comfy_cli/output/test_branding.py index 84b2961c..4cfc20fc 100644 --- a/tests/comfy_cli/output/test_branding.py +++ b/tests/comfy_cli/output/test_branding.py @@ -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 @@ -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