// 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.selected_item_builder.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('NYC'),findsOneWidget);awaittester.tap(find.text('NYC'));awaittester.pumpAndSettle();awaittester.tap(find.text('San Francisco').last);awaittester.pumpAndSettle();expect(find.text('SF'),findsOneWidget);});}