|
@@ -9,19 +9,19 @@ async fn group_init_test() {
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
AssertGroupCount(4),
|
|
AssertGroupCount(4),
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 2,
|
|
row_count: 2,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_count: 2,
|
|
row_count: 2,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 2,
|
|
|
|
|
|
+ group_index: 3,
|
|
row_count: 1,
|
|
row_count: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 3,
|
|
|
|
|
|
+ group_index: 0,
|
|
row_count: 0,
|
|
row_count: 0,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
@@ -31,21 +31,21 @@ async fn group_init_test() {
|
|
#[tokio::test]
|
|
#[tokio::test]
|
|
async fn group_move_row_test() {
|
|
async fn group_move_row_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
- let group = test.group_at_index(0).await;
|
|
|
|
|
|
+ let group = test.group_at_index(1).await;
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
// Move the row at 0 in group0 to group1 at 1
|
|
// Move the row at 0 in group0 to group1 at 1
|
|
MoveRow {
|
|
MoveRow {
|
|
- from_group_index: 0,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
from_row_index: 0,
|
|
from_row_index: 0,
|
|
- to_group_index: 0,
|
|
|
|
|
|
+ to_group_index: 1,
|
|
to_row_index: 1,
|
|
to_row_index: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 2,
|
|
row_count: 2,
|
|
},
|
|
},
|
|
AssertRow {
|
|
AssertRow {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_index: 1,
|
|
row_index: 1,
|
|
row: group.rows.get(0).unwrap().clone(),
|
|
row: group.rows.get(0).unwrap().clone(),
|
|
},
|
|
},
|
|
@@ -56,24 +56,24 @@ async fn group_move_row_test() {
|
|
#[tokio::test]
|
|
#[tokio::test]
|
|
async fn group_move_row_to_other_group_test() {
|
|
async fn group_move_row_to_other_group_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
- let group = test.group_at_index(0).await;
|
|
|
|
|
|
+ let group = test.group_at_index(1).await;
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
MoveRow {
|
|
MoveRow {
|
|
- from_group_index: 0,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
from_row_index: 0,
|
|
from_row_index: 0,
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ to_group_index: 2,
|
|
to_row_index: 1,
|
|
to_row_index: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 1,
|
|
row_count: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_count: 3,
|
|
row_count: 3,
|
|
},
|
|
},
|
|
AssertRow {
|
|
AssertRow {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_index: 1,
|
|
row_index: 1,
|
|
row: group.rows.get(0).unwrap().clone(),
|
|
row: group.rows.get(0).unwrap().clone(),
|
|
},
|
|
},
|
|
@@ -84,50 +84,52 @@ async fn group_move_row_to_other_group_test() {
|
|
#[tokio::test]
|
|
#[tokio::test]
|
|
async fn group_move_two_row_to_other_group_test() {
|
|
async fn group_move_two_row_to_other_group_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
- let group = test.group_at_index(0).await;
|
|
|
|
|
|
+ let group_1 = test.group_at_index(1).await;
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
|
|
+ // Move row at index 0 from group 1 to group 2 at index 1
|
|
MoveRow {
|
|
MoveRow {
|
|
- from_group_index: 0,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
from_row_index: 0,
|
|
from_row_index: 0,
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ to_group_index: 2,
|
|
to_row_index: 1,
|
|
to_row_index: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 1,
|
|
row_count: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_count: 3,
|
|
row_count: 3,
|
|
},
|
|
},
|
|
AssertRow {
|
|
AssertRow {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_index: 1,
|
|
row_index: 1,
|
|
- row: group.rows.get(0).unwrap().clone(),
|
|
|
|
|
|
+ row: group_1.rows.get(0).unwrap().clone(),
|
|
},
|
|
},
|
|
];
|
|
];
|
|
test.run_scripts(scripts).await;
|
|
test.run_scripts(scripts).await;
|
|
|
|
|
|
- let group = test.group_at_index(0).await;
|
|
|
|
|
|
+ let group_1 = test.group_at_index(1).await;
|
|
|
|
+ // Move row at index 0 from group 1 to group 2 at index 1
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
MoveRow {
|
|
MoveRow {
|
|
- from_group_index: 0,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
from_row_index: 0,
|
|
from_row_index: 0,
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ to_group_index: 2,
|
|
to_row_index: 1,
|
|
to_row_index: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 0,
|
|
row_count: 0,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_count: 4,
|
|
row_count: 4,
|
|
},
|
|
},
|
|
AssertRow {
|
|
AssertRow {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_index: 1,
|
|
row_index: 1,
|
|
- row: group.rows.get(0).unwrap().clone(),
|
|
|
|
|
|
+ row: group_1.rows.get(0).unwrap().clone(),
|
|
},
|
|
},
|
|
];
|
|
];
|
|
test.run_scripts(scripts).await;
|
|
test.run_scripts(scripts).await;
|
|
@@ -136,34 +138,34 @@ async fn group_move_two_row_to_other_group_test() {
|
|
#[tokio::test]
|
|
#[tokio::test]
|
|
async fn group_move_row_to_other_group_and_reorder_from_up_to_down_test() {
|
|
async fn group_move_row_to_other_group_and_reorder_from_up_to_down_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
- let group_0 = test.group_at_index(0).await;
|
|
|
|
let group_1 = test.group_at_index(1).await;
|
|
let group_1 = test.group_at_index(1).await;
|
|
|
|
+ let group_2 = test.group_at_index(2).await;
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
MoveRow {
|
|
MoveRow {
|
|
- from_group_index: 0,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
from_row_index: 0,
|
|
from_row_index: 0,
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ to_group_index: 2,
|
|
to_row_index: 1,
|
|
to_row_index: 1,
|
|
},
|
|
},
|
|
AssertRow {
|
|
AssertRow {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_index: 1,
|
|
row_index: 1,
|
|
- row: group_0.rows.get(0).unwrap().clone(),
|
|
|
|
|
|
+ row: group_1.rows.get(0).unwrap().clone(),
|
|
},
|
|
},
|
|
];
|
|
];
|
|
test.run_scripts(scripts).await;
|
|
test.run_scripts(scripts).await;
|
|
|
|
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
MoveRow {
|
|
MoveRow {
|
|
- from_group_index: 1,
|
|
|
|
|
|
+ from_group_index: 2,
|
|
from_row_index: 0,
|
|
from_row_index: 0,
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ to_group_index: 2,
|
|
to_row_index: 2,
|
|
to_row_index: 2,
|
|
},
|
|
},
|
|
AssertRow {
|
|
AssertRow {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_index: 2,
|
|
row_index: 2,
|
|
- row: group_1.rows.get(0).unwrap().clone(),
|
|
|
|
|
|
+ row: group_2.rows.get(0).unwrap().clone(),
|
|
},
|
|
},
|
|
];
|
|
];
|
|
test.run_scripts(scripts).await;
|
|
test.run_scripts(scripts).await;
|
|
@@ -173,27 +175,27 @@ async fn group_move_row_to_other_group_and_reorder_from_up_to_down_test() {
|
|
async fn group_move_row_to_other_group_and_reorder_from_bottom_to_up_test() {
|
|
async fn group_move_row_to_other_group_and_reorder_from_bottom_to_up_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
let scripts = vec![MoveRow {
|
|
let scripts = vec![MoveRow {
|
|
- from_group_index: 0,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
from_row_index: 0,
|
|
from_row_index: 0,
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ to_group_index: 2,
|
|
to_row_index: 1,
|
|
to_row_index: 1,
|
|
}];
|
|
}];
|
|
test.run_scripts(scripts).await;
|
|
test.run_scripts(scripts).await;
|
|
|
|
|
|
- let group = test.group_at_index(1).await;
|
|
|
|
|
|
+ let group = test.group_at_index(2).await;
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_count: 3,
|
|
row_count: 3,
|
|
},
|
|
},
|
|
MoveRow {
|
|
MoveRow {
|
|
- from_group_index: 1,
|
|
|
|
|
|
+ from_group_index: 2,
|
|
from_row_index: 2,
|
|
from_row_index: 2,
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ to_group_index: 2,
|
|
to_row_index: 0,
|
|
to_row_index: 0,
|
|
},
|
|
},
|
|
AssertRow {
|
|
AssertRow {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_index: 0,
|
|
row_index: 0,
|
|
row: group.rows.get(2).unwrap().clone(),
|
|
row: group.rows.get(2).unwrap().clone(),
|
|
},
|
|
},
|
|
@@ -204,15 +206,15 @@ async fn group_move_row_to_other_group_and_reorder_from_bottom_to_up_test() {
|
|
async fn group_create_row_test() {
|
|
async fn group_create_row_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
- CreateRow { group_index: 0 },
|
|
|
|
|
|
+ CreateRow { group_index: 1 },
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 3,
|
|
row_count: 3,
|
|
},
|
|
},
|
|
- CreateRow { group_index: 1 },
|
|
|
|
- CreateRow { group_index: 1 },
|
|
|
|
|
|
+ CreateRow { group_index: 2 },
|
|
|
|
+ CreateRow { group_index: 2 },
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_count: 4,
|
|
row_count: 4,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
@@ -224,11 +226,11 @@ async fn group_delete_row_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
DeleteRow {
|
|
DeleteRow {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_index: 0,
|
|
row_index: 0,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 1,
|
|
row_count: 1,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
@@ -240,15 +242,15 @@ async fn group_delete_all_row_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
DeleteRow {
|
|
DeleteRow {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_index: 0,
|
|
row_index: 0,
|
|
},
|
|
},
|
|
DeleteRow {
|
|
DeleteRow {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_index: 0,
|
|
row_index: 0,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 0,
|
|
row_count: 0,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
@@ -261,16 +263,16 @@ async fn group_update_row_test() {
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
// Update the row at 0 in group0 by setting the row's group field data
|
|
// Update the row at 0 in group0 by setting the row's group field data
|
|
UpdateRow {
|
|
UpdateRow {
|
|
- from_group_index: 0,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
row_index: 0,
|
|
row_index: 0,
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ to_group_index: 2,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 1,
|
|
row_count: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_count: 3,
|
|
row_count: 3,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
@@ -283,16 +285,16 @@ async fn group_reorder_group_test() {
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
// Update the row at 0 in group0 by setting the row's group field data
|
|
// Update the row at 0 in group0 by setting the row's group field data
|
|
UpdateRow {
|
|
UpdateRow {
|
|
- from_group_index: 0,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
row_index: 0,
|
|
row_index: 0,
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ to_group_index: 2,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 1,
|
|
row_count: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_count: 3,
|
|
row_count: 3,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
@@ -304,16 +306,16 @@ async fn group_move_to_default_group_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
UpdateRow {
|
|
UpdateRow {
|
|
- from_group_index: 0,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
row_index: 0,
|
|
row_index: 0,
|
|
- to_group_index: 3,
|
|
|
|
|
|
+ to_group_index: 0,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 1,
|
|
row_count: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 3,
|
|
|
|
|
|
+ group_index: 0,
|
|
row_count: 1,
|
|
row_count: 1,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
@@ -323,25 +325,37 @@ async fn group_move_to_default_group_test() {
|
|
#[tokio::test]
|
|
#[tokio::test]
|
|
async fn group_move_from_default_group_test() {
|
|
async fn group_move_from_default_group_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
- let scripts = vec![UpdateRow {
|
|
|
|
- from_group_index: 0,
|
|
|
|
- row_index: 0,
|
|
|
|
- to_group_index: 3,
|
|
|
|
- }];
|
|
|
|
- test.run_scripts(scripts).await;
|
|
|
|
-
|
|
|
|
|
|
+ // Move one row from group 1 to group 0
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
UpdateRow {
|
|
UpdateRow {
|
|
- from_group_index: 3,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
row_index: 0,
|
|
row_index: 0,
|
|
to_group_index: 0,
|
|
to_group_index: 0,
|
|
},
|
|
},
|
|
|
|
+ AssertGroupRowCount {
|
|
|
|
+ group_index: 1,
|
|
|
|
+ row_count: 1,
|
|
|
|
+ },
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
group_index: 0,
|
|
group_index: 0,
|
|
|
|
+ row_count: 1,
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ test.run_scripts(scripts).await;
|
|
|
|
+
|
|
|
|
+ // Move one row from group 0 to group 1
|
|
|
|
+ let scripts = vec![
|
|
|
|
+ UpdateRow {
|
|
|
|
+ from_group_index: 0,
|
|
|
|
+ row_index: 0,
|
|
|
|
+ to_group_index: 1,
|
|
|
|
+ },
|
|
|
|
+ AssertGroupRowCount {
|
|
|
|
+ group_index: 1,
|
|
row_count: 2,
|
|
row_count: 2,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 3,
|
|
|
|
|
|
+ group_index: 0,
|
|
row_count: 0,
|
|
row_count: 0,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
@@ -368,7 +382,7 @@ async fn group_move_group_test() {
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
group_index: 1,
|
|
group_index: 1,
|
|
- row_count: 2,
|
|
|
|
|
|
+ row_count: 0,
|
|
},
|
|
},
|
|
AssertGroup {
|
|
AssertGroup {
|
|
group_index: 1,
|
|
group_index: 1,
|
|
@@ -381,33 +395,33 @@ async fn group_move_group_test() {
|
|
#[tokio::test]
|
|
#[tokio::test]
|
|
async fn group_move_group_row_after_move_group_test() {
|
|
async fn group_move_group_row_after_move_group_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
- let group_0 = test.group_at_index(0).await;
|
|
|
|
let group_1 = test.group_at_index(1).await;
|
|
let group_1 = test.group_at_index(1).await;
|
|
|
|
+ let group_2 = test.group_at_index(2).await;
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
MoveGroup {
|
|
MoveGroup {
|
|
- from_group_index: 0,
|
|
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
|
|
+ to_group_index: 2,
|
|
},
|
|
},
|
|
AssertGroup {
|
|
AssertGroup {
|
|
- group_index: 0,
|
|
|
|
- expected_group: group_1,
|
|
|
|
|
|
+ group_index: 1,
|
|
|
|
+ expected_group: group_2,
|
|
},
|
|
},
|
|
AssertGroup {
|
|
AssertGroup {
|
|
- group_index: 1,
|
|
|
|
- expected_group: group_0,
|
|
|
|
|
|
+ group_index: 2,
|
|
|
|
+ expected_group: group_1,
|
|
},
|
|
},
|
|
MoveRow {
|
|
MoveRow {
|
|
- from_group_index: 0,
|
|
|
|
|
|
+ from_group_index: 1,
|
|
from_row_index: 0,
|
|
from_row_index: 0,
|
|
- to_group_index: 1,
|
|
|
|
|
|
+ to_group_index: 2,
|
|
to_row_index: 0,
|
|
to_row_index: 0,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 1,
|
|
row_count: 1,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_count: 3,
|
|
row_count: 3,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
@@ -415,7 +429,7 @@ async fn group_move_group_row_after_move_group_test() {
|
|
}
|
|
}
|
|
|
|
|
|
#[tokio::test]
|
|
#[tokio::test]
|
|
-async fn group_default_move_group_test() {
|
|
|
|
|
|
+async fn group_move_group_to_default_group_pos_test() {
|
|
let mut test = GridGroupTest::new().await;
|
|
let mut test = GridGroupTest::new().await;
|
|
let group_0 = test.group_at_index(0).await;
|
|
let group_0 = test.group_at_index(0).await;
|
|
let group_3 = test.group_at_index(3).await;
|
|
let group_3 = test.group_at_index(3).await;
|
|
@@ -442,13 +456,13 @@ async fn group_insert_single_select_option_test() {
|
|
let new_option_name = "New option";
|
|
let new_option_name = "New option";
|
|
let scripts = vec![
|
|
let scripts = vec![
|
|
AssertGroupCount(4),
|
|
AssertGroupCount(4),
|
|
- UpdateSingleSelectOption {
|
|
|
|
|
|
+ UpdateSingleSelectSelectOption {
|
|
inserted_options: vec![SelectOptionPB::new(new_option_name)],
|
|
inserted_options: vec![SelectOptionPB::new(new_option_name)],
|
|
},
|
|
},
|
|
AssertGroupCount(5),
|
|
AssertGroupCount(5),
|
|
];
|
|
];
|
|
test.run_scripts(scripts).await;
|
|
test.run_scripts(scripts).await;
|
|
- let new_group = test.group_at_index(0).await;
|
|
|
|
|
|
+ let new_group = test.group_at_index(1).await;
|
|
assert_eq!(new_group.desc, new_option_name);
|
|
assert_eq!(new_group.desc, new_option_name);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -461,14 +475,14 @@ async fn group_group_by_other_field() {
|
|
field_id: multi_select_field.id.clone(),
|
|
field_id: multi_select_field.id.clone(),
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 0,
|
|
|
|
|
|
+ group_index: 1,
|
|
row_count: 3,
|
|
row_count: 3,
|
|
},
|
|
},
|
|
AssertGroupRowCount {
|
|
AssertGroupRowCount {
|
|
- group_index: 1,
|
|
|
|
|
|
+ group_index: 2,
|
|
row_count: 2,
|
|
row_count: 2,
|
|
},
|
|
},
|
|
- AssertGroupCount(5),
|
|
|
|
|
|
+ AssertGroupCount(4),
|
|
];
|
|
];
|
|
test.run_scripts(scripts).await;
|
|
test.run_scripts(scripts).await;
|
|
}
|
|
}
|