Skip to content

Commit

Permalink
Add a test target to the app_that_uses_foo/ example (#6687)
Browse files Browse the repository at this point in the history
* Add a test target to the app_that_uses_foo/ example

* changelog
  • Loading branch information
kenzieschmoll committed Nov 8, 2023
1 parent d9b3aa8 commit 71e102c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/devtools_extensions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## 0.0.10
* Add a test target to the `app_that_uses_foo` example that can also be debugged
with the DevTools extension provided by `package:foo`.
* Add an example of performing expression evaluations from a DevTools extension.
* Add an example of registering a service extension and calling it from a DevTools extension.
* Document the DevTools extension examples.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2023 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:app_that_uses_foo/main.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:foo/foo.dart';

// This test can be run to verify that the `package:foo` DevTools extension
// loads properly when debugging a test target with DevTools.
//
// To test this, run the following command and copy the VM service URI to
// connect to DevTools:
//
// flutter run test/app_that_uses_foo_test.dart --start-paused

void main() {
testWidgets('Builds $MyAppThatUsesFoo', (tester) async {
await tester.pumpWidget(const MyAppThatUsesFoo());
await tester.pumpAndSettle();

expect(find.byType(MyAppThatUsesFoo), findsOneWidget);
expect(find.byType(FooWidget), findsOneWidget);
});
}

0 comments on commit 71e102c

Please sign in to comment.