mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-23 09:01:21 +00:00

* refactor: get row/field data from row cache and field controller in cell controller * refactor: reorganize cell controller tasks and builder * refactor: rename cell_builder.dart * refactor: database editable cell builder * refactor: database card cell builder * fix: make it work * fix: start cell listener and adjust cell style on desktop * fix: build card cell * fix: remove unnecessary await in tests * fix: cell cache validation * fix: row detail banner bugs * fix: row detail field doesn't update * fix: calendar event card * test: fix integration tests * fix: adjust cell builders to fix cell controller getting disposed * chore: code review * fix: bugs on mobile * test: add grid header integration tests * test: suppress warnings, reduce flaky test and group tests
51 lines
1.7 KiB
Dart
51 lines
1.7 KiB
Dart
import 'package:appflowy/plugins/database/widgets/row/cells/select_option_cell/extension.dart';
|
|
import 'package:appflowy/plugins/database/widgets/row/row_property.dart';
|
|
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:integration_test/integration_test.dart';
|
|
import 'package:appflowy_board/appflowy_board.dart';
|
|
|
|
import '../util/util.dart';
|
|
|
|
void main() {
|
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
|
|
group('board group test', () {
|
|
testWidgets('move row to another group', (tester) async {
|
|
const card1Name = 'Card 1';
|
|
await tester.initializeAppFlowy();
|
|
await tester.tapGoButton();
|
|
|
|
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);
|
|
final card1 = find.ancestor(
|
|
of: find.text(card1Name),
|
|
matching: find.byType(AppFlowyGroupCard),
|
|
);
|
|
final doingGroup = find.text('Doing');
|
|
final doingGroupCenter = tester.getCenter(doingGroup);
|
|
final card1Center = tester.getCenter(card1);
|
|
|
|
await tester.timedDrag(
|
|
card1,
|
|
doingGroupCenter.translate(-card1Center.dx, -card1Center.dy),
|
|
const Duration(seconds: 1),
|
|
);
|
|
await tester.pumpAndSettle();
|
|
await tester.tap(card1);
|
|
await tester.pumpAndSettle();
|
|
|
|
final card1StatusFinder = find.descendant(
|
|
of: find.byType(RowPropertyList),
|
|
matching: find.descendant(
|
|
of: find.byType(SelectOptionTag),
|
|
matching: find.byType(Text),
|
|
),
|
|
);
|
|
expect(card1StatusFinder, findsNWidgets(1));
|
|
final card1StatusText = tester.widget<Text>(card1StatusFinder).data;
|
|
expect(card1StatusText, 'Doing');
|
|
});
|
|
});
|
|
}
|