mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
@ -38,7 +38,7 @@ pub struct DatabaseEditorTest {
|
||||
impl DatabaseEditorTest {
|
||||
pub async fn new_grid() -> Self {
|
||||
let sdk = EventIntegrationTest::new();
|
||||
let _ = sdk.init_user().await;
|
||||
let _ = sdk.init_anon_user().await;
|
||||
|
||||
let params = make_test_grid();
|
||||
let view_test = ViewTest::new_grid_view(&sdk, params.to_json_bytes().unwrap()).await;
|
||||
@ -47,7 +47,7 @@ impl DatabaseEditorTest {
|
||||
|
||||
pub async fn new_no_date_grid() -> Self {
|
||||
let sdk = EventIntegrationTest::new();
|
||||
let _ = sdk.init_user().await;
|
||||
let _ = sdk.init_anon_user().await;
|
||||
|
||||
let params = make_no_date_test_grid();
|
||||
let view_test = ViewTest::new_grid_view(&sdk, params.to_json_bytes().unwrap()).await;
|
||||
@ -56,7 +56,7 @@ impl DatabaseEditorTest {
|
||||
|
||||
pub async fn new_board() -> Self {
|
||||
let sdk = EventIntegrationTest::new();
|
||||
let _ = sdk.init_user().await;
|
||||
let _ = sdk.init_anon_user().await;
|
||||
|
||||
let params = make_test_board();
|
||||
let view_test = ViewTest::new_grid_view(&sdk, params.to_json_bytes().unwrap()).await;
|
||||
@ -65,7 +65,7 @@ impl DatabaseEditorTest {
|
||||
|
||||
pub async fn new_calendar() -> Self {
|
||||
let sdk = EventIntegrationTest::new();
|
||||
let _ = sdk.init_user().await;
|
||||
let _ = sdk.init_anon_user().await;
|
||||
|
||||
let params = make_test_calendar();
|
||||
let view_test = ViewTest::new_grid_view(&sdk, params.to_json_bytes().unwrap()).await;
|
||||
|
@ -58,10 +58,9 @@ async fn get_checklist_cell_options(test: &DatabaseFilterTest) -> Vec<String> {
|
||||
.get_cell(&field.id, &test.row_details[0].row.id)
|
||||
.await;
|
||||
row_cell
|
||||
.map_or_else(
|
||||
|| ChecklistCellData::default(),
|
||||
|cell| ChecklistCellData::from(&cell),
|
||||
)
|
||||
.map_or(ChecklistCellData::default(), |cell| {
|
||||
ChecklistCellData::from(&cell)
|
||||
})
|
||||
.options
|
||||
.into_iter()
|
||||
.map(|option| option.id)
|
||||
|
Reference in New Issue
Block a user