[GH-ISSUE #1596] [FR] Unit test for Grid cell data transform #613

Closed
opened 2026-03-23 20:38:43 +00:00 by mirror · 3 comments
Owner

Originally created by @appflowy on GitHub (Dec 21, 2022).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/1596

Originally assigned to: @0xkelvin on GitHub.

Description

tests for grid cell data transform

Impact

Grid

Additional Context

Finish the test templates shown below, it should be implemented just like the grid_switch_from_checkbox_to_select_option_test.

// Test when switching the current field from Multi-select to Text test
// The build-in test data is located in `make_test_grid` method(flowy-grid/tests/grid_editor.rs).
// input:
//      option1, option2 -> "option1.name, option2.name"
#[tokio::test]
async fn grid_switch_from_multi_select_to_text_test() {}

// Test when switching the current field from Checkbox to Text test
// input:
//      check -> "Yes"
//      unchecked -> ""
#[tokio::test]
async fn grid_switch_from_checkbox_to_text_test() {}

// Test when switching the current field from Checkbox to Text test
// input:
//      "Yes" -> check
//      "" -> unchecked
#[tokio::test]
async fn grid_switch_from_text_to_checkbox_test() {}

// Test when switching the current field from Date to Text test
// input:
//      1647251762 -> Mar 14,2022 (This string will be different base on current data setting)
#[tokio::test]
async fn grid_switch_from_date_to_text_test() {}

// Test when switching the current field from Number to Text test
// input:
//      $1 -> "$1"(This string will be different base on current data setting)
#[tokio::test]
async fn grid_switch_from_number_to_text_test() {}
Originally created by @appflowy on GitHub (Dec 21, 2022). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/1596 Originally assigned to: @0xkelvin on GitHub. ### Description tests for grid cell data transform ### Impact Grid ### Additional Context Finish the test templates shown below, it should be implemented just like the `grid_switch_from_checkbox_to_select_option_test`. ```rust // Test when switching the current field from Multi-select to Text test // The build-in test data is located in `make_test_grid` method(flowy-grid/tests/grid_editor.rs). // input: // option1, option2 -> "option1.name, option2.name" #[tokio::test] async fn grid_switch_from_multi_select_to_text_test() {} // Test when switching the current field from Checkbox to Text test // input: // check -> "Yes" // unchecked -> "" #[tokio::test] async fn grid_switch_from_checkbox_to_text_test() {} // Test when switching the current field from Checkbox to Text test // input: // "Yes" -> check // "" -> unchecked #[tokio::test] async fn grid_switch_from_text_to_checkbox_test() {} // Test when switching the current field from Date to Text test // input: // 1647251762 -> Mar 14,2022 (This string will be different base on current data setting) #[tokio::test] async fn grid_switch_from_date_to_text_test() {} // Test when switching the current field from Number to Text test // input: // $1 -> "$1"(This string will be different base on current data setting) #[tokio::test] async fn grid_switch_from_number_to_text_test() {} ```
mirror 2026-03-23 20:38:43 +00:00
Author
Owner

@0xkelvin commented on GitHub (Dec 21, 2022):

i think i want to take this @appflowy @annieappflowy

😄

<!-- gh-comment-id:1360771580 --> @0xkelvin commented on GitHub (Dec 21, 2022): i think i want to take this @appflowy @annieappflowy 😄
Author
Owner

@annieappflowy commented on GitHub (Dec 21, 2022):

Great to see the progress!

<!-- gh-comment-id:1360781917 --> @annieappflowy commented on GitHub (Dec 21, 2022): Great to see the progress!
Author
Owner

@0xkelvin commented on GitHub (Dec 29, 2022):

PRs closed
#1615
#1612
#1608
#1616
only remaining the switching from "text" to "checkbox", not implemented yet, so can not write the test for now.

<!-- gh-comment-id:1367139468 --> @0xkelvin commented on GitHub (Dec 29, 2022): PRs closed #1615 #1612 #1608 #1616 only remaining the switching from "text" to "checkbox", not implemented yet, so can not write the test for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#613
No description provided.