mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: add sub data type
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
use crate::script::{invalid_workspace_name_test_case, FolderScript::*, FolderTest};
|
||||
use flowy_folder::entities::view::ViewDataType;
|
||||
use flowy_folder::entities::view::ViewDataTypePB;
|
||||
use flowy_folder::entities::workspace::CreateWorkspacePayloadPB;
|
||||
|
||||
use flowy_revision::disk::RevisionState;
|
||||
@ -134,12 +134,12 @@ async fn app_create_with_view() {
|
||||
CreateView {
|
||||
name: "View A".to_owned(),
|
||||
desc: "View A description".to_owned(),
|
||||
data_type: ViewDataType::TextBlock,
|
||||
data_type: ViewDataTypePB::TextBlock,
|
||||
},
|
||||
CreateView {
|
||||
name: "Grid".to_owned(),
|
||||
desc: "Grid description".to_owned(),
|
||||
data_type: ViewDataType::Grid,
|
||||
data_type: ViewDataTypePB::Database,
|
||||
},
|
||||
ReadApp(app.id),
|
||||
])
|
||||
@ -198,12 +198,12 @@ async fn view_delete_all() {
|
||||
CreateView {
|
||||
name: "View A".to_owned(),
|
||||
desc: "View A description".to_owned(),
|
||||
data_type: ViewDataType::TextBlock,
|
||||
data_type: ViewDataTypePB::TextBlock,
|
||||
},
|
||||
CreateView {
|
||||
name: "Grid".to_owned(),
|
||||
desc: "Grid description".to_owned(),
|
||||
data_type: ViewDataType::Grid,
|
||||
data_type: ViewDataTypePB::Database,
|
||||
},
|
||||
ReadApp(app.id.clone()),
|
||||
])
|
||||
@ -231,7 +231,7 @@ async fn view_delete_all_permanent() {
|
||||
CreateView {
|
||||
name: "View A".to_owned(),
|
||||
desc: "View A description".to_owned(),
|
||||
data_type: ViewDataType::TextBlock,
|
||||
data_type: ViewDataTypePB::TextBlock,
|
||||
},
|
||||
ReadApp(app.id.clone()),
|
||||
])
|
||||
@ -330,7 +330,7 @@ async fn folder_sync_revision_with_new_view() {
|
||||
CreateView {
|
||||
name: view_name.clone(),
|
||||
desc: view_desc.clone(),
|
||||
data_type: ViewDataType::TextBlock,
|
||||
data_type: ViewDataTypePB::TextBlock,
|
||||
},
|
||||
AssertCurrentRevId(3),
|
||||
AssertNextSyncRevId(Some(3)),
|
||||
|
@ -9,7 +9,7 @@ use flowy_folder::entities::{
|
||||
use flowy_folder::entities::{
|
||||
app::{AppPB, RepeatedAppPB},
|
||||
trash::TrashPB,
|
||||
view::{RepeatedViewPB, ViewDataType, ViewPB},
|
||||
view::{RepeatedViewPB, ViewDataTypePB, ViewPB},
|
||||
workspace::WorkspacePB,
|
||||
};
|
||||
use flowy_folder::event_map::FolderEvent::*;
|
||||
@ -51,7 +51,7 @@ pub enum FolderScript {
|
||||
CreateView {
|
||||
name: String,
|
||||
desc: String,
|
||||
data_type: ViewDataType,
|
||||
data_type: ViewDataTypePB,
|
||||
},
|
||||
AssertView(ViewPB),
|
||||
ReadView(String),
|
||||
@ -98,7 +98,7 @@ impl FolderTest {
|
||||
&app.id,
|
||||
"Folder View",
|
||||
"Folder test view",
|
||||
ViewDataType::TextBlock,
|
||||
ViewDataTypePB::TextBlock,
|
||||
)
|
||||
.await;
|
||||
app.belongings = RepeatedViewPB {
|
||||
@ -346,7 +346,13 @@ pub async fn delete_app(sdk: &FlowySDKTest, app_id: &str) {
|
||||
.await;
|
||||
}
|
||||
|
||||
pub async fn create_view(sdk: &FlowySDKTest, app_id: &str, name: &str, desc: &str, data_type: ViewDataType) -> ViewPB {
|
||||
pub async fn create_view(
|
||||
sdk: &FlowySDKTest,
|
||||
app_id: &str,
|
||||
name: &str,
|
||||
desc: &str,
|
||||
data_type: ViewDataTypePB,
|
||||
) -> ViewPB {
|
||||
let request = CreateViewPayloadPB {
|
||||
belong_to_id: app_id.to_string(),
|
||||
name: name.to_string(),
|
||||
|
Reference in New Issue
Block a user