fix: board unit test fix (#3813)

* fix: board unit test fix

* fix: oopsies
This commit is contained in:
Richard Shiue 2023-10-27 22:33:45 +08:00 committed by GitHub
parent a2f2cdebb7
commit 653c831473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -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(

View File

@ -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}");
});
}