Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: board unit test fix (#3813)

Richard Shiue653c83147373
diff --git a/frontend/appflowy_flutter/test/bloc_test/board_test/create_card_test.dart b/frontend/appflowy_flutter/test/bloc_test/board_test/create_card_test.dart
index 556ad69420..a8f8ec6909 100644
--- a/frontend/appflowy_flutter/test/bloc_test/board_test/create_card_test.dart
+++ b/frontend/appflowy_flutter/test/bloc_test/board_test/create_card_test.dart
@@ -20,16 +20,16 @@ void main() {
)..add(const BoardEvent.initial());
await boardResponseFuture();
- final groupId = boardBloc.state.groupIds.first;
+ final groupId = boardBloc.state.groupIds.last;
- // the group at index 0 is the 'No status' group;
+ // the group at index 3 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]));
+ boardBloc.add(BoardEvent.createBottomRow(boardBloc.state.groupIds[3]));
await boardResponseFuture();
assert(
diff --git a/frontend/appflowy_flutter/test/bloc_test/board_test/group_by_multi_select_field_test.dart b/frontend/appflowy_flutter/test/bloc_test/board_test/group_by_multi_select_field_test.dart
index b6d66c6bec..a73e05f224 100644
--- a/frontend/appflowy_flutter/test/bloc_test/board_test/group_by_multi_select_field_test.dart
+++ b/frontend/appflowy_flutter/test/bloc_test/board_test/group_by_multi_select_field_test.dart
@@ -39,7 +39,7 @@ void main() {
);
await boardResponseFuture();
- //assert only have the 'No status' group
+ // assert only have the 'No status' group
final boardBloc = BoardBloc(
view: context.gridView,
databaseController: DatabaseController(view: context.gridView),
@@ -107,8 +107,8 @@ void main() {
final groups =
boardBloc.groupControllers.values.map((e) => e.group).toList();
- assert(groups[0].groupName == "No ${multiSelectField.name}");
- assert(groups[1].groupName == "B");
- assert(groups[2].groupName == "A");
+ assert(groups[0].groupName == "B");
+ assert(groups[1].groupName == "A");
+ assert(groups[2].groupName == "No ${multiSelectField.name}");
});
}