// 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/popupmenu/popupmenu.0.dart'asexample;import'package:flutter_test/flutter_test.dart';voidmain(){testWidgets('Can select a menu item',(WidgetTestertester)async{finalKeypopupButtonKey=UniqueKey();awaittester.pumpWidget(MaterialApp(home:Scaffold(body:example.MyStatefulWidget(key:popupButtonKey,),),),);awaittester.tap(find.byKey(popupButtonKey));awaittester.pump();awaittester.pump(constDuration(seconds:1));// finish the menu animationawaittester.tapAt(constOffset(1.0,1.0));awaittester.pumpAndSettle();expect(find.text('_selectedMenu: itemOne'),findsNothing);});}