|
@@ -10,22 +10,23 @@ void main() {
|
|
|
boardTest = await AppFlowyBoardTest.ensureInitialized();
|
|
|
});
|
|
|
|
|
|
- group('$BoardBloc', () {
|
|
|
- test('create kanban baord card', () async {
|
|
|
- final context = await boardTest.createTestBoard();
|
|
|
- final boardBloc = BoardBloc(view: context.gridView)
|
|
|
- ..add(const BoardEvent.initial());
|
|
|
- await boardResponseFuture();
|
|
|
- final groupId = boardBloc.state.groupIds.first;
|
|
|
-
|
|
|
- // the group at index 0 is the 'No status' group;
|
|
|
- assert(boardBloc.groupControllers[groupId]!.group.rows.isEmpty);
|
|
|
- assert(boardBloc.state.groupIds.length == 4);
|
|
|
-
|
|
|
- boardBloc.add(BoardEvent.createBottomRow(boardBloc.state.groupIds[0]));
|
|
|
- await boardResponseFuture();
|
|
|
-
|
|
|
- assert(boardBloc.groupControllers[groupId]!.group.rows.length == 1);
|
|
|
- });
|
|
|
+ test('create kanban baord card', () async {
|
|
|
+ final context = await boardTest.createTestBoard();
|
|
|
+ final boardBloc = BoardBloc(view: context.gridView)
|
|
|
+ ..add(const BoardEvent.initial());
|
|
|
+ await boardResponseFuture();
|
|
|
+
|
|
|
+ final groupId = boardBloc.state.groupIds.first;
|
|
|
+
|
|
|
+ // the group at index 0 is the 'No status' group;
|
|
|
+ assert(boardBloc.groupControllers[groupId]!.group.rows.isEmpty);
|
|
|
+ assert(boardBloc.state.groupIds.length == 4,
|
|
|
+ 'but receive ${boardBloc.state.groupIds.length}');
|
|
|
+
|
|
|
+ boardBloc.add(BoardEvent.createBottomRow(boardBloc.state.groupIds[0]));
|
|
|
+ await boardResponseFuture();
|
|
|
+
|
|
|
+ assert(boardBloc.groupControllers[groupId]!.group.rows.length == 1,
|
|
|
+ 'but receive ${boardBloc.groupControllers[groupId]!.group.rows.length}');
|
|
|
});
|
|
|
}
|