123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pbenum.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('update layout', (tester) async {
- await tester.initializeAppFlowy();
- await tester.tapGoButton();
- await tester.tapAddButton();
- await tester.tapCreateGridButton();
- // open setting
- await tester.tapDatabaseSettingButton();
- // select the layout
- await tester.tapDatabaseLayoutButton();
- // select layout by board
- await tester.selectDatabaseLayoutType(DatabaseLayoutPB.Board);
- await tester.assertCurrentDatabaseLayoutType(DatabaseLayoutPB.Board);
- await tester.pumpAndSettle();
- });
- testWidgets('update layout multiple times', (tester) async {
- await tester.initializeAppFlowy();
- await tester.tapGoButton();
- await tester.tapAddButton();
- await tester.tapCreateGridButton();
- // open setting
- await tester.tapDatabaseSettingButton();
- await tester.tapDatabaseLayoutButton();
- await tester.selectDatabaseLayoutType(DatabaseLayoutPB.Board);
- await tester.assertCurrentDatabaseLayoutType(DatabaseLayoutPB.Board);
- await tester.tapDatabaseSettingButton();
- await tester.tapDatabaseLayoutButton();
- await tester.selectDatabaseLayoutType(DatabaseLayoutPB.Calendar);
- await tester.assertCurrentDatabaseLayoutType(DatabaseLayoutPB.Calendar);
- await tester.pumpAndSettle();
- });
- });
- }
|