mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: no longer need to delete all options before each test (#1348)
This commit is contained in:
parent
10229ca8b5
commit
da3d575295
@ -54,7 +54,6 @@ void main() {
|
||||
return bloc;
|
||||
},
|
||||
act: (bloc) async {
|
||||
_removeFieldOptions(bloc);
|
||||
bloc.add(const SelectOptionEditorEvent.newOption("A"));
|
||||
},
|
||||
wait: gridResponseDuration(),
|
||||
@ -72,7 +71,6 @@ void main() {
|
||||
return bloc;
|
||||
},
|
||||
act: (bloc) async {
|
||||
_removeFieldOptions(bloc);
|
||||
bloc.add(const SelectOptionEditorEvent.newOption("A"));
|
||||
await Future.delayed(gridResponseDuration());
|
||||
bloc.add(SelectOptionEditorEvent.deleteOption(bloc.state.options[0]));
|
||||
@ -91,7 +89,6 @@ void main() {
|
||||
return bloc;
|
||||
},
|
||||
act: (bloc) async {
|
||||
_removeFieldOptions(bloc);
|
||||
bloc.add(const SelectOptionEditorEvent.newOption("A"));
|
||||
await Future.delayed(gridResponseDuration());
|
||||
SelectOptionPB optionUpdate = bloc.state.options[0]
|
||||
@ -115,7 +112,6 @@ void main() {
|
||||
return bloc;
|
||||
},
|
||||
act: (bloc) async {
|
||||
_removeFieldOptions(bloc);
|
||||
bloc.add(const SelectOptionEditorEvent.newOption("A"));
|
||||
await Future.delayed(gridResponseDuration());
|
||||
expect(bloc.state.selectedOptions.length, 1);
|
||||
@ -140,7 +136,6 @@ void main() {
|
||||
return bloc;
|
||||
},
|
||||
act: (bloc) async {
|
||||
_removeFieldOptions(bloc);
|
||||
bloc.add(const SelectOptionEditorEvent.newOption("A"));
|
||||
await Future.delayed(gridResponseDuration());
|
||||
bloc.add(const SelectOptionEditorEvent.trySelectOption("B"));
|
||||
@ -163,7 +158,6 @@ void main() {
|
||||
return bloc;
|
||||
},
|
||||
act: (bloc) async {
|
||||
_removeFieldOptions(bloc);
|
||||
bloc.add(const SelectOptionEditorEvent.newOption("A"));
|
||||
await Future.delayed(gridResponseDuration());
|
||||
bloc.add(const SelectOptionEditorEvent.newOption("B"));
|
||||
@ -187,7 +181,6 @@ void main() {
|
||||
return bloc;
|
||||
},
|
||||
act: (bloc) async {
|
||||
_removeFieldOptions(bloc);
|
||||
bloc.add(const SelectOptionEditorEvent.newOption("abcd"));
|
||||
await Future.delayed(gridResponseDuration());
|
||||
bloc.add(const SelectOptionEditorEvent.newOption("aaaa"));
|
||||
@ -206,10 +199,3 @@ void main() {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
void _removeFieldOptions(SelectOptionCellEditorBloc bloc) async {
|
||||
if (bloc.state.options.isNotEmpty) {
|
||||
bloc.add(const SelectOptionEditorEvent.deleteAllOptions());
|
||||
await Future.delayed(gridResponseDuration());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user