mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: fix tests
This commit is contained in:
@ -9,13 +9,13 @@ use flowy_grid_data_model::revision::RowMetaChangeset;
|
||||
async fn grid_create_row_count_test() {
|
||||
let mut test = GridRowTest::new().await;
|
||||
let scripts = vec![
|
||||
AssertRowCount(3),
|
||||
AssertRowCount(5),
|
||||
CreateEmptyRow,
|
||||
CreateEmptyRow,
|
||||
CreateRow {
|
||||
row_rev: test.row_builder().build(),
|
||||
},
|
||||
AssertRowCount(6),
|
||||
AssertRowCount(8),
|
||||
];
|
||||
test.run_scripts(scripts).await;
|
||||
}
|
||||
@ -31,11 +31,11 @@ async fn grid_update_row() {
|
||||
cell_by_field_id: Default::default(),
|
||||
};
|
||||
|
||||
let scripts = vec![AssertRowCount(3), CreateRow { row_rev }, UpdateRow { changeset }];
|
||||
let scripts = vec![AssertRowCount(5), CreateRow { row_rev }, UpdateRow { changeset }];
|
||||
test.run_scripts(scripts).await;
|
||||
|
||||
let expected_row = test.last_row().unwrap();
|
||||
let scripts = vec![AssertRow { expected_row }, AssertRowCount(4)];
|
||||
let scripts = vec![AssertRow { expected_row }, AssertRowCount(6)];
|
||||
test.run_scripts(scripts).await;
|
||||
}
|
||||
|
||||
@ -46,19 +46,19 @@ async fn grid_delete_row() {
|
||||
let row_2 = test.row_builder().build();
|
||||
let row_ids = vec![row_1.id.clone(), row_2.id.clone()];
|
||||
let scripts = vec![
|
||||
AssertRowCount(3),
|
||||
AssertRowCount(5),
|
||||
CreateRow { row_rev: row_1 },
|
||||
CreateRow { row_rev: row_2 },
|
||||
AssertBlockCount(1),
|
||||
AssertBlock {
|
||||
block_index: 0,
|
||||
row_count: 5,
|
||||
row_count: 7,
|
||||
start_row_index: 0,
|
||||
},
|
||||
DeleteRows { row_ids },
|
||||
AssertBlock {
|
||||
block_index: 0,
|
||||
row_count: 3,
|
||||
row_count: 5,
|
||||
start_row_index: 0,
|
||||
},
|
||||
];
|
||||
|
Reference in New Issue
Block a user