|
@@ -1,19 +1,31 @@
|
|
|
|
+import 'dart:io';
|
|
import 'dart:ui';
|
|
import 'dart:ui';
|
|
|
|
|
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
|
import 'package:appflowy/plugins/database_view/application/setting/setting_bloc.dart';
|
|
import 'package:appflowy/plugins/database_view/application/setting/setting_bloc.dart';
|
|
import 'package:appflowy/plugins/database_view/board/presentation/board_page.dart';
|
|
import 'package:appflowy/plugins/database_view/board/presentation/board_page.dart';
|
|
import 'package:appflowy/plugins/database_view/calendar/presentation/calendar_page.dart';
|
|
import 'package:appflowy/plugins/database_view/calendar/presentation/calendar_page.dart';
|
|
|
|
+import 'package:appflowy/plugins/database_view/grid/presentation/widgets/filter/choicechip/checkbox.dart';
|
|
|
|
+import 'package:appflowy/plugins/database_view/grid/presentation/widgets/filter/choicechip/text.dart';
|
|
|
|
+import 'package:appflowy/plugins/database_view/grid/presentation/widgets/filter/create_filter_list.dart';
|
|
|
|
+import 'package:appflowy/plugins/database_view/grid/presentation/widgets/filter/disclosure_button.dart';
|
|
|
|
+import 'package:appflowy/plugins/database_view/grid/presentation/widgets/filter/filter_menu_item.dart';
|
|
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_cell_action_sheet.dart';
|
|
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_cell_action_sheet.dart';
|
|
|
|
+import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_list.dart';
|
|
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_option_editor.dart';
|
|
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_option_editor.dart';
|
|
|
|
+import 'package:appflowy/plugins/database_view/grid/presentation/widgets/toolbar/filter_button.dart';
|
|
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/toolbar/grid_layout.dart';
|
|
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/toolbar/grid_layout.dart';
|
|
|
|
+import 'package:appflowy/plugins/database_view/widgets/row/cells/checklist_cell/checklist_progress_bar.dart';
|
|
|
|
+import 'package:appflowy/plugins/database_view/widgets/row/cells/select_option_cell/extension.dart';
|
|
import 'package:appflowy/plugins/database_view/widgets/row/row_document.dart';
|
|
import 'package:appflowy/plugins/database_view/widgets/row/row_document.dart';
|
|
import 'package:appflowy/plugins/database_view/widgets/row/cells/date_cell/date_editor.dart';
|
|
import 'package:appflowy/plugins/database_view/widgets/row/cells/date_cell/date_editor.dart';
|
|
import 'package:appflowy/plugins/database_view/widgets/setting/database_setting.dart';
|
|
import 'package:appflowy/plugins/database_view/widgets/setting/database_setting.dart';
|
|
import 'package:appflowy/plugins/database_view/widgets/setting/setting_button.dart';
|
|
import 'package:appflowy/plugins/database_view/widgets/setting/setting_button.dart';
|
|
|
|
+import 'package:appflowy/workspace/presentation/widgets/pop_up_action.dart';
|
|
import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pbenum.dart';
|
|
import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pbenum.dart';
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
|
|
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
|
|
|
|
+import 'package:flowy_infra_ui/style_widget/text_field.dart';
|
|
import 'package:flowy_infra_ui/widget/buttons/primary_button.dart';
|
|
import 'package:flowy_infra_ui/widget/buttons/primary_button.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter/services.dart';
|
|
@@ -36,8 +48,39 @@ import 'package:table_calendar/table_calendar.dart';
|
|
|
|
|
|
import 'base.dart';
|
|
import 'base.dart';
|
|
import 'common_operations.dart';
|
|
import 'common_operations.dart';
|
|
|
|
+import 'expectation.dart';
|
|
|
|
+import 'package:path/path.dart' as p;
|
|
|
|
+
|
|
|
|
+import 'mock/mock_file_picker.dart';
|
|
|
|
|
|
extension AppFlowyDatabaseTest on WidgetTester {
|
|
extension AppFlowyDatabaseTest on WidgetTester {
|
|
|
|
+ Future<void> openV020database() async {
|
|
|
|
+ await initializeAppFlowy();
|
|
|
|
+ await tapGoButton();
|
|
|
|
+
|
|
|
|
+ // expect to see a readme page
|
|
|
|
+ expectToSeePageName(readme);
|
|
|
|
+
|
|
|
|
+ await tapAddButton();
|
|
|
|
+ await tapImportButton();
|
|
|
|
+
|
|
|
|
+ final testFileNames = ['v020.afdb'];
|
|
|
|
+ final fileLocation = await currentFileLocation();
|
|
|
|
+ for (final fileName in testFileNames) {
|
|
|
|
+ final str = await rootBundle.loadString(
|
|
|
|
+ p.join(
|
|
|
|
+ 'assets/test/workspaces/database',
|
|
|
|
+ fileName,
|
|
|
|
+ ),
|
|
|
|
+ );
|
|
|
|
+ File(p.join(fileLocation, fileName)).writeAsStringSync(str);
|
|
|
|
+ }
|
|
|
|
+ // mock get files
|
|
|
|
+ await mockPickFilePaths(testFileNames, name: 'import_files');
|
|
|
|
+ await tapDatabaseRawDataButton();
|
|
|
|
+ await openPage('v020');
|
|
|
|
+ }
|
|
|
|
+
|
|
Future<void> hoverOnFirstRowOfGrid() async {
|
|
Future<void> hoverOnFirstRowOfGrid() async {
|
|
final findRow = find.byType(GridRow);
|
|
final findRow = find.byType(GridRow);
|
|
expect(findRow, findsWidgets);
|
|
expect(findRow, findsWidgets);
|
|
@@ -51,29 +94,27 @@ extension AppFlowyDatabaseTest on WidgetTester {
|
|
required FieldType fieldType,
|
|
required FieldType fieldType,
|
|
required String input,
|
|
required String input,
|
|
}) async {
|
|
}) async {
|
|
- final findRow = find.byType(GridRow);
|
|
|
|
- final findCell = finderForFieldType(fieldType);
|
|
|
|
-
|
|
|
|
- final cell = find.descendant(
|
|
|
|
- of: findRow.at(rowIndex),
|
|
|
|
- matching: findCell,
|
|
|
|
- );
|
|
|
|
|
|
+ final cell = cellFinder(rowIndex, fieldType);
|
|
|
|
|
|
expect(cell, findsOneWidget);
|
|
expect(cell, findsOneWidget);
|
|
await enterText(cell, input);
|
|
await enterText(cell, input);
|
|
await pumpAndSettle();
|
|
await pumpAndSettle();
|
|
}
|
|
}
|
|
|
|
|
|
- Future<void> tapCheckboxCellInGrid({
|
|
|
|
- required int rowIndex,
|
|
|
|
- }) async {
|
|
|
|
- final findRow = find.byType(GridRow);
|
|
|
|
- final findCell = finderForFieldType(FieldType.Checkbox);
|
|
|
|
-
|
|
|
|
- final cell = find.descendant(
|
|
|
|
|
|
+ Finder cellFinder(int rowIndex, FieldType fieldType) {
|
|
|
|
+ final findRow = find.byType(GridRow, skipOffstage: false);
|
|
|
|
+ final findCell = finderForFieldType(fieldType);
|
|
|
|
+ return find.descendant(
|
|
of: findRow.at(rowIndex),
|
|
of: findRow.at(rowIndex),
|
|
matching: findCell,
|
|
matching: findCell,
|
|
|
|
+ skipOffstage: false,
|
|
);
|
|
);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> tapCheckboxCellInGrid({
|
|
|
|
+ required int rowIndex,
|
|
|
|
+ }) async {
|
|
|
|
+ final cell = cellFinder(rowIndex, FieldType.Checkbox);
|
|
|
|
|
|
final button = find.descendant(
|
|
final button = find.descendant(
|
|
of: cell,
|
|
of: cell,
|
|
@@ -88,14 +129,7 @@ extension AppFlowyDatabaseTest on WidgetTester {
|
|
required int rowIndex,
|
|
required int rowIndex,
|
|
required bool isSelected,
|
|
required bool isSelected,
|
|
}) async {
|
|
}) async {
|
|
- final findRow = find.byType(GridRow);
|
|
|
|
- final findCell = finderForFieldType(FieldType.Checkbox);
|
|
|
|
-
|
|
|
|
- final cell = find.descendant(
|
|
|
|
- of: findRow.at(rowIndex),
|
|
|
|
- matching: findCell,
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
|
|
+ final cell = cellFinder(rowIndex, FieldType.Checkbox);
|
|
var finder = find.byType(CheckboxCellUncheck);
|
|
var finder = find.byType(CheckboxCellUncheck);
|
|
if (isSelected) {
|
|
if (isSelected) {
|
|
finder = find.byType(CheckboxCellCheck);
|
|
finder = find.byType(CheckboxCellCheck);
|
|
@@ -114,36 +148,118 @@ extension AppFlowyDatabaseTest on WidgetTester {
|
|
required int rowIndex,
|
|
required int rowIndex,
|
|
required FieldType fieldType,
|
|
required FieldType fieldType,
|
|
}) async {
|
|
}) async {
|
|
- final findRow = find.byType(GridRow);
|
|
|
|
- final findCell = finderForFieldType(fieldType);
|
|
|
|
|
|
+ final cell = cellFinder(rowIndex, fieldType);
|
|
|
|
+ expect(cell, findsOneWidget);
|
|
|
|
+ await tapButton(cell, warnIfMissed: false);
|
|
|
|
+ }
|
|
|
|
|
|
- final cell = find.descendant(
|
|
|
|
- of: findRow.at(rowIndex),
|
|
|
|
- matching: findCell,
|
|
|
|
|
|
+ /// The [fieldName] must be uqniue in the grid.
|
|
|
|
+ Future<void> assertCellContent({
|
|
|
|
+ required int rowIndex,
|
|
|
|
+ required FieldType fieldType,
|
|
|
|
+ required String content,
|
|
|
|
+ }) async {
|
|
|
|
+ final findCell = cellFinder(rowIndex, fieldType);
|
|
|
|
+ final findContent = find.descendant(
|
|
|
|
+ of: findCell,
|
|
|
|
+ matching: find.text(content),
|
|
|
|
+ skipOffstage: false,
|
|
);
|
|
);
|
|
|
|
|
|
- expect(cell, findsOneWidget);
|
|
|
|
- await tapButton(cell);
|
|
|
|
|
|
+ final text = find.descendant(
|
|
|
|
+ of: find.byType(TextField),
|
|
|
|
+ matching: findContent,
|
|
|
|
+ skipOffstage: false,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ expect(text, findsOneWidget);
|
|
}
|
|
}
|
|
|
|
|
|
- Future<void> assertCellContent({
|
|
|
|
|
|
+ Future<void> assertSingleSelectOption({
|
|
|
|
+ required int rowIndex,
|
|
|
|
+ required String content,
|
|
|
|
+ }) async {
|
|
|
|
+ final findCell = cellFinder(rowIndex, FieldType.SingleSelect);
|
|
|
|
+ if (content.isNotEmpty) {
|
|
|
|
+ final finder = find.descendant(
|
|
|
|
+ of: findCell,
|
|
|
|
+ matching: find.byWidgetPredicate(
|
|
|
|
+ (widget) => widget is SelectOptionTag && widget.name == content,
|
|
|
|
+ ),
|
|
|
|
+ );
|
|
|
|
+ expect(finder, findsOneWidget);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> assertMultiSelectOption({
|
|
|
|
+ required int rowIndex,
|
|
|
|
+ required List<String> contents,
|
|
|
|
+ }) async {
|
|
|
|
+ final findCell = cellFinder(rowIndex, FieldType.MultiSelect);
|
|
|
|
+ for (final content in contents) {
|
|
|
|
+ if (content.isNotEmpty) {
|
|
|
|
+ final finder = find.descendant(
|
|
|
|
+ of: findCell,
|
|
|
|
+ matching: find.byWidgetPredicate(
|
|
|
|
+ (widget) => widget is SelectOptionTag && widget.name == content,
|
|
|
|
+ ),
|
|
|
|
+ );
|
|
|
|
+ expect(finder, findsOneWidget);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> assertChecklistCellInGrid({
|
|
|
|
+ required int rowIndex,
|
|
|
|
+ required double percent,
|
|
|
|
+ }) async {
|
|
|
|
+ final findCell = cellFinder(rowIndex, FieldType.Checklist);
|
|
|
|
+ final finder = find.descendant(
|
|
|
|
+ of: findCell,
|
|
|
|
+ matching: find.byWidgetPredicate(
|
|
|
|
+ (widget) {
|
|
|
|
+ if (widget is ChecklistProgressBar) {
|
|
|
|
+ return widget.percent == percent;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ },
|
|
|
|
+ ),
|
|
|
|
+ );
|
|
|
|
+ expect(finder, findsOneWidget);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> assertDateCellInGrid({
|
|
required int rowIndex,
|
|
required int rowIndex,
|
|
required FieldType fieldType,
|
|
required FieldType fieldType,
|
|
required String content,
|
|
required String content,
|
|
}) async {
|
|
}) async {
|
|
- final findRow = find.byType(GridRow);
|
|
|
|
- final findCell = finderForFieldType(fieldType);
|
|
|
|
- final cell = find.descendant(
|
|
|
|
|
|
+ final findRow = find.byType(GridRow, skipOffstage: false);
|
|
|
|
+ final findCell = find.descendant(
|
|
of: findRow.at(rowIndex),
|
|
of: findRow.at(rowIndex),
|
|
- matching: findCell,
|
|
|
|
|
|
+ matching: find.byWidgetPredicate(
|
|
|
|
+ (widget) => widget is GridDateCell && widget.fieldType == fieldType,
|
|
|
|
+ ),
|
|
|
|
+ skipOffstage: false,
|
|
);
|
|
);
|
|
|
|
|
|
- final findContent = find.descendant(
|
|
|
|
- of: cell,
|
|
|
|
- matching: find.text(content),
|
|
|
|
|
|
+ final dateCellText = find.descendant(
|
|
|
|
+ of: findCell,
|
|
|
|
+ matching: find.byType(GridDateCellText),
|
|
);
|
|
);
|
|
|
|
|
|
- expect(findContent, findsOneWidget);
|
|
|
|
|
|
+ final text = find.descendant(
|
|
|
|
+ of: dateCellText,
|
|
|
|
+ matching: find.byWidgetPredicate(
|
|
|
|
+ (widget) {
|
|
|
|
+ if (widget is FlowyText) {
|
|
|
|
+ return widget.title == content;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ },
|
|
|
|
+ ),
|
|
|
|
+ skipOffstage: false,
|
|
|
|
+ );
|
|
|
|
+ expect(text, findsOneWidget);
|
|
}
|
|
}
|
|
|
|
|
|
Future<void> selectDay({
|
|
Future<void> selectDay({
|
|
@@ -290,8 +406,13 @@ extension AppFlowyDatabaseTest on WidgetTester {
|
|
|
|
|
|
/// Must call [tapTypeOptionButton] first.
|
|
/// Must call [tapTypeOptionButton] first.
|
|
Future<void> selectFieldType(FieldType fieldType) async {
|
|
Future<void> selectFieldType(FieldType fieldType) async {
|
|
- final fieldTypeButton = find.byWidgetPredicate(
|
|
|
|
- (widget) => widget is FlowyText && widget.title == fieldType.title(),
|
|
|
|
|
|
+ final fieldTypeCell = find.byType(FieldTypeCell);
|
|
|
|
+
|
|
|
|
+ final fieldTypeButton = find.descendant(
|
|
|
|
+ of: fieldTypeCell,
|
|
|
|
+ matching: find.byWidgetPredicate(
|
|
|
|
+ (widget) => widget is FlowyText && widget.title == fieldType.title(),
|
|
|
|
+ ),
|
|
);
|
|
);
|
|
await tapButton(fieldTypeButton);
|
|
await tapButton(fieldTypeButton);
|
|
}
|
|
}
|
|
@@ -308,7 +429,10 @@ extension AppFlowyDatabaseTest on WidgetTester {
|
|
}
|
|
}
|
|
|
|
|
|
Future<void> assertNumberOfRowsInGridPage(int num) async {
|
|
Future<void> assertNumberOfRowsInGridPage(int num) async {
|
|
- expect(find.byType(GridRow), findsNWidgets(num));
|
|
|
|
|
|
+ expect(
|
|
|
|
+ find.byType(GridRow, skipOffstage: false),
|
|
|
|
+ findsNWidgets(num),
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
Future<void> assertDocumentExistInRowDetailPage() async {
|
|
Future<void> assertDocumentExistInRowDetailPage() async {
|
|
@@ -353,9 +477,7 @@ extension AppFlowyDatabaseTest on WidgetTester {
|
|
|
|
|
|
Future<void> dismissFieldEditor() async {
|
|
Future<void> dismissFieldEditor() async {
|
|
await sendKeyEvent(LogicalKeyboardKey.escape);
|
|
await sendKeyEvent(LogicalKeyboardKey.escape);
|
|
- await sendKeyEvent(LogicalKeyboardKey.escape);
|
|
|
|
- await sendKeyEvent(LogicalKeyboardKey.escape);
|
|
|
|
- await pumpAndSettle();
|
|
|
|
|
|
+ await pumpAndSettle(const Duration(milliseconds: 200));
|
|
}
|
|
}
|
|
|
|
|
|
Future<void> findFieldEditor(dynamic matcher) async {
|
|
Future<void> findFieldEditor(dynamic matcher) async {
|
|
@@ -405,6 +527,82 @@ extension AppFlowyDatabaseTest on WidgetTester {
|
|
await tapButton(find.byType(SettingButton));
|
|
await tapButton(find.byType(SettingButton));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ Future<void> tapDatabaseFilterButton() async {
|
|
|
|
+ await tapButton(find.byType(FilterButton));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> tapCreateFilterByFieldType(
|
|
|
|
+ FieldType fieldType,
|
|
|
|
+ String title,
|
|
|
|
+ ) async {
|
|
|
|
+ final findFilter = find.byWidgetPredicate(
|
|
|
|
+ (widget) =>
|
|
|
|
+ widget is GridFilterPropertyCell &&
|
|
|
|
+ widget.fieldInfo.fieldType == fieldType &&
|
|
|
|
+ widget.fieldInfo.name == title,
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ await tapButton(findFilter);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> tapFilterButtonInGrid(String filterName) async {
|
|
|
|
+ final findFilter = find.byType(FilterMenuItem);
|
|
|
|
+ final button = find.descendant(
|
|
|
|
+ of: findFilter,
|
|
|
|
+ matching: find.text(filterName),
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ await tapButton(button);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> enterTextInTextFilter(String text) async {
|
|
|
|
+ final findEditor = find.byType(TextFilterEditor);
|
|
|
|
+ final findTextField = find.descendant(
|
|
|
|
+ of: findEditor,
|
|
|
|
+ matching: find.byType(FlowyTextField),
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ await enterText(findTextField, text);
|
|
|
|
+ await pumpAndSettle(const Duration(milliseconds: 300));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> tapTextFilterDisclosureButtonInGrid() async {
|
|
|
|
+ final findEditor = find.byType(TextFilterEditor);
|
|
|
|
+ final findDisclosure = find.descendant(
|
|
|
|
+ of: findEditor,
|
|
|
|
+ matching: find.byType(DisclosureButton),
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ await tapButton(findDisclosure);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// must call [tapTextFilterDisclosureButtonInGrid] first.
|
|
|
|
+ Future<void> tapDeleteTextFilterButtonInGrid() async {
|
|
|
|
+ await tapButton(find.text(LocaleKeys.grid_settings_deleteFilter.tr()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> tapCheckboxFilterButtonInGrid() async {
|
|
|
|
+ await tapButton(find.byType(CheckboxFilterConditionList));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> tapCheckedButtonOnCheckboxFilter() async {
|
|
|
|
+ final button = find.descendant(
|
|
|
|
+ of: find.byType(HoverButton),
|
|
|
|
+ matching: find.text(LocaleKeys.grid_checkboxFilter_isChecked.tr()),
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ await tapButton(button);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Future<void> tapUnCheckedButtonOnCheckboxFilter() async {
|
|
|
|
+ final button = find.descendant(
|
|
|
|
+ of: find.byType(HoverButton),
|
|
|
|
+ matching: find.text(LocaleKeys.grid_checkboxFilter_isUnchecked.tr()),
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ await tapButton(button);
|
|
|
|
+ }
|
|
|
|
+
|
|
/// Should call [tapDatabaseSettingButton] first.
|
|
/// Should call [tapDatabaseSettingButton] first.
|
|
Future<void> tapDatabaseLayoutButton() async {
|
|
Future<void> tapDatabaseLayoutButton() async {
|
|
final findSettingItem = find.byType(DatabaseSettingItem);
|
|
final findSettingItem = find.byType(DatabaseSettingItem);
|
|
@@ -439,6 +637,10 @@ extension AppFlowyDatabaseTest on WidgetTester {
|
|
Future<void> assertCurrentDatabaseLayoutType(DatabaseLayoutPB layout) async {
|
|
Future<void> assertCurrentDatabaseLayoutType(DatabaseLayoutPB layout) async {
|
|
expect(finderForDatabaseLayoutType(layout), findsOneWidget);
|
|
expect(finderForDatabaseLayoutType(layout), findsOneWidget);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ Future<void> tapDatabaseRawDataButton() async {
|
|
|
|
+ await tapButtonWithName(LocaleKeys.importPanel_database.tr());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
Finder finderForDatabaseLayoutType(DatabaseLayoutPB layout) {
|
|
Finder finderForDatabaseLayoutType(DatabaseLayoutPB layout) {
|
|
@@ -457,24 +659,24 @@ Finder finderForDatabaseLayoutType(DatabaseLayoutPB layout) {
|
|
Finder finderForFieldType(FieldType fieldType) {
|
|
Finder finderForFieldType(FieldType fieldType) {
|
|
switch (fieldType) {
|
|
switch (fieldType) {
|
|
case FieldType.Checkbox:
|
|
case FieldType.Checkbox:
|
|
- return find.byType(GridCheckboxCell);
|
|
|
|
|
|
+ return find.byType(GridCheckboxCell, skipOffstage: false);
|
|
case FieldType.DateTime:
|
|
case FieldType.DateTime:
|
|
- return find.byType(GridDateCell);
|
|
|
|
|
|
+ return find.byType(GridDateCell, skipOffstage: false);
|
|
case FieldType.LastEditedTime:
|
|
case FieldType.LastEditedTime:
|
|
case FieldType.CreatedTime:
|
|
case FieldType.CreatedTime:
|
|
- return find.byType(GridDateCell);
|
|
|
|
|
|
+ return find.byType(GridDateCell, skipOffstage: false);
|
|
case FieldType.SingleSelect:
|
|
case FieldType.SingleSelect:
|
|
- return find.byType(GridSingleSelectCell);
|
|
|
|
|
|
+ return find.byType(GridSingleSelectCell, skipOffstage: false);
|
|
case FieldType.MultiSelect:
|
|
case FieldType.MultiSelect:
|
|
- return find.byType(GridMultiSelectCell);
|
|
|
|
|
|
+ return find.byType(GridMultiSelectCell, skipOffstage: false);
|
|
case FieldType.Checklist:
|
|
case FieldType.Checklist:
|
|
- return find.byType(GridChecklistCell);
|
|
|
|
|
|
+ return find.byType(GridChecklistCell, skipOffstage: false);
|
|
case FieldType.Number:
|
|
case FieldType.Number:
|
|
- return find.byType(GridNumberCell);
|
|
|
|
|
|
+ return find.byType(GridNumberCell, skipOffstage: false);
|
|
case FieldType.RichText:
|
|
case FieldType.RichText:
|
|
- return find.byType(GridTextCell);
|
|
|
|
|
|
+ return find.byType(GridTextCell, skipOffstage: false);
|
|
case FieldType.URL:
|
|
case FieldType.URL:
|
|
- return find.byType(GridURLCell);
|
|
|
|
|
|
+ return find.byType(GridURLCell, skipOffstage: false);
|
|
default:
|
|
default:
|
|
throw Exception('Unknown field type: $fieldType');
|
|
throw Exception('Unknown field type: $fieldType');
|
|
}
|
|
}
|