fix(flutter): 精简个人资料并修正保存文案
This commit is contained in:
1 parent
dc73f4e3bb
commit
b2a8bfa59f
4 files changed
+7
-48
No files matched your search
@@ -28,15 +28,19 @@ void main() {
|
||||
AccountProfilePage(),
|
||||
repository: repository,
|
||||
auth: auth,
|
||||
locale: const Locale('zh'),
|
||||
);
|
||||
|
||||
final nickname = find.byKey(const Key('account-nickname'));
|
||||
expect(find.byKey(const Key('account-birthday')), findsNothing);
|
||||
expect(find.text('保存'), findsOneWidget);
|
||||
expect(tester.widget<TextField>(nickname).controller?.text, 'Nadia');
|
||||
await tester.enterText(nickname, 'Nadia Baru');
|
||||
await tester.tap(find.byKey(const Key('account-profile-save')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(repository.lastUpdate?.nickname, 'Nadia Baru');
|
||||
expect(repository.lastUpdate?.birthday, isNull);
|
||||
});
|
||||
|
||||
testWidgets('should_show_device_empty_state_when_list_is_empty', (
|
||||
|
||||
Reference in new issue
Block a user