cockpit_test 4.11.1
cockpit_test: ^4.11.1 copied to clipboard
Platform-neutral programmatic test scenarios for Cockpit runners.
Changelog #
4.11.1 #
- Synchronized the shared tester package with the Cockpit 4.11.1 release.
4.11.0 #
- Added
appAction()to the sharedCockpitTestercontract: it invokes a registered app action by name with an optional arguments object and returns the handler's result map. Targets without registered app actions answer with an unsupported-capability failure, which the runner reports as a blocked attempt.
4.10.0 #
- Published the package for public use instead of
publish_to: none, closing the external dependency graph forcockpitandflutter_cockpit_test. - Added the shared programmatic runner used by remote, system, and Flutter execution surfaces with one preflight, result, and error semantics.
- Replaced string capability requirements with typed ones built from
CockpitCommandTypeandCockpitLocatorKind, eliminating command, locator, and feature alias drift. - Hardened suite construction: empty case lists, blank or duplicate case IDs are rejected and IDs are normalized deterministically.
- Made
CockpitTestRunResultcarry structuredCockpitTestErrorvalues with a passed/error invariant and recursively immutable metadata; a failing cleanup step no longer overwrites the primary error. - Fixed
CockpitLocaleProfileto parse and canonicalize BCP-47 language, script, and region subtags (en-US,zh-Hant-TW) with immutable metadata and equality/hash contracts built on the canonical tag. - Added host-side assertion helpers —
cockpitExpectEquals(deep equality over numbers, strings, booleans, lists, sets, and maps),cockpitExpectTrue,cockpitExpectNotNull, andcockpitExpectContains— throwingCockpitTestAssertionExceptionwith bounded, frozen actual and expected details that the runner reports asfailedattempts instead of internal errors. - Extended the shared
CockpitTestercontract withwaitFor(target, absent:)absence waits,expectText(..., match:)text match modes, andcollectSnapshot()UI read-back; every surface maps them to the same protocol operations. - Added
describeApp()to the sharedCockpitTestercontract: it returns the app-authored state the application exposes through its app state provider, and targets without one block the attempt with an unsupported-capability error. - Added ICU MessageFormat support to
CockpitLocalizedTextvia opt-inparams, powered byintl's CLDR rules: placeholders,pluralwith exact=Nprecedence over categories,select, nesting,#, and apostrophe quoting; without params, values keep resolving verbatim. - Added
CockpitArbCatalogandCockpitJsonCatalog— eager, fail-loud catalogs over the app's owngen_l10nARB files orslang/easy_localizationJSON — plusvalidateMatrixcoverage reports through the runtime fallback chain and VM file loaders inpackage:cockpit_test/catalog_io.dart. - Aligned late capability discovery with preflight: a target that answers "unsupported capability" while a scenario body runs now blocks the attempt exactly like a declared-requirement mismatch.
- Simplified authoring: suites accept bare
scenarios:that each become a case named after the scenario id, andrun()/runSuite()treat the locale as optional, defaulting toen-US. - Rewrote the README (English and Chinese), the cross-runner guide, and the runnable example around the simplest scenario first — no requirements, cross-surface text locators — with requirements demoted to an advanced preflight topic, and kept the example executable under a compile-and-run test.
4.9.0 #
- Initial cross-runner scenario contract:
CockpitTestScenario,CockpitTestCaseProgram, andCockpitTestSuiteProgramauthor platform-neutral cases that run unchanged on Flutter integration tests, bridge-connected release apps, and native black-box targets. - Added locale-first attempts: every case runs against a validated
CockpitLocaleProfilematrix andCockpitLocalizedTextresolves translations lazily so in-scenario language switches are observed by the next assertion. - Added explicit attempt outcomes:
passed,failed, orblocked. A target that cannot satisfy a scenario'srequiredCapabilitiesis blocked with aCockpitTestCapabilityExceptionbefore the body runs instead of silently skipping work.