mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-11-02 02:53:59 +00:00
fix: date reminder test (#6681)
This commit is contained in:
parent
0ea2da424f
commit
eff37d74dc
@ -2,6 +2,7 @@ import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/mention/mention_date_block.dart';
|
||||
import 'package:appflowy/workspace/application/settings/date_time/date_format_ext.dart';
|
||||
import 'package:appflowy/workspace/presentation/widgets/date_picker/appflowy_date_picker.dart';
|
||||
import 'package:appflowy/workspace/presentation/widgets/toggle/toggle.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
@ -50,17 +51,18 @@ void main() {
|
||||
await tester.tap(find.byType(MentionDateBlock));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final currentTime = DateFormat('HH:mm').format(DateTime.now());
|
||||
|
||||
// tap the toggle of include time
|
||||
await tester.tap(find.byType(Toggle));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// add time 11:12
|
||||
final textField = find.byWidgetPredicate(
|
||||
(widget) =>
|
||||
widget is TextField && widget.controller!.text == currentTime,
|
||||
);
|
||||
final textField = find
|
||||
.descendant(
|
||||
of: find.byType(AppFlowyDatePicker),
|
||||
matching: find.byType(TextField),
|
||||
)
|
||||
.last;
|
||||
await tester.pumpUntilFound(textField);
|
||||
await tester.enterText(textField, "11:12");
|
||||
await tester.testTextInput.receiveAction(TextInputAction.done);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user