Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
test: grid switch from multi select to text test (#1608)
Kelvinfaf8f73206c1
diff --git a/frontend/rust-lib/flowy-grid/tests/grid/field_test/test.rs b/frontend/rust-lib/flowy-grid/tests/grid/field_test/test.rsindex 9bb033b2df..a46e3be53f 100644--- a/frontend/rust-lib/flowy-grid/tests/grid/field_test/test.rs+++ b/frontend/rust-lib/flowy-grid/tests/grid/field_test/test.rs@@ -202,7 +202,32 @@ async fn grid_switch_from_checkbox_to_select_option_test() {// input:// option1, option2 -> "option1.name, option2.name"#[tokio::test]-async fn grid_switch_from_multi_select_to_text_test() {}+async fn grid_switch_from_multi_select_to_text_test() {+ let mut test = GridFieldTest::new().await;+ let field_rev = test.get_first_field_rev(FieldType::MultiSelect).clone();++ let mut multi_select_type_option = test.get_multi_select_type_option(&field_rev.id);++ let script_switchfield = vec![SwitchToField {+ field_id: field_rev.id.clone(),+ new_field_type: FieldType::RichText,+ }];++ test.run_scripts(script_switchfield).await;++ let script_assertfield = vec![AssertCellContent {+ field_id: field_rev.id.clone(),+ row_index: 0,+ from_field_type: FieldType::MultiSelect,+ expected_content: format!(+ "{},{}",+ multi_select_type_option.get_mut(0).unwrap().id.to_string(),+ multi_select_type_option.get_mut(1).unwrap().id.to_string()+ ),+ }];++ test.run_scripts(script_assertfield).await;+}// Test when switching the current field from Checkbox to Text test// input: