File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
frontend/rust-lib/flowy-grid/tests/grid/field_test Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,30 @@ async fn grid_switch_from_multi_select_to_text_test() {
234234// check -> "Yes"
235235// unchecked -> ""
236236#[ tokio:: test]
237- async fn grid_switch_from_checkbox_to_text_test ( ) { }
237+ async fn grid_switch_from_checkbox_to_text_test ( ) {
238+ let mut test = GridFieldTest :: new ( ) . await ;
239+ let field_rev = test. get_first_field_rev ( FieldType :: Checkbox ) ;
240+
241+ let scripts = vec ! [
242+ SwitchToField {
243+ field_id: field_rev. id. clone( ) ,
244+ new_field_type: FieldType :: RichText ,
245+ } ,
246+ AssertCellContent {
247+ field_id: field_rev. id. clone( ) ,
248+ row_index: 1 ,
249+ from_field_type: FieldType :: Checkbox ,
250+ expected_content: "Yes" . to_string( ) ,
251+ } ,
252+ AssertCellContent {
253+ field_id: field_rev. id. clone( ) ,
254+ row_index: 2 ,
255+ from_field_type: FieldType :: Checkbox ,
256+ expected_content: "No" . to_string( ) ,
257+ } ,
258+ ] ;
259+ test. run_scripts ( scripts) . await ;
260+ }
238261
239262// Test when switching the current field from Checkbox to Text test
240263// input:
You can’t perform that action at this time.
0 commit comments