refactor: save default group order

This commit is contained in:
appflowy
2022-10-01 11:00:15 +08:00
parent 5763e289ef
commit 62d0a31a76
18 changed files with 154 additions and 127 deletions

View File

@ -370,6 +370,28 @@ async fn group_move_group_test() {
test.run_scripts(scripts).await;
}
#[tokio::test]
async fn group_default_move_group_test() {
let mut test = GridGroupTest::new().await;
let group_0 = test.group_at_index(0).await;
let group_3 = test.group_at_index(3).await;
let scripts = vec![
MoveGroup {
from_group_index: 3,
to_group_index: 0,
},
AssertGroup {
group_index: 0,
expected_group: group_3,
},
AssertGroup {
group_index: 1,
expected_group: group_0,
},
];
test.run_scripts(scripts).await;
}
#[tokio::test]
async fn group_insert_single_select_option_test() {
let mut test = GridGroupTest::new().await;
@ -402,7 +424,7 @@ async fn group_group_by_other_field() {
group_index: 1,
row_count: 2,
},
AssertGroupCount(4),
AssertGroupCount(5),
];
test.run_scripts(scripts).await;
}