mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

Tests for `app_bar.0`, `app_bar.1`, `app_bar.2`, `app_bar.3`, `sliver_app_bar.1` and `sliver_app_bar.4` were already present. But directory name was `appbar` rather than `app_bar`. I've renamed the directory to `app_bar` since example files uses that only. Part of #130459
20 lines
689 B
Dart
20 lines
689 B
Dart
// Copyright 2014 The Flutter 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:flutter/material.dart';
|
|
import 'package:flutter_api_samples/material/app_bar/app_bar.2.dart' as example;
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
void main() {
|
|
testWidgets('Appbar and actions', (WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const example.AppBarApp(),
|
|
);
|
|
|
|
expect(find.byType(AppBar), findsOneWidget);
|
|
expect(find.widgetWithText(TextButton, 'Action 1'), findsOneWidget);
|
|
expect(find.widgetWithText(TextButton, 'Action 2'), findsOneWidget);
|
|
});
|
|
}
|