// 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/dropdown/dropdown_button.0.dart'asexample;import'package:flutter_test/flutter_test.dart';voidmain(){testWidgets('Select an item from DropdownButton',(WidgetTestertester)async{awaittester.pumpWidget(constMaterialApp(home:Scaffold(body:example.DropdownButtonApp(),),),);expect(find.text('One'),findsOneWidget);awaittester.tap(find.text('One'));awaittester.pumpAndSettle();awaittester.tap(find.text('Two').last);awaittester.pumpAndSettle();expect(find.text('Two'),findsOneWidget);});}