refactor: cell data transform logic (#5039)

* refactor: cell data transform logic

* chore: remove redundant select option event

* chore: adapt tests to changes
This commit is contained in:
Richard Shiue
2024-04-11 14:49:36 +08:00
committed by GitHub
parent 828f312294
commit b7b4ea2da1
37 changed files with 574 additions and 912 deletions

View File

@ -91,12 +91,19 @@ void main() {
"Expect 3 but receive ${bloc.state.options.length}. Options: ${bloc.state.options}",
);
bloc.add(SelectOptionCellEditorEvent.deleteOption(bloc.state.options[0]));
await gridResponseFuture();
assert(
bloc.state.options.length == 2,
"Expect 2 but receive ${bloc.state.options.length}. Options: ${bloc.state.options}",
);
bloc.add(const SelectOptionCellEditorEvent.deleteAllOptions());
await gridResponseFuture();
assert(
bloc.state.options.isEmpty,
"Expect empty but receive ${bloc.state.options.length}",
"Expect empty but receive ${bloc.state.options.length}. Options: ${bloc.state.options}",
);
});