Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateCalendarButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Calendar);

// open setting
await tester.tapDatabaseSettingButton();
Expand All @@ -36,7 +35,11 @@ void main() {
await tester.tapGoButton();

// Create calendar view
await tester.createNewPageWithName(ViewLayoutPB.Calendar, 'calendar');
const name = 'calendar';
await tester.createNewPageWithName(
name: name,
layout: ViewLayoutPB.Calendar,
);

// Open setting
await tester.tapDatabaseSettingButton();
Expand All @@ -47,9 +50,9 @@ void main() {
await tester.tapFirstDayOfWeekStartFromMonday();

// Open the other page and open the new calendar page again
await tester.openPage(readme);
await tester.openPage(gettingStated);
await tester.pumpAndSettle(const Duration(milliseconds: 300));
await tester.openPage('calendar');
await tester.openPage(name, layout: ViewLayoutPB.Calendar);

// Open setting again and check the start from Monday is selected
await tester.tapDatabaseSettingButton();
Expand All @@ -65,8 +68,7 @@ void main() {
await tester.tapGoButton();

// Create the calendar view
await tester.tapAddButton();
await tester.tapCreateCalendarButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Calendar);

// Scroll until today's date cell is visible
await tester.scrollToToday();
Expand Down Expand Up @@ -135,8 +137,7 @@ void main() {
await tester.tapGoButton();

// Create the calendar view
await tester.tapAddButton();
await tester.tapCreateCalendarButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Calendar);

// Create a new event on the first of this month
final today = DateTime.now();
Expand Down
30 changes: 13 additions & 17 deletions frontend/appflowy_flutter/integration_test/database_cell_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

await tester.editCell(
rowIndex: 0,
Expand All @@ -38,7 +37,10 @@ void main() {
testWidgets('edit multiple text cells', (tester) async {
await tester.initializeAppFlowy();
await tester.tapGoButton();
await tester.createNewPageWithName(ViewLayoutPB.Grid, 'my grid');
await tester.createNewPageWithName(
name: 'my grid',
layout: ViewLayoutPB.Grid,
);
await tester.createField(FieldType.RichText, 'description');

await tester.editCell(
Expand Down Expand Up @@ -75,8 +77,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

const fieldType = FieldType.Number;

Expand Down Expand Up @@ -134,8 +135,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

await tester.assertCheckboxCell(rowIndex: 0, isSelected: false);
await tester.tapCheckboxCellInGrid(rowIndex: 0);
Expand All @@ -153,8 +153,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

const fieldType = FieldType.CreatedTime;
// Create a create time field
Expand All @@ -172,8 +171,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

const fieldType = FieldType.LastEditedTime;
// Create a last time field
Expand All @@ -191,8 +189,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

const fieldType = FieldType.DateTime;
await tester.createField(fieldType, fieldType.name);
Expand Down Expand Up @@ -288,9 +285,9 @@ void main() {
await tester.tapGoButton();

const fieldType = FieldType.SingleSelect;
await tester.tapAddButton();

// When create a grid, it will create a single select field by default
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Tap the cell to invoke the selection option editor
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
Expand Down Expand Up @@ -366,8 +363,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

const fieldType = FieldType.MultiSelect;
await tester.createField(fieldType, fieldType.name);
Expand Down
28 changes: 11 additions & 17 deletions frontend/appflowy_flutter/integration_test/database_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Invoke the field editor
await tester.tapGridFieldWithName('Name');
Expand All @@ -35,8 +34,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Invoke the field editor
await tester.tapGridFieldWithName('Type');
Expand All @@ -58,8 +56,7 @@ void main() {
await tester.tapGoButton();

// create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// create a field
await tester.createField(FieldType.Checklist, 'checklist');
Expand All @@ -73,8 +70,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// create a field
await tester.createField(FieldType.Checkbox, 'New field 1');
Expand All @@ -94,8 +90,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// create a field
await tester.scrollToRight(find.byType(GridPage));
Expand All @@ -115,8 +110,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// create a field
await tester.scrollToRight(find.byType(GridPage));
Expand All @@ -136,8 +130,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

await tester.scrollToRight(find.byType(GridPage));
await tester.tapNewPropertyButton();
Expand All @@ -157,8 +150,7 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

for (final fieldType in [
FieldType.Checklist,
Expand Down Expand Up @@ -190,7 +182,9 @@ void main() {
await tester.initializeAppFlowy();
await tester.tapGoButton();

await tester.createNewPageWithName(ViewLayoutPB.Grid);
await tester.createNewPageWithName(
layout: ViewLayoutPB.Grid,
);

// Invoke the field editor
await tester.tapGridFieldWithName('Type');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'util/database_test_op.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

group('grid', () {
group('database filter', () {
testWidgets('add text filter', (tester) async {
await tester.openV020database();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:appflowy/plugins/database_view/widgets/row/row_banner.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flutter/material.dart';
Expand All @@ -19,8 +20,7 @@ void main() {
await tester.tapGoButton();

// Create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
Expand All @@ -34,8 +34,7 @@ void main() {
await tester.tapGoButton();

// Create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
Expand All @@ -55,8 +54,7 @@ void main() {
await tester.tapGoButton();

// Create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
Expand Down Expand Up @@ -85,8 +83,7 @@ void main() {
await tester.tapGoButton();

// Create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
Expand All @@ -108,8 +105,7 @@ void main() {
await tester.tapGoButton();

// Create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
Expand Down Expand Up @@ -144,8 +140,7 @@ void main() {
await tester.tapGoButton();

// Create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
Expand All @@ -160,8 +155,7 @@ void main() {
await tester.tapGoButton();

// Create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
Expand Down Expand Up @@ -201,8 +195,7 @@ void main() {
await tester.tapGoButton();

// Create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
Expand Down Expand Up @@ -241,8 +234,7 @@ void main() {
await tester.tapGoButton();

// Create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
Expand All @@ -258,8 +250,7 @@ void main() {
await tester.tapGoButton();

// Create a new grid
await tester.tapAddButton();
await tester.tapCreateGridButton();
await tester.createNewPageWithName(layout: ViewLayoutPB.Grid);

// Hover first row and then open the row page
await tester.openFirstRowDetailPage();
Expand Down
Loading