fleury_test_support library

Package-neutral harness support for fleury_test and framework tooling.

Most application tests should import package:fleury_test/fleury_test.dart instead. This lower-level library intentionally has no dependency on package:test or matcher, which also makes it suitable for benchmarks, snapshot tools, and other deterministic harnesses.

Classes

AccessibilityNode
One node in a text-first accessibility/fallback snapshot.
AccessibilitySnapshot
A text-first accessibility/fallback snapshot derived from semantic nodes.
AccessibilitySnapshotSummary
Aggregate facts for an accessibility/fallback snapshot.
AnsiByteBreakdown
UTF-8 byte counts for emitted ANSI output, split by what the bytes were spent on.
CountingAnsiSink
An AnsiSink that categorizes every write into an AnsiByteBreakdown, keeping both a running total and (optionally) a per-frame list.
DebugCaptureArtifact
Queryable form of a DebugCaptureSnapshot for regression tests.
DebugCaptureRecorder
DebugCaptureSemanticNode
DebugCaptureSnapshot
DebugEvent
Sealed parent — gives consumers exhaustive switch coverage and leaves room for future event types (RebuildEvent, LayoutEvent, LogEvent) without breaking existing matches.
DebugEvents
DebugOutputSummary
DebugTimeMarker
Safe marker for deterministic test/replay clock progress.
DirtySpanFrameStats
Compact shape summary for dirty cells emitted during one rendered frame.
FakeClock
A Clock whose value is advanced by the caller. Used everywhere in animation tests; never use SystemClock in tests.
FakeTickerScheduler
Test variant of TickerScheduler that doesn't create a real Timer.periodic. Tests drive ticks by:
Finder
A query over an Element tree. Implementations walk the subtree rooted at apply's argument and yield matching elements.
FleuryTester
Drives a widget tree under test. One tester corresponds to one testWidgets invocation.
FrameDebugEvent
FrameEvent
One frame's per-phase timing breakdown plus the headline counters the live overlay shows. Emitted once per rendered frame.
InputDebugEvent
RenderLayoutDebugStats
Debug-only collector for render-layout cache activity.
RenderLayoutFrameStats
Render-layout activity observed while laying out one frame.
RepaintBoundaryDebugStats
Debug-only collector for repaint-boundary activity.
RepaintBoundaryFrameStats
Repaint-boundary activity observed while painting one frame.
SemanticActionContributor
Implemented by semantic contributors that can execute semantic actions.
SemanticActionInvocationResult
Result of a semantic action invocation through tests or future adapters.
SemanticInspectionNode
SemanticInspectionSnapshot
Machine-readable, redaction-aware semantic inspection snapshot.
SemanticNode
Immutable semantic description of a mounted UI node.
SemanticNodeId
Identity of a semantic node.
SemanticRole
The durable meaning of a semantic node.
Semantics
App-authored semantic annotation.
SemanticsOwner
Retains the last semantic snapshot and reports node-level changes.
SemanticState
Extensible typed state carried by semantic nodes.
SemanticTree
Immutable semantic snapshot of a mounted Fleury app.
SemanticTreeUpdate
Node-level delta between two semantic tree snapshots.
TransportProfile
A simple transport model for turning a frame's byte count into an estimated wire time, so byte-budget numbers can be reasoned about as latency.

Enums

SemanticAction
Actions a semantic node exposes to tests, inspectors, and future adapters.
SemanticActionInvocationStatus

Extensions

SemanticTreeAccessibility on SemanticTree
Convenience extension for accessibility/fallback snapshots.
SemanticTreeInspection on SemanticTree
Convenience conversion from a live semantic tree to the inspection protocol.

Functions

buildAccessibilitySnapshot(SemanticTree tree) → AccessibilitySnapshot
Builds a text-first accessibility/fallback snapshot from tree.
byKey(Key key) → Finder
Matches elements whose widget carries key.
byPredicate(bool predicate(Widget widget), {String? description}) → Finder
Matches any element whose widget satisfies predicate. description is shown in test failure messages.
byType(Type type) → Finder
Matches elements whose widget Object.runtimeType equals type.
descendantOf({required Finder of, required Finder matching}) → Finder
Matches elements yielded by matching when they appear in the subtree of an element matched by of.
invokeSemanticActionFromElement({required SemanticTree tree, required SemanticNodeId id, required SemanticAction action, Object? value}) → Future<SemanticActionInvocationResult>
Invokes action on the semantic node id by dispatching through the mounted element tree rooted at root.
text(String data) → Finder
Matches Text widgets whose data equals data.

Typedefs

FleuryTestFailureHandler = Never Function(String message)
Converts a harness assertion message into the caller's failure type.
SemanticActionCallback = FutureOr<void> Function(SemanticAction action)
Carries out a SemanticAction on a node.

Exceptions / Errors

FleuryTestFailure
A package-neutral assertion failure raised by FleuryTester.
SemanticQueryError
A semantic selector matched zero or multiple nodes.