pickle_parser library

A Flutter package for parsing pickle files and executing Cucumber steps in widget tests.

This library provides functionality to parse Gherkin/Cucumber pickle files and execute the corresponding test steps using Flutter's widget testing framework.

The main entry point is the pickleParser function which takes a WidgetTester and the path to a pickle file, then executes the Cucumber steps defined in the file.

Classes

CustomStepRegistry
Registry for custom step implementations.

Functions

createElementFinder(String element) Future<Finder>
Creates a finder for the specified element with enhanced selector support.
createTextFinder(String textSelector) Finder
Creates a flexible text finder based on the text selector format.
getCucumberStepTestCode(String step, WidgetTester tester) Future<void>
Converts a Cucumber step string into executable Flutter test code.
getIconData(String iconName) IconData
Returns the IconData for a given icon name string.
getType(String type) Future<Type>
Returns the Type object for a given widget type name string.
pickleParser(WidgetTester tester, String dir) Future<void>
Parses a pickle file and executes Cucumber steps using the provided WidgetTester.
pumpForSeconds(WidgetTester tester, int seconds) Future<void>
Pumps the widget tree for the specified number of seconds.
pumpUntilFound(WidgetTester tester, Finder finder, {Duration timeout = const Duration(seconds: 30)}) Future<void>
Pumps the widget tree until the specified finder locates a widget or times out.
registerCustomStep(String stepText, CustomStepHandler handler) → void
Convenience function to register a custom step with exact text matching.
registerCustomStepPattern(RegExp pattern, CustomStepHandler handler) → void
Convenience function to register a custom step with regex pattern matching.
registerCustomStepTemplate(String template, CustomStepHandler handler) → void
Convenience function to register a custom step with template matching.

Typedefs

CustomStepHandler = Future<bool> Function(String step, WidgetTester tester)
Signature for custom step handlers.