File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
frontend/rust-lib/flowy-grid/tests/grid/field_test Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,29 @@ async fn grid_switch_from_text_to_checkbox_test() {}
270270// input:
271271// 1647251762 -> Mar 14,2022 (This string will be different base on current data setting)
272272#[ tokio:: test]
273- async fn grid_switch_from_date_to_text_test ( ) { }
273+ async fn grid_switch_from_date_to_text_test ( ) {
274+ let mut test = GridFieldTest :: new ( ) . await ;
275+ let field_rev = test. get_first_field_rev ( FieldType :: DateTime ) . clone ( ) ;
276+ let scripts = vec ! [
277+ SwitchToField {
278+ field_id: field_rev. id. clone( ) ,
279+ new_field_type: FieldType :: RichText ,
280+ } ,
281+ AssertCellContent {
282+ field_id: field_rev. id. clone( ) ,
283+ row_index: 2 ,
284+ from_field_type: FieldType :: DateTime ,
285+ expected_content: "2022/03/14" . to_string( ) ,
286+ } ,
287+ AssertCellContent {
288+ field_id: field_rev. id. clone( ) ,
289+ row_index: 3 ,
290+ from_field_type: FieldType :: DateTime ,
291+ expected_content: "2022/11/17" . to_string( ) ,
292+ } ,
293+ ] ;
294+ test. run_scripts ( scripts) . await ;
295+ }
274296
275297// Test when switching the current field from Number to Text test
276298// input:
You can’t perform that action at this time.
0 commit comments