Commit Graph

125 Commits

Author SHA1 Message Date
Michael Goderbauer
671d8eaf71
Relands "Add runWidget to bootstrap a widget tree without a default View" (#142344)
Reverts flutter/flutter#142339

In the original change one of the tests included the same view twice which resulted in a different failure than the expected one. The second commit contains the fix for this. I don't understand how this wasn't caught presubmit on CI.
2024-01-26 23:05:53 +00:00
auto-submit[bot]
114261a63a
Reverts "Add runWidget to bootstrap a widget tree without a default View" (#142339)
Reverts flutter/flutter#141484
Initiated by: eliasyishak
This change reverts the following previous change:
Original Description:
The existing `runApp` bootstraps the widget tree and renders the provided widget into the default view (which is currently the implicit View from `PlatformDispatcher.implicitView` and - in the future - may be a default-created window). Apps, that want more control over the View they are rendered in, need a new way to bootstrap the widget tree: `runWidget`. It does not make any assumptions about the View the provided widget is rendered into. Instead, it is up to the caller to include a View widget in the provided widget tree that specifies where content should be rendered. In the future, this may enable developers to create a custom window for their app instead of relying on the default-created one.
2024-01-26 21:06:27 +00:00
Michael Goderbauer
5b44596c5f
Add runWidget to bootstrap a widget tree without a default View (#141484)
The existing `runApp` bootstraps the widget tree and renders the provided widget into the default view (which is currently the implicit View from `PlatformDispatcher.implicitView` and - in the future - may be a default-created window). Apps, that want more control over the View they are rendered in, need a new way to bootstrap the widget tree: `runWidget`. It does not make any assumptions about the View the provided widget is rendered into. Instead, it is up to the caller to include a View widget in the provided widget tree that specifies where content should be rendered. In the future, this may enable developers to create a custom window for their app instead of relying on the default-created one.
2024-01-26 19:12:21 +00:00
Michael Goderbauer
68e346e41c
Remove outdated ignores from tool (#140467)
These were not ignoring anything (anymore).
2023-12-20 22:14:32 +00:00
pdblasi-google
e1ec3581bd
Updates AutomatedTestWidgetsFlutterBinding.pump to support microsecond precision (#132401)
* Updated `AutomatedTestWidgetsFlutterBinding.pump` to use microseconds instead of milliseconds
* Added a test to prevent regression of the microsecond precision
* Fixed a test that incorrectly assumed millisecond precision

Closes #112610
2023-08-14 23:24:47 +00:00
pdblasi-google
5df1c996ad
Adds SemanticsNode Finders for searching the semantics tree (#127137)
* Pulled `FinderBase` out of `Finder`
  * `FinderBase` can be used for any object, not just elements
  * Terminology was updated to be more "find" related
* Re-implemented `Finder` using `FinderBase<Element>`
  * Backwards compatibility maintained with `_LegacyFinderMixin`
* Introduced base classes for SemanticsNode finders
* Introduced basic SemanticsNode finders through `find.semantics`
* Updated some relevant matchers to make use of the more generic `FinderBase`

Closes #123634
Closes #115874
2023-08-10 21:31:06 +00:00
fzyzcjy
ffe94a2267
Add retry flag to flutter_test (#125851)
Closes https://github.com/flutter/flutter/issues/125920

I will add tests, polish code, etc, if this change looks generally OK!
2023-06-01 22:25:52 +00:00
Nate Bosch
dcfd35f8a7
Remove uses of deprecated test_api imports (#124732)
Most of these imports were never appropriate. The `test_api` package was never intended for use in `_test.dart` files.
Where possible move imports to `matcher`, otherwise move them to `test` or `flutter_test`.

Leave uses of `test_api` from `flutter_test` library code.
2023-04-20 20:55:28 +00:00
Ian Hickson
07c548c698
Apply BindingBase.checkInstance to TestDefaultBinaryMessengerBinding (#116937) 2023-02-13 23:55:58 +00:00
Michael Goderbauer
b0f1714b7b
Make Flex,Row,Column const for real (#119673)
* Make Flex,Row,Column const for real

* dart fix --apply

* fix snippets

* fix integration test

* add comment
2023-02-02 19:33:57 +00:00
Michael Goderbauer
a45727d813
Add MediaQuery to View (#118004)
* Add MediaQuery to View

* unify API

* fix test

* add test

* comment

* better doc

* Apply suggestions from code review

Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>

Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
2023-01-25 22:22:00 +00:00
nbayati
235a3252d2
Provide test API for accessibility announcements (#109661) 2022-10-26 18:05:07 +00:00
Xilai Zhang
8d3c7e7da6
Revert "AutomatedTestWidgetsFlutterBinding.pump provides wrong pump time stamp, probably because of forgetting the precision" (#113415) 2022-10-14 15:29:07 +00:00
fzyzcjy
1966aaf8ba
AutomatedTestWidgetsFlutterBinding.pump provides wrong pump time stamp, probably because of forgetting the precision (#112609) 2022-10-10 18:32:25 +00:00
Ian Hickson
9b2668a451
Minor fix compendium (#107874) 2022-08-11 02:33:07 +00:00
Pascal Welsch
80679f0b42
[flutter_test] perf: find.ancestor (#108868) 2022-08-03 21:59:05 +00:00
Anthony Oleinik
a494a12bb0
Add "excluding" optional parameter to TargetPlatformVariant to communicate cases where test should be ran everywhere but specific platforms (#106216)
added "excluding" optional parameter to targetPlatforms.all

Co-authored-by: Anthony Oleinik <oleina@google.com>
2022-06-22 12:13:26 -07:00
Michael Goderbauer
2b14e993a7
Cleanup random dead test code (#104568) 2022-05-25 10:23:10 -07:00
Xilai Zhang
de230d393c
Revert "Add ability for ModalRoutes to ignore pointers during transitions and do so on Cupertino routes (#95757)" (#104520)
This reverts commit 4c0b0be2da.
2022-05-24 11:10:13 -07:00
Will Lockwood
4c0b0be2da
Add ability for ModalRoutes to ignore pointers during transitions and do so on Cupertino routes (#95757) 2022-05-19 15:33:12 -07:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals (#102585) 2022-04-27 09:15:35 +02:00
Michael Goderbauer
3e406c6781
Prepare packages (minus tools,framework) for use_super_parameters (#100510) 2022-03-30 15:31:59 -07:00
Ian Hickson
ab89ce285f
Clean up the bindings APIs. (#89451) 2022-02-03 14:55:15 -08:00
Konstantin Scheglov
06515fe058
Ignore in _Location (#96553) 2022-01-13 13:25:05 -08:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint (#91409)" (#91461)
This reverts commit 5fd259be24.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint (#91409) 2021-10-07 20:13:02 -07:00
Darren Austin
271ed8b21f
Updated skipped tests for flutter_test directory. (#87880) 2021-08-09 11:06:35 -07:00
Darren Austin
8322e178fa
Revert "Added 'exclude' parameter to 'testWidgets()'. (#86397)" (#87515) 2021-08-02 18:05:04 -07:00
Darren Austin
eb62bce924
Added 'exclude' parameter to 'testWidgets()'. (#86397) 2021-07-22 12:35:40 -07:00
Danny Tuppeny
91b67e8eb1
Add a "variant: " prefix to variant descriptions in test names (#86701) 2021-07-20 09:16:03 -07:00
Ren You
3dea9f0251
Revert "Clean up the bindings APIs (#86438)" (#86484)
This reverts commit d056500bfe.
2021-07-15 09:29:16 -07:00
Ian Hickson
d056500bfe
Clean up the bindings APIs (#86438) 2021-07-14 14:41:24 -07:00
Zachary Anderson
7f741e9181
Revert "Clean up the bindings APIs (#86388)" (#86404)
This reverts commit 31de052e3f.
2021-07-13 21:32:29 -07:00
Ian Hickson
31de052e3f
Clean up the bindings APIs (#86388) 2021-07-13 18:31:11 -07:00
Ian Hickson
c800b9c3e4
Revert "Clean up the bindings APIs (#83843)" (#86386)
This reverts commit e2490f2906.
2021-07-13 15:47:40 -07:00
Ian Hickson
e2490f2906
Clean up the bindings APIs (#83843) 2021-07-13 12:41:03 -07:00
Ahmed Ashour
a3dc90c4f5
Add space before curly parentheses. (#85306) 2021-07-01 13:51:05 -07:00
Tong Mu
e3da1bd7aa
Test WidgetTester handling test pointers (#83337)
Adds tests to the following behaviors, which have existed without tests:

- When tapping during live testing, a message is printed with widgets that contain the tap location.
- When tapping during live testing, a mark is displayed on screen on the tap location.
2021-06-02 11:50:09 -07:00
Jonah Williams
025a3a7da3
[versions] roll package test redux (#83367) 2021-05-26 17:22:28 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations (#80817) 2021-04-21 13:49:03 -07:00
Jonah Williams
443d07b707
[versions] roll to latest test (#79099) 2021-03-31 07:45:40 -07:00
Michael Bui
39499bd2bf
make showKeyboard respect finder's skipOffstage value (#79034) 2021-03-29 18:19:03 -07:00
Jason Simmons
6757c7dd47
Use a null default skip value in testWidgets so it can inherit the group's skip flag (#76174) 2021-02-17 14:31:03 -08:00
Sam Rawlins
fcad4e2efe
Remove "unnecessary" imports in flutter_test (#76157) 2021-02-16 16:01:05 -08:00
Michael Goderbauer
8998167d0f
Make FlutterErrorDetails.exception non-nullable as documented (#67364) 2020-10-05 18:07:02 -07:00
Michael Goderbauer
cba170fbb2
Migrate the tests of flutter_test to null-safety (#67058) 2020-10-01 16:27:02 -07:00
Michael Goderbauer
19e07d2beb
Migrate flutter_test (#66663) 2020-09-30 17:03:40 -07:00
Hans Muller
73ce3f21d0
Updated old button references in packages/flutter_test (#63230) 2020-08-08 18:20:53 -07:00
Ming Lyu (CareF)
8081455394
revert widgettester breaking change (#62914) 2020-08-04 17:26:05 -07:00