mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: reminder on date (#4288)
* feat: support reminder on date * feat: support reminder on date in database * fix: include time static * fix: do not force unwrap * chore: clean flutter code * test: add test for reminder in database * fix: interpret reminder option * feat: date and reminder on mobile * feat: improve notification actions and support open row * feat: support dates in document * fix: minor changes + review * feat: support reminder on mobile in document * feat: support open row on database reminder mobile * test: add more tests * fix: first part of review * fix: open row responsibility * fix: abstract application logic from presentation layer * fix: update reminder on date cell update * test: fix failing test * fix: show correct selected day after end date toggled
This commit is contained in:
@ -1,14 +1,18 @@
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/database/widgets/row/row_detail.dart';
|
||||
import 'package:appflowy/plugins/document/presentation/banner.dart';
|
||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/header/document_header_node_widget.dart';
|
||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/header/emoji_icon_widget.dart';
|
||||
import 'package:appflowy/workspace/application/sidebar/folder/folder_bloc.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/home_stack.dart';
|
||||
import 'package:appflowy/workspace/presentation/home/menu/view/view_item.dart';
|
||||
import 'package:appflowy/workspace/presentation/notifications/widgets/notification_item.dart';
|
||||
import 'package:appflowy/workspace/presentation/widgets/date_picker/widgets/reminder_selector.dart';
|
||||
import 'package:appflowy/workspace/presentation/widgets/view_title_bar.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'util.dart';
|
||||
@ -242,4 +246,29 @@ extension Expectation on WidgetTester {
|
||||
);
|
||||
expect(icon, findsOneWidget);
|
||||
}
|
||||
|
||||
void expectSelectedReminder(ReminderOption option) {
|
||||
final findSelectedText = find.descendant(
|
||||
of: find.byType(ReminderSelector),
|
||||
matching: find.text(option.label),
|
||||
);
|
||||
|
||||
expect(findSelectedText, findsOneWidget);
|
||||
}
|
||||
|
||||
void expectNotificationItems(int amount) {
|
||||
final findItems = find.byType(NotificationItem);
|
||||
|
||||
expect(findItems, findsNWidgets(amount));
|
||||
}
|
||||
|
||||
void expectToSeeRowDetailsPageDialog() {
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byType(RowDetailPage),
|
||||
matching: find.byType(SimpleDialog),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user