flutter_test_helpers 0.1.0 copy "flutter_test_helpers: ^0.1.0" to clipboard
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 wrapper
    • createTestAppWithTheme() - Creates a test app with custom theme
    • waitForCondition() - Waits for a condition to become true with timeout
    • findByKey() - Finds widgets by key
    • findByText() - Finds widgets by text
    • tap() - Taps a widget using finder
    • enterText() - Enters text into a widget
    • scrollTo() - Scrolls to a widget
  • Added WidgetTester extensions for convenient testing:
    • tapByKey() - Tap widget by key
    • tapByText() - Tap widget by text content
    • tapByType<T>() - Tap widget by type
    • enterTextByKey() - Enter text by key
    • enterTextByType<T>() - Enter text by widget type
    • scrollToKey() - Scroll to widget by key
    • scrollToText() - Scroll to widget by text
    • waitForWidget() - Wait for widget to appear
    • waitForWidgetToDisappear() - Wait for widget to disappear
  • Added Finder extensions for enhanced widget finding:
    • hasOne - Checks if exactly one widget is found
    • hasMultiple - Checks if multiple widgets are found
    • firstWidget - Gets first widget or null
    • allWidgets - Gets all widgets found
    • firstElement - Gets first element or null
    • allElements - 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_test from 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.2 - 2024-12-19 #

Changed #

  • Updated package version to 0.0.2 for maintenance release

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
1
likes
160
points
179
downloads

Publisher

verified publisherbechattaoui.dev

Weekly Downloads

Mock data generators, test utilities, and widget testing helpers for Flutter applications. A comprehensive testing toolkit that supports all platforms including WASM.

Repository (GitHub)
View/report issues

Topics

#testing #mock-data #test-utilities #widget-testing #flutter

Documentation

API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

flutter, flutter_test

More

Packages that depend on flutter_test_helpers