mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-11 19:16:45 +00:00

* chore: create orphan view handler * feat: save icon url and cover url in view * feat: implement emoji picker UI * chore: config ui * chore: config ui again * chore: replace RowPB with RowMetaPB to exposing more row information * fix: compile error * feat: show emoji in row * chore: update * test: insert emoji test * test: add update emoji test * test: add remove emoji test * test: add create field tests * test: add create row and delete row integration tests * test: add create row from row menu * test: document in row detail page * test: delete, duplicate row in row detail page * test: check the row count displayed in grid page * test: rename existing field in grid page * test: update field type of exisiting field in grid page * test: delete field test * test: add duplicate field test * test: add hide field test * test: add edit text cell test * test: add insert text to text cell test * test: add edit number cell test * test: add edit multiple number cells * test: add edit checkbox cell test * feat: integrate editor into database row * test: add edit create time and last edit time cell test * test: add edit date cell by selecting a date test * chore: remove unused code * chore: update checklist bg color * test: add update database layout test --------- Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
86 lines
2.4 KiB
Dart
86 lines
2.4 KiB
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:integration_test/integration_test.dart';
|
|
|
|
import 'util/database_test_op.dart';
|
|
import 'util/util.dart';
|
|
|
|
void main() {
|
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
|
|
group('grid', () {
|
|
const location = 'appflowy';
|
|
|
|
setUp(() async {
|
|
await TestFolder.cleanTestLocation(location);
|
|
await TestFolder.setTestLocation(location);
|
|
});
|
|
|
|
tearDown(() async {
|
|
await TestFolder.cleanTestLocation(location);
|
|
});
|
|
|
|
tearDownAll(() async {
|
|
await TestFolder.cleanTestLocation(null);
|
|
});
|
|
|
|
testWidgets('create row of the grid', (tester) async {
|
|
await tester.initializeAppFlowy();
|
|
await tester.tapGoButton();
|
|
|
|
await tester.tapAddButton();
|
|
await tester.tapCreateGridButton();
|
|
await tester.tapCreateRowButtonInGrid();
|
|
|
|
// The initial number of rows is 3
|
|
await tester.assertNumberOfRowsInGridPage(4);
|
|
await tester.pumpAndSettle();
|
|
});
|
|
|
|
testWidgets('create row from row menu of the grid', (tester) async {
|
|
await tester.initializeAppFlowy();
|
|
await tester.tapGoButton();
|
|
|
|
await tester.tapAddButton();
|
|
await tester.tapCreateGridButton();
|
|
await tester.hoverOnFirstRowOfGrid();
|
|
|
|
await tester.tapCreateRowButtonInRowMenuOfGrid();
|
|
|
|
// The initial number of rows is 3
|
|
await tester.assertNumberOfRowsInGridPage(4);
|
|
await tester.assertRowCountInGridPage(4);
|
|
await tester.pumpAndSettle();
|
|
});
|
|
|
|
testWidgets('delete row of the grid', (tester) async {
|
|
await tester.initializeAppFlowy();
|
|
await tester.tapGoButton();
|
|
|
|
await tester.tapAddButton();
|
|
await tester.tapCreateGridButton();
|
|
await tester.hoverOnFirstRowOfGrid();
|
|
|
|
// Open the row menu and then click the delete
|
|
await tester.tapRowMenuButtonInGrid();
|
|
await tester.tapDeleteOnRowMenu();
|
|
|
|
// The initial number of rows is 3
|
|
await tester.assertNumberOfRowsInGridPage(2);
|
|
await tester.assertRowCountInGridPage(2);
|
|
await tester.pumpAndSettle();
|
|
});
|
|
|
|
testWidgets('check number of row indicator in the initial grid',
|
|
(tester) async {
|
|
await tester.initializeAppFlowy();
|
|
await tester.tapGoButton();
|
|
|
|
await tester.tapAddButton();
|
|
await tester.tapCreateGridButton();
|
|
await tester.assertRowCountInGridPage(3);
|
|
|
|
await tester.pumpAndSettle();
|
|
});
|
|
});
|
|
}
|