Analyze code snippets in flutter_driver docs (#132337)
This commit is contained in:
committed by
GitHub
parent
33b66f6436
commit
32aa3128ee
@@ -83,6 +83,11 @@ const CommonFinders find = CommonFinders._();
|
||||
/// See also [FlutterDriver.waitFor].
|
||||
typedef EvaluatorFunction = dynamic Function();
|
||||
|
||||
// Examples can assume:
|
||||
// import 'package:flutter_driver/flutter_driver.dart';
|
||||
// import 'package:test/test.dart';
|
||||
// late FlutterDriver driver;
|
||||
|
||||
/// Drives a Flutter Application running in another process.
|
||||
abstract class FlutterDriver {
|
||||
/// Default constructor.
|
||||
@@ -478,7 +483,7 @@ abstract class FlutterDriver {
|
||||
///
|
||||
/// ```dart
|
||||
/// test('enters text in a text field', () async {
|
||||
/// var textField = find.byValueKey('enter-text-field');
|
||||
/// final SerializableFinder textField = find.byValueKey('enter-text-field');
|
||||
/// await driver.tap(textField); // acquire focus
|
||||
/// await driver.enterText('Hello!'); // enter text
|
||||
/// await driver.waitFor(find.text('Hello!')); // verify text appears on UI
|
||||
@@ -520,7 +525,7 @@ abstract class FlutterDriver {
|
||||
///
|
||||
/// ```dart
|
||||
/// test('submit text in a text field', () async {
|
||||
/// var textField = find.byValueKey('enter-text-field');
|
||||
/// final SerializableFinder textField = find.byValueKey('enter-text-field');
|
||||
/// await driver.tap(textField); // acquire focus
|
||||
/// await driver.enterText('Hello!'); // enter text
|
||||
/// await driver.waitFor(find.text('Hello!')); // verify text appears on UI
|
||||
|
||||
@@ -17,7 +17,7 @@ const Set<String> kGCRootEvents = <String>{
|
||||
/// Summarizes [TimelineEvents]s corresponding to [kGCRootEvents] category.
|
||||
///
|
||||
/// A sample event (some fields have been omitted for brevity):
|
||||
/// ```
|
||||
/// ```json
|
||||
/// {
|
||||
/// "name": "StartConcurrentMarking",
|
||||
/// "cat": "GC",
|
||||
|
||||
@@ -36,7 +36,7 @@ enum ProfileType {
|
||||
/// Summarizes [TimelineEvents]s corresponding to [kProfilingEvents] category.
|
||||
///
|
||||
/// A sample event (some fields have been omitted for brevity):
|
||||
/// ```
|
||||
/// ```json
|
||||
/// {
|
||||
/// "category": "embedder",
|
||||
/// "name": "CpuUsage",
|
||||
|
||||
@@ -16,7 +16,7 @@ const String _kPictureMemory = 'PictureMBytes';
|
||||
/// Summarizes [TimelineEvents]s corresponding to [kRasterCacheEvent] events.
|
||||
///
|
||||
/// A sample event (some fields have been omitted for brevity):
|
||||
/// ```
|
||||
/// ```json
|
||||
/// {
|
||||
/// "name": "RasterCache",
|
||||
/// "ts": 75598996256,
|
||||
|
||||
@@ -13,7 +13,7 @@ const String _kVsyncTransitionsMissed = 'vsync_transitions_missed';
|
||||
/// Summarizes [TimelineEvents]s corresponding to [kSceneDisplayLagEvent] events.
|
||||
///
|
||||
/// A sample event (some fields have been omitted for brevity):
|
||||
/// ```
|
||||
/// ```json
|
||||
/// {
|
||||
/// "name": "SceneDisplayLag",
|
||||
/// "ts": 408920509340,
|
||||
|
||||
Reference in New Issue
Block a user