yaru_test 0.3.0 copy "yaru_test: ^0.3.0" to clipboard
yaru_test: ^0.3.0 copied to clipboard

PlatformLinux

Provides extensions for testing Yaru applications.

Yaru Test #

pub license: MPL CI codecov

Provides extensions for testing Yaru Flutter applications.

Usage #

dev_dependencies:
  yaru_test: <version>
copied to clipboard
import 'package:yaru_test/yaru_test.dart';
copied to clipboard

Before #

final button = find.widgetWithText(OutlinedButton, ...);
expect(tester.widget<OutlinedButton>(button).enabled, isTrue);

final checkButton = find.widgetWithText(YaruCheckButton...);
expect(tester.widget<YaruCheckButton>(checkButton).value, isTrue);

final listTile = find.widgetWithText(ListTile, ...);
expect(tester.widget<ListTile>(listTile).onTap, isNull);

final textField = find.widgetWithText(TextField, ...);
expect(tester.widget<TextField>(textField).focusNode?.hasFocus, isTrue);
copied to clipboard

After #

expect(find.button(...), isEnabled);
expect(find.checkButton(...), isChecked);
expect(find.listTile(...), isDisabled);
expect(find.radioButton<T>(...), isChecked);
expect(find.textField(...), hasFocus);
copied to clipboard
1
likes
140
points
2.75k
downloads

Publisher

verified publisherubuntu.com

Weekly Downloads

2024.09.15 - 2025.03.30

Provides extensions for testing Yaru applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

flutter, flutter_test, yaru, yaru_window_platform_interface

More

Packages that depend on yaru_test