super_test library

Classes

FakeHardwareKeyboard
A fake HardwareKeyboard, which can be used to simulate keys being pressed while new keys are pressed, e.g., CMD being pressed when the user then presses C to copy or V to paste.
FakeServicesBinding
An AutomatedTestWidgetsFlutterBinding with a fake HardwareKeyboard, which can be used to simulate keys being pressed while new keys are pressed, e.g., CMD being pressed when the user then presses C to copy or V to paste.
FindsNothing
ImeConnectionWithUpdateCount
A TextInputConnection that tracks the number of content updates, to verify within tests.
InputAndGestureTuple
A combination of an inputSource and a gestureMode.
MatchesGoldenFileWithPixelAllowance
A special version of MatchesGoldenFile that allows a specified number of pixels to be different between golden files before considering the test to be a failure.
PixelDiffGoldenComparator
A golden file comparator that allows a specified number of pixels to be different between the golden image file and the test image file, and still pass.

Extensions

Finders on CommonFinders
RenderBoxAccess on Finder
Extension that accesses a Finder's results assuming it finds a RenderBox.
TesterWindowSize on WidgetTester

Constants

defaultAppleShortcuts → const Map<ShortcutActivator, Intent>
Default shortcuts for the Apple platforms.
defaultNonAppleShortcuts → const Map<ShortcutActivator, Intent>
Default shortcuts for Windows, Linux, Android and Fuchsia.
defaultWebShortcuts → const Map<ShortcutActivator, Intent>
Default shortcuts for web.
goldenSizeLarge → const Size
goldenSizeLongStrip → const Size
goldenSizeMedium → const Size
goldenSizeSmall → const Size
goldenSizeXLarge → const Size

Properties

defaultFlutterShortcuts Map<ShortcutActivator, Intent>
Generates the default shortcut key bindings based on the defaultTargetPlatform.
no setter
inputAndGestureVariants ValueVariant<InputAndGestureTuple>
final
inputSourceVariant ValueVariant<TextInputSource>
final

Functions

hrThenParagraphDoc() MutableDocument
longDoc() MutableDocument
longTextDoc() MutableDocument
matchesGoldenFileWithPixelAllowance(Object key, int maxPixelMismatchCount, {int? version}) MatchesGoldenFile
A matcher that expects given content to match the golden file referenced by key, allowing up to maxPixelMismatchCount different pixels before considering the test to be a failure.
paragraphThenHrDoc() MutableDocument
paragraphThenHrThenParagraphDoc() MutableDocument
singleBlockDoc() MutableDocument
singleParagraphDoc() MutableDocument
singleParagraphDocShortText() MutableDocument
singleParagraphEmptyDoc() MutableDocument
singleParagraphShortDoc() MutableDocument
singleParagraphWithLinkDoc() MutableDocument
testGoldensOnAllPlatforms(String description, WidgetTesterCallback test, {bool skip = false, Size? windowSize}) → void
Runs one golden test for every platform, e.g., Android, iOS, Web, Mac, Windows, Linux.
testGoldensOnAndroid(String description, WidgetTesterCallback test, {bool skip = false, Size? windowSize}) → void
A golden test that configures itself as a Android platform before executing the given test, and nullifies the Android configuration when the test is done.
testGoldensOniOS(String description, WidgetTesterCallback test, {bool skip = false, Size? windowSize}) → void
A golden test that configures itself as a iOS platform before executing the given test, and nullifies the iOS configuration when the test is done.
testGoldensOnLinux(String description, WidgetTesterCallback test, {bool skip = false, Size? windowSize}) → void
A golden test that configures itself as a Linux platform before executing the given test, and nullifies the Linux configuration when the test is done.
testGoldensOnMac(String description, WidgetTesterCallback test, {bool skip = false, Size? windowSize}) → void
A golden test that configures itself as a Mac platform before executing the given test, and nullifies the Mac configuration when the test is done.
testGoldensOnMobile(String description, WidgetTesterCallback test, {bool skip = false, Size? windowSize}) → void
Runs one golden test for Android and iOS.
testGoldensOnWindows(String description, WidgetTesterCallback test, {bool skip = false, Size? windowSize}) → void
A golden test that configures itself as a Windows platform before executing the given test, and nullifies the Windows configuration when the test is done.
twoParagraphEmptyDoc() MutableDocument