SwiftTestHelpers class
Testing utilities for swift_flutter
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clearAllState(
) → void - Clear all state (useful for test teardown)
-
disableDebugMode(
) → void - Disable debug mode
-
enableDebugMode(
) → void - Enable debug mode for testing
-
getRegisteredStateKeys(
) → List< String> - Get all registered state keys from store
-
getStateKeysForNamespace(
String namespace) → List< String> - Get state keys for a namespace
-
mockComputed<
T> (T compute()) → Computed< T> - Create a mock Computed for testing
-
mockRx<
T> (T value) → Rx< T> - Create a mock Rx for testing
-
mockSwiftFuture<
T> () → SwiftFuture< T> - Create a mock SwiftFuture for testing
-
runAsyncTest<
T> (Future< T> test()) → Future<T> - Create a test that waits for all async operations
-
runInTransaction<
T> (T test()) → T - Run a test with transaction support
-
setupTestEnvironment(
) → void - Setup test environment
-
teardownTestEnvironment(
) → void - Teardown test environment
-
testMark(
Widget builder(BuildContext)) → Widget - Create a test widget with Mark
-
testMarkWithApp(
Widget builder(BuildContext)) → Widget - Create a test widget with Mark and MaterialApp
-
waitForAsync(
) → Future< void> - Wait for all async operations to complete
-
waitForCondition(
bool condition(), {Duration timeout = const Duration(seconds: 5), Duration pollInterval = const Duration(milliseconds: 100)}) → Future< void> - Wait for a specific condition to be true
-
waitForRxValue<
T> (Rx< T> rx, T expectedValue, {Duration timeout = const Duration(seconds: 5)}) → Future<void> - Wait for a specific Rx value
-
waitForSwiftFuture<
T> (SwiftFuture< T> future, {Duration timeout = const Duration(seconds: 5)}) → Future<void> - Wait for SwiftFuture to complete (success or error)
-
waitForSwiftFutureError<
T> (SwiftFuture< T> future, {Duration timeout = const Duration(seconds: 5)}) → Future<void> - Wait for SwiftFuture to error
-
waitForSwiftFutureSuccess<
T> (SwiftFuture< T> future, {Duration timeout = const Duration(seconds: 5)}) → Future<void> - Wait for SwiftFuture to succeed
-
waitForTransactions(
) → Future< void> - Wait for transactions to complete