Snapshot localized CLI help output (#290)#326
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Reviewer's GuideAdds a parameterized, locale-aware CLI help snapshot test to ensure the localized help text includes the --config flag and its description, and introduces insta snapshots for en-US and es-ES outputs. Sequence diagram for localized CLI help snapshot testsequenceDiagram
participant Test as localized_help_snapshots_include_config_flag
participant Localizer as build_localizer
participant Cli as Cli_command
participant Localized as localize_command
participant Normalizer as normalize_fluent_isolates
participant Settings as snapshot_settings
participant Insta as assert_snapshot
Test->>Localizer: build_localizer(locale)
Localizer-->>Test: localizer
Test->>Cli: Cli::command()
Cli-->>Test: command
Test->>Localized: localize_command(command, localizer)
Localized-->>Test: localized_command
Test->>Localized: render_long_help()
Localized-->>Test: rendered_help
Test->>Normalizer: normalize_fluent_isolates(rendered_help)
Normalizer-->>Test: normalized_help
Test->>Test: assert contains("--config <FILE>")
Test->>Test: assert contains(config_help)
Test->>Settings: snapshot_settings("cli")
Settings-->>Test: settings
Test->>Settings: bind()
activate Settings
Settings->>Insta: assert_snapshot(snapshot_name, normalized_help)
deactivate Settings
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Add `insta` coverage for localized top-level help in `en-US` and `es-ES`. Assert the `--config` flag and resolved Fluent description before snapshotting the full rendered help output so future CLI or localisation drift is caught in review.
f209922 to
ec8d068
Compare
Summary
This branch adds regression coverage for issue #290 by snapshotting the
localised top-level CLI help output in
en-USandes-ES. It directlyasserts that
--config <FILE>is present with the Fluent-resolvedconfiguration-file description before storing the full rendered help text as
instasnapshots.Closes #290.
Review walkthrough
Validation
cargo test localized_help_snapshots_include_config_flag --all-targets --all-features: passed.make check-fmt: passed.make lint: passed.make test: passed.Notes
coderabbit review --agentwas attempted after the focused snapshot test, but the command stalled after reporting sandbox setup. The stalled process group from this worktree was stopped; no CodeRabbit findings were returned.gh issue edit 290 --add-label lowfailed withGraphQL: Resource not accessible by integration, so the issue label could not be applied from this environment.Summary by Sourcery
Add regression coverage to ensure localized CLI help output includes the configuration flag and is snapshotted for specific locales.
Tests: