使用 flutter_driver 查找颤振三明治菜单按钮
Scaffold(
key: widget.scaffoldKey,
drawer: Observer(builder: (BuildContext context) {
return DrawerMenu(
user: controller.appStore.user,
onTapLogout: controller.loginController.logout,
);
}),
appBar: widget.appBar,
body: widget.body);
test('test by inserting valid username and login', () async {
await driver.tap(buttonFinder);
expect(await driver.getText(loginName), "LoginName");
});