test(actor-context): match list and show step text
CI / push-validation (pull_request) Successful in 37s
CI / helm (pull_request) Successful in 47s
CI / lint (pull_request) Successful in 56s
CI / build (pull_request) Successful in 54s
CI / quality (pull_request) Successful in 1m34s
CI / typecheck (pull_request) Successful in 1m40s
CI / security (pull_request) Successful in 1m39s
CI / integration_tests (pull_request) Failing after 15m40s
CI / unit_tests (pull_request) Failing after 15m41s
CI / coverage (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
CI / push-validation (pull_request) Successful in 37s
CI / helm (pull_request) Successful in 47s
CI / lint (pull_request) Successful in 56s
CI / build (pull_request) Successful in 54s
CI / quality (pull_request) Successful in 1m34s
CI / typecheck (pull_request) Successful in 1m40s
CI / security (pull_request) Successful in 1m39s
CI / integration_tests (pull_request) Failing after 15m40s
CI / unit_tests (pull_request) Failing after 15m41s
CI / coverage (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
This commit is contained in:
@@ -9,7 +9,7 @@ import tempfile
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from behave import given, step, then, when
|
||||
from behave import given, then, when
|
||||
from typer.testing import CliRunner
|
||||
|
||||
from cleveragents.cli.commands.actor_context import app as actor_context_app
|
||||
@@ -604,7 +604,7 @@ def step_list_regex(context, regex):
|
||||
)
|
||||
|
||||
|
||||
@when('I run actor context list --format "{fmt}"')
|
||||
@when("I run actor context list --format {fmt}")
|
||||
def step_list_format(context, fmt):
|
||||
context.result = context.runner.invoke(
|
||||
actor_context_app,
|
||||
@@ -623,19 +623,32 @@ def step_list_format(context, fmt):
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@step('I run actor context show "{name}"{fmt}')
|
||||
def step_show(context, name, fmt=None):
|
||||
@when('I run actor context show "{name}"')
|
||||
def step_show(context, name):
|
||||
args = [
|
||||
"show",
|
||||
name,
|
||||
"--context-dir",
|
||||
str(context.context_dir),
|
||||
]
|
||||
if fmt is not None:
|
||||
args.extend(["--format", fmt])
|
||||
context.result = context.runner.invoke(actor_context_app, args)
|
||||
|
||||
|
||||
@when('I run actor context show "{name}" --format {fmt}')
|
||||
def step_show_format(context, name, fmt):
|
||||
context.result = context.runner.invoke(
|
||||
actor_context_app,
|
||||
[
|
||||
"show",
|
||||
name,
|
||||
"--context-dir",
|
||||
str(context.context_dir),
|
||||
"--format",
|
||||
fmt,
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Then — list / show success and failure assertions
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user