flutter_test_helpers 0.1.0
flutter_test_helpers: ^0.1.0 copied to clipboard
Mock data generators, test utilities, and widget testing helpers for Flutter applications. A comprehensive testing toolkit that supports all platforms including WASM.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased] #
0.1.0 - 2025-11-04 #
Added #
- Added TestUtilities class with comprehensive testing helper methods:
createTestApp()- Creates a test app with MaterialApp wrappercreateTestAppWithTheme()- Creates a test app with custom themewaitForCondition()- Waits for a condition to become true with timeoutfindByKey()- Finds widgets by keyfindByText()- Finds widgets by texttap()- Taps a widget using finderenterText()- Enters text into a widgetscrollTo()- Scrolls to a widget
- Added WidgetTester extensions for convenient testing:
tapByKey()- Tap widget by keytapByText()- Tap widget by text contenttapByType<T>()- Tap widget by typeenterTextByKey()- Enter text by keyenterTextByType<T>()- Enter text by widget typescrollToKey()- Scroll to widget by keyscrollToText()- Scroll to widget by textwaitForWidget()- Wait for widget to appearwaitForWidgetToDisappear()- Wait for widget to disappear
- Added Finder extensions for enhanced widget finding:
hasOne- Checks if exactly one widget is foundhasMultiple- Checks if multiple widgets are foundfirstWidget- Gets first widget or nullallWidgets- Gets all widgets foundfirstElement- Gets first element or nullallElements- Gets all elements found
- Added comprehensive test examples in
example/test_example_test.dart - Added interactive demo page in example app demonstrating all testing features
- Added utilities.gif demonstration to README
- Added library-level documentation for better API documentation coverage
Changed #
- Moved
flutter_testfrom dev_dependencies to dependencies (required for test utilities) - Reorganized README with Demo section before Features section
- Arranged README GIFs in 3-column grid layout for better visual presentation
- Enhanced example app with interactive scrollable list demo
- Improved documentation and code formatting across all files
Fixed #
- Fixed all linting issues including line length violations
- Fixed duplicate key errors in example app
- Achieved 160/160 pana score with full documentation coverage
- Resolved all static analysis warnings
0.0.7 - 2025-01-15 #
Fixed #
- Reduced topics count to 5 maximum as required by pub.flutter-io.cn
- Fixed README GIF image paths to use GitHub raw URLs for pub.flutter-io.cn compatibility
- Resized README GIFs to phone-friendly width (300px) for better mobile viewing
Added #
- Added assets/gifs directory with all extension demonstration GIFs
0.0.6 - 2025-11-02 #
Fixed #
- Fixed random number generation in MockDataGenerators to use proper Random instance instead of DateTime, resolving issue where randomStringList generated identical strings
- Fixed List.random extension to use proper Random instance instead of DateTime milliseconds
- Removed duplicate removeWhereAll method that was just calling removeWhere
- Added missing import for dart:math in extensions.dart
- Fixed line length issues to comply with 80-character limit across all files
Changed #
- Prevented instantiation of MockDataGenerators and WidgetTestingHelpers classes (they only contain static methods)
- Sorted exports alphabetically in flutter_test_helpers.dart main export file
- Restructured example app into separate screens for each feature category, enabling easier screenshot capture
- Replaced Material Icons with emojis and text characters in example app for better cross-platform compatibility and icon visibility
Removed #
- Removed lib/main.dart file (should not exist in a library package)
0.0.5 - 2025-09-27 #
Fixed #
- Fixed DateTime extension methods to properly handle microseconds for endOfDay, endOfMonth, and endOfYear
- Resolved widget testing helper issues with Directionality context for cross-platform compatibility
- Fixed MediaQuery widget test conflicts by using proper widget finder strategies
- Corrected navigation widget tests to include proper route definitions
Changed #
- Updated widget testing helpers to use Directionality instead of MaterialApp/Scaffold for better test isolation
- Enhanced test coverage with 99 comprehensive tests across all functionality
- Improved analysis options configuration by removing deprecated and unrecognized lint rules
- Optimized package metadata for better discoverability and Pana scoring
Added #
- Enhanced integration tests for cross-platform functionality verification
- Improved example application demonstrating WASM compatibility
- Better error handling and test reliability across all platforms
0.0.4 - 2025-08-25 #
Changed #
- Updated package version to 0.0.4 for maintenance release
- Enhanced platform support verification and testing
- Improved WASM compatibility and web platform support
- Optimized example application structure for better testing
- Enhanced dependency management and version compatibility
0.0.3 - 2025-08-25 #
Changed #
- Updated package version to 0.0.3 for maintenance release
- Improved code quality and linting compliance
- Enhanced platform support verification
- Optimized analysis configuration for better scoring
0.0.1 - 2024-12-19 #
Added #
- Initial release of flutter_test_helpers package
- Mock data generators for common Flutter data types
- Test utilities for widget testing
- Widget testing helpers and extensions
- Support for all 6 platforms: iOS, Android, Web, Windows, macOS, Linux
- WASM compatibility
- Comprehensive test coverage
- Flutter linting rules compliance