mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 14:47:13 -04:00
test: grid switch from date to text test (#1616)
* test: grid switch from date to text test * test: change back the DateTime format to US
This commit is contained in:
parent
52c8f32c82
commit
aae8259f63
1 changed files with 23 additions and 1 deletions
|
@ -270,7 +270,29 @@ async fn grid_switch_from_text_to_checkbox_test() {}
|
||||||
// input:
|
// input:
|
||||||
// 1647251762 -> Mar 14,2022 (This string will be different base on current data setting)
|
// 1647251762 -> Mar 14,2022 (This string will be different base on current data setting)
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn grid_switch_from_date_to_text_test() {}
|
async fn grid_switch_from_date_to_text_test() {
|
||||||
|
let mut test = GridFieldTest::new().await;
|
||||||
|
let field_rev = test.get_first_field_rev(FieldType::DateTime).clone();
|
||||||
|
let scripts = vec![
|
||||||
|
SwitchToField {
|
||||||
|
field_id: field_rev.id.clone(),
|
||||||
|
new_field_type: FieldType::RichText,
|
||||||
|
},
|
||||||
|
AssertCellContent {
|
||||||
|
field_id: field_rev.id.clone(),
|
||||||
|
row_index: 2,
|
||||||
|
from_field_type: FieldType::DateTime,
|
||||||
|
expected_content: "2022/03/14".to_string(),
|
||||||
|
},
|
||||||
|
AssertCellContent {
|
||||||
|
field_id: field_rev.id.clone(),
|
||||||
|
row_index: 3,
|
||||||
|
from_field_type: FieldType::DateTime,
|
||||||
|
expected_content: "2022/11/17".to_string(),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
test.run_scripts(scripts).await;
|
||||||
|
}
|
||||||
|
|
||||||
// Test when switching the current field from Number to Text test
|
// Test when switching the current field from Number to Text test
|
||||||
// input:
|
// input:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue