Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

refactor: rename flowy-test to event-integration (#3667)

Nathan.foooe59870e42146
diff --git a/.github/workflows/rust_ci.yaml b/.github/workflows/rust_ci.yaml
index 78059b8ba3..785966e00a 100644
--- a/.github/workflows/rust_ci.yaml
+++ b/.github/workflows/rust_ci.yaml
@@ -60,8 +60,8 @@ jobs:
echo SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }} >> .env.ci
echo SUPABASE_JWT_SECRET=${{ secrets.SUPABASE_JWT_SECRET }} >> .env.ci
- - name: Create .env file in flowy-test
- working-directory: frontend/rust-lib/flowy-test
+ - name: Create .env file in event-integration
+ working-directory: frontend/rust-lib/event-integration
run: |
touch .env.ci
echo SUPABASE_URL=${{ secrets.SUPABASE_URL }} >> .env.ci
diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock
index 4a141b19c8..c24d7e49b8 100644
--- a/frontend/rust-lib/Cargo.lock
+++ b/frontend/rust-lib/Cargo.lock
@@ -1534,6 +1534,51 @@ dependencies = [
"backtrace",
]
+[[package]]
+name = "event-integration"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "assert-json-diff",
+ "bytes",
+ "collab",
+ "collab-database",
+ "collab-document",
+ "collab-entity",
+ "collab-folder",
+ "collab-plugins",
+ "dotenv",
+ "flowy-core",
+ "flowy-database-deps",
+ "flowy-database2",
+ "flowy-document-deps",
+ "flowy-document2",
+ "flowy-encrypt",
+ "flowy-folder-deps",
+ "flowy-folder2",
+ "flowy-notification",
+ "flowy-server",
+ "flowy-server-config",
+ "flowy-storage",
+ "flowy-user",
+ "flowy-user-deps",
+ "futures-util",
+ "lib-dispatch",
+ "lib-infra",
+ "nanoid",
+ "parking_lot",
+ "protobuf",
+ "serde",
+ "serde_json",
+ "tempdir",
+ "thread-id",
+ "tokio",
+ "tokio-postgres",
+ "tracing",
+ "uuid",
+ "zip",
+]
+
[[package]]
name = "event-listener"
version = "2.5.3"
@@ -1751,14 +1796,14 @@ dependencies = [
"collab-integrate",
"csv",
"dashmap",
- "fancy-regex 0.10.0",
+ "event-integration",
+ "fancy-regex 0.11.0",
"flowy-codegen",
"flowy-database-deps",
"flowy-derive",
"flowy-error",
"flowy-notification",
"flowy-task",
- "flowy-test",
"futures",
"indexmap 1.9.3",
"lazy_static",
@@ -1920,9 +1965,7 @@ dependencies = [
"flowy-derive",
"flowy-error",
"flowy-folder-deps",
- "flowy-folder2",
"flowy-notification",
- "flowy-test",
"lazy_static",
"lib-dispatch",
"lib-infra",
@@ -2057,51 +2100,6 @@ dependencies = [
"tracing",
]
-[[package]]
-name = "flowy-test"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "assert-json-diff",
- "bytes",
- "collab",
- "collab-database",
- "collab-document",
- "collab-entity",
- "collab-folder",
- "collab-plugins",
- "dotenv",
- "flowy-core",
- "flowy-database-deps",
- "flowy-database2",
- "flowy-document-deps",
- "flowy-document2",
- "flowy-encrypt",
- "flowy-folder-deps",
- "flowy-folder2",
- "flowy-notification",
- "flowy-server",
- "flowy-server-config",
- "flowy-storage",
- "flowy-user",
- "flowy-user-deps",
- "futures-util",
- "lib-dispatch",
- "lib-infra",
- "nanoid",
- "parking_lot",
- "protobuf",
- "serde",
- "serde_json",
- "tempdir",
- "thread-id",
- "tokio",
- "tokio-postgres",
- "tracing",
- "uuid",
- "zip",
-]
-
[[package]]
name = "flowy-user"
version = "0.1.0"
diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml
index bc7c3b5fd3..6914e30454 100644
--- a/frontend/rust-lib/Cargo.toml
+++ b/frontend/rust-lib/Cargo.toml
@@ -6,7 +6,7 @@ members = [
"dart-ffi",
"flowy-user",
"flowy-user-deps",
- "flowy-test",
+ "event-integration",
"flowy-sqlite",
"flowy-folder2",
"flowy-folder-deps",
diff --git a/frontend/rust-lib/flowy-test/Cargo.toml b/frontend/rust-lib/event-integration/Cargo.toml
similarity index 97%
rename from frontend/rust-lib/flowy-test/Cargo.toml
rename to frontend/rust-lib/event-integration/Cargo.toml
index 0bb6993461..3c35b0ff82 100644
--- a/frontend/rust-lib/flowy-test/Cargo.toml
+++ b/frontend/rust-lib/event-integration/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "flowy-test"
+name = "event-integration"
version = "0.1.0"
edition = "2018"
diff --git a/frontend/rust-lib/flowy-test/src/document/document_event.rs b/frontend/rust-lib/event-integration/src/document/document_event.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/src/document/document_event.rs
rename to frontend/rust-lib/event-integration/src/document/document_event.rs
diff --git a/frontend/rust-lib/flowy-test/src/document/mod.rs b/frontend/rust-lib/event-integration/src/document/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/src/document/mod.rs
rename to frontend/rust-lib/event-integration/src/document/mod.rs
diff --git a/frontend/rust-lib/flowy-test/src/document/utils.rs b/frontend/rust-lib/event-integration/src/document/utils.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/src/document/utils.rs
rename to frontend/rust-lib/event-integration/src/document/utils.rs
diff --git a/frontend/rust-lib/flowy-test/src/event_builder.rs b/frontend/rust-lib/event-integration/src/event_builder.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/src/event_builder.rs
rename to frontend/rust-lib/event-integration/src/event_builder.rs
diff --git a/frontend/rust-lib/flowy-test/src/folder_event.rs b/frontend/rust-lib/event-integration/src/folder_event.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/src/folder_event.rs
rename to frontend/rust-lib/event-integration/src/folder_event.rs
diff --git a/frontend/rust-lib/flowy-test/src/lib.rs b/frontend/rust-lib/event-integration/src/lib.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/src/lib.rs
rename to frontend/rust-lib/event-integration/src/lib.rs
diff --git a/frontend/rust-lib/flowy-test/src/user_event.rs b/frontend/rust-lib/event-integration/src/user_event.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/src/user_event.rs
rename to frontend/rust-lib/event-integration/src/user_event.rs
diff --git a/frontend/rust-lib/flowy-test/tests/asset/database_template_1.afdb b/frontend/rust-lib/event-integration/tests/asset/database_template_1.afdb
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/asset/database_template_1.afdb
rename to frontend/rust-lib/event-integration/tests/asset/database_template_1.afdb
diff --git a/frontend/rust-lib/flowy-test/tests/asset/logo.png b/frontend/rust-lib/event-integration/tests/asset/logo.png
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/asset/logo.png
rename to frontend/rust-lib/event-integration/tests/asset/logo.png
diff --git a/frontend/rust-lib/flowy-test/tests/asset/test.txt.zip b/frontend/rust-lib/event-integration/tests/asset/test.txt.zip
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/asset/test.txt.zip
rename to frontend/rust-lib/event-integration/tests/asset/test.txt.zip
diff --git a/frontend/rust-lib/flowy-test/tests/database/local_test/mod.rs b/frontend/rust-lib/event-integration/tests/database/local_test/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/database/local_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/database/local_test/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/database/local_test/test.rs b/frontend/rust-lib/event-integration/tests/database/local_test/test.rs
similarity index 99%
rename from frontend/rust-lib/flowy-test/tests/database/local_test/test.rs
rename to frontend/rust-lib/event-integration/tests/database/local_test/test.rs
index 34348cac5b..d21a1596ce 100644
--- a/frontend/rust-lib/flowy-test/tests/database/local_test/test.rs
+++ b/frontend/rust-lib/event-integration/tests/database/local_test/test.rs
@@ -2,13 +2,13 @@ use std::convert::TryFrom;
use bytes::Bytes;
+use event_integration::event_builder::EventBuilder;
+use event_integration::FlowyCoreTest;
use flowy_database2::entities::{
CellChangesetPB, CellIdPB, ChecklistCellDataChangesetPB, DatabaseLayoutPB,
DatabaseSettingChangesetPB, DatabaseViewIdPB, DateChangesetPB, FieldType, SelectOptionCellDataPB,
UpdateRowMetaChangesetPB,
};
-use flowy_test::event_builder::EventBuilder;
-use flowy_test::FlowyCoreTest;
use lib_infra::util::timestamp;
#[tokio::test]
diff --git a/frontend/rust-lib/flowy-test/tests/database/mod.rs b/frontend/rust-lib/event-integration/tests/database/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/database/mod.rs
rename to frontend/rust-lib/event-integration/tests/database/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/database/supabase_test/helper.rs b/frontend/rust-lib/event-integration/tests/database/supabase_test/helper.rs
similarity index 98%
rename from frontend/rust-lib/flowy-test/tests/database/supabase_test/helper.rs
rename to frontend/rust-lib/event-integration/tests/database/supabase_test/helper.rs
index e9d7fd9e7f..250ef4546f 100644
--- a/frontend/rust-lib/flowy-test/tests/database/supabase_test/helper.rs
+++ b/frontend/rust-lib/event-integration/tests/database/supabase_test/helper.rs
@@ -7,10 +7,10 @@ use collab::preclude::updates::decoder::Decode;
use collab::preclude::{merge_updates_v1, JsonValue, Update};
use collab_entity::CollabType;
+use event_integration::event_builder::EventBuilder;
use flowy_database2::entities::{DatabasePB, DatabaseViewIdPB, RepeatedDatabaseSnapshotPB};
use flowy_database2::event_map::DatabaseEvent::*;
use flowy_folder2::entities::ViewPB;
-use flowy_test::event_builder::EventBuilder;
use crate::util::FlowySupabaseTest;
diff --git a/frontend/rust-lib/flowy-test/tests/database/supabase_test/mod.rs b/frontend/rust-lib/event-integration/tests/database/supabase_test/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/database/supabase_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/database/supabase_test/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/database/supabase_test/test.rs b/frontend/rust-lib/event-integration/tests/database/supabase_test/test.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/database/supabase_test/test.rs
rename to frontend/rust-lib/event-integration/tests/database/supabase_test/test.rs
diff --git a/frontend/rust-lib/flowy-test/tests/document/af_cloud_test/edit_test.rs b/frontend/rust-lib/event-integration/tests/document/af_cloud_test/edit_test.rs
similarity index 95%
rename from frontend/rust-lib/flowy-test/tests/document/af_cloud_test/edit_test.rs
rename to frontend/rust-lib/event-integration/tests/document/af_cloud_test/edit_test.rs
index 5f6e7113e8..255864a0ee 100644
--- a/frontend/rust-lib/flowy-test/tests/document/af_cloud_test/edit_test.rs
+++ b/frontend/rust-lib/event-integration/tests/document/af_cloud_test/edit_test.rs
@@ -1,7 +1,7 @@
use std::time::Duration;
+use event_integration::assert_document_data_equal;
use flowy_document2::entities::DocumentSyncStatePB;
-use flowy_test::assert_document_data_equal;
use crate::document::af_cloud_test::util::AFCloudDocumentTest;
use crate::util::receive_with_timeout;
diff --git a/frontend/rust-lib/flowy-test/tests/document/af_cloud_test/mod.rs b/frontend/rust-lib/event-integration/tests/document/af_cloud_test/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/document/af_cloud_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/document/af_cloud_test/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/document/af_cloud_test/util.rs b/frontend/rust-lib/event-integration/tests/document/af_cloud_test/util.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/document/af_cloud_test/util.rs
rename to frontend/rust-lib/event-integration/tests/document/af_cloud_test/util.rs
diff --git a/frontend/rust-lib/flowy-test/tests/document/local_test/mod.rs b/frontend/rust-lib/event-integration/tests/document/local_test/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/document/local_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/document/local_test/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/document/local_test/test.rs b/frontend/rust-lib/event-integration/tests/document/local_test/test.rs
similarity index 97%
rename from frontend/rust-lib/flowy-test/tests/document/local_test/test.rs
rename to frontend/rust-lib/event-integration/tests/document/local_test/test.rs
index 16ef6884f4..0016a9118c 100644
--- a/frontend/rust-lib/flowy-test/tests/document/local_test/test.rs
+++ b/frontend/rust-lib/event-integration/tests/document/local_test/test.rs
@@ -1,7 +1,7 @@
use collab_document::blocks::json_str_to_hashmap;
+use event_integration::document::document_event::DocumentEventTest;
+use event_integration::document::utils::*;
use flowy_document2::entities::*;
-use flowy_test::document::document_event::DocumentEventTest;
-use flowy_test::document::utils::*;
use serde_json::{json, Value};
use std::collections::HashMap;
diff --git a/frontend/rust-lib/flowy-test/tests/document/mod.rs b/frontend/rust-lib/event-integration/tests/document/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/document/mod.rs
rename to frontend/rust-lib/event-integration/tests/document/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/document/supabase_test/edit_test.rs b/frontend/rust-lib/event-integration/tests/document/supabase_test/edit_test.rs
similarity index 97%
rename from frontend/rust-lib/flowy-test/tests/document/supabase_test/edit_test.rs
rename to frontend/rust-lib/event-integration/tests/document/supabase_test/edit_test.rs
index b0adbeac57..e0596e6299 100644
--- a/frontend/rust-lib/flowy-test/tests/document/supabase_test/edit_test.rs
+++ b/frontend/rust-lib/event-integration/tests/document/supabase_test/edit_test.rs
@@ -1,7 +1,7 @@
use std::time::Duration;
+use event_integration::assert_document_data_equal;
use flowy_document2::entities::DocumentSyncStatePB;
-use flowy_test::assert_document_data_equal;
use crate::document::supabase_test::helper::FlowySupabaseDocumentTest;
use crate::util::receive_with_timeout;
diff --git a/frontend/rust-lib/flowy-test/tests/document/supabase_test/file_test.rs b/frontend/rust-lib/event-integration/tests/document/supabase_test/file_test.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/document/supabase_test/file_test.rs
rename to frontend/rust-lib/event-integration/tests/document/supabase_test/file_test.rs
diff --git a/frontend/rust-lib/flowy-test/tests/document/supabase_test/helper.rs b/frontend/rust-lib/event-integration/tests/document/supabase_test/helper.rs
similarity index 96%
rename from frontend/rust-lib/flowy-test/tests/document/supabase_test/helper.rs
rename to frontend/rust-lib/event-integration/tests/document/supabase_test/helper.rs
index 160662fc66..7244a33a34 100644
--- a/frontend/rust-lib/flowy-test/tests/document/supabase_test/helper.rs
+++ b/frontend/rust-lib/event-integration/tests/document/supabase_test/helper.rs
@@ -1,9 +1,9 @@
use std::ops::Deref;
+use event_integration::event_builder::EventBuilder;
use flowy_document2::entities::{OpenDocumentPayloadPB, RepeatedDocumentSnapshotPB};
use flowy_document2::event_map::DocumentEvent::GetDocumentSnapshots;
use flowy_folder2::entities::ViewPB;
-use flowy_test::event_builder::EventBuilder;
use crate::util::FlowySupabaseTest;
diff --git a/frontend/rust-lib/flowy-test/tests/document/supabase_test/mod.rs b/frontend/rust-lib/event-integration/tests/document/supabase_test/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/document/supabase_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/document/supabase_test/mod.rs
diff --git a/frontend/rust-lib/flowy-folder2/tests/workspace/folder_test.rs b/frontend/rust-lib/event-integration/tests/folder/local_test/folder_test.rs
similarity index 98%
rename from frontend/rust-lib/flowy-folder2/tests/workspace/folder_test.rs
rename to frontend/rust-lib/event-integration/tests/folder/local_test/folder_test.rs
index 60c6523970..2cb4c93fe9 100644
--- a/frontend/rust-lib/flowy-folder2/tests/workspace/folder_test.rs
+++ b/frontend/rust-lib/event-integration/tests/folder/local_test/folder_test.rs
@@ -1,7 +1,10 @@
-use crate::script::{FolderScript::*, FolderTest};
use collab_folder::core::ViewLayout;
+
use flowy_folder2::entities::icon::{ViewIconPB, ViewIconTypePB};
+use crate::folder::local_test::script::FolderScript::*;
+use crate::folder::local_test::script::FolderTest;
+
#[tokio::test]
async fn read_all_workspace_test() {
let mut test = FolderTest::new().await;
diff --git a/frontend/rust-lib/flowy-test/tests/folder/local_test/mod.rs b/frontend/rust-lib/event-integration/tests/folder/local_test/mod.rs
similarity index 53%
rename from frontend/rust-lib/flowy-test/tests/folder/local_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/folder/local_test/mod.rs
index 56c620e096..e13c3c1e76 100644
--- a/frontend/rust-lib/flowy-test/tests/folder/local_test/mod.rs
+++ b/frontend/rust-lib/event-integration/tests/folder/local_test/mod.rs
@@ -1,2 +1,4 @@
+mod folder_test;
+mod script;
mod subscription_test;
mod test;
diff --git a/frontend/rust-lib/flowy-folder2/tests/workspace/script.rs b/frontend/rust-lib/event-integration/tests/folder/local_test/script.rs
similarity index 99%
rename from frontend/rust-lib/flowy-folder2/tests/workspace/script.rs
rename to frontend/rust-lib/event-integration/tests/folder/local_test/script.rs
index 2ccc3c5b92..5e375e6c6e 100644
--- a/frontend/rust-lib/flowy-folder2/tests/workspace/script.rs
+++ b/frontend/rust-lib/event-integration/tests/folder/local_test/script.rs
@@ -1,10 +1,10 @@
use collab_folder::core::ViewLayout;
+use event_integration::event_builder::EventBuilder;
+use event_integration::FlowyCoreTest;
use flowy_folder2::entities::icon::{UpdateViewIconPayloadPB, ViewIconPB};
use flowy_folder2::entities::*;
use flowy_folder2::event_map::FolderEvent::*;
-use flowy_test::event_builder::EventBuilder;
-use flowy_test::FlowyCoreTest;
pub enum FolderScript {
// Workspace
diff --git a/frontend/rust-lib/flowy-test/tests/folder/local_test/subscription_test.rs b/frontend/rust-lib/event-integration/tests/folder/local_test/subscription_test.rs
similarity index 99%
rename from frontend/rust-lib/flowy-test/tests/folder/local_test/subscription_test.rs
rename to frontend/rust-lib/event-integration/tests/folder/local_test/subscription_test.rs
index 686d2b1384..f3fb6208a3 100644
--- a/frontend/rust-lib/flowy-test/tests/folder/local_test/subscription_test.rs
+++ b/frontend/rust-lib/event-integration/tests/folder/local_test/subscription_test.rs
@@ -1,8 +1,8 @@
use std::time::Duration;
+use event_integration::FlowyCoreTest;
use flowy_folder2::entities::{ChildViewUpdatePB, RepeatedViewPB, UpdateViewPayloadPB};
use flowy_folder2::notification::FolderNotification;
-use flowy_test::FlowyCoreTest;
use crate::util::receive_with_timeout;
diff --git a/frontend/rust-lib/flowy-test/tests/folder/local_test/test.rs b/frontend/rust-lib/event-integration/tests/folder/local_test/test.rs
similarity index 99%
rename from frontend/rust-lib/flowy-test/tests/folder/local_test/test.rs
rename to frontend/rust-lib/event-integration/tests/folder/local_test/test.rs
index a0ce97a8a4..25994e2a60 100644
--- a/frontend/rust-lib/flowy-test/tests/folder/local_test/test.rs
+++ b/frontend/rust-lib/event-integration/tests/folder/local_test/test.rs
@@ -1,7 +1,7 @@
+use event_integration::event_builder::EventBuilder;
+use event_integration::FlowyCoreTest;
use flowy_folder2::entities::icon::{UpdateViewIconPayloadPB, ViewIconPB, ViewIconTypePB};
use flowy_folder2::entities::*;
-use flowy_test::event_builder::EventBuilder;
-use flowy_test::FlowyCoreTest;
use flowy_user::errors::ErrorCode;
#[tokio::test]
diff --git a/frontend/rust-lib/flowy-test/tests/folder/mod.rs b/frontend/rust-lib/event-integration/tests/folder/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/folder/mod.rs
rename to frontend/rust-lib/event-integration/tests/folder/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/folder/supabase_test/helper.rs b/frontend/rust-lib/event-integration/tests/folder/supabase_test/helper.rs
similarity index 98%
rename from frontend/rust-lib/flowy-test/tests/folder/supabase_test/helper.rs
rename to frontend/rust-lib/event-integration/tests/folder/supabase_test/helper.rs
index 02afe2a65c..e86257c32d 100644
--- a/frontend/rust-lib/flowy-test/tests/folder/supabase_test/helper.rs
+++ b/frontend/rust-lib/event-integration/tests/folder/supabase_test/helper.rs
@@ -7,9 +7,9 @@ use collab::preclude::updates::decoder::Decode;
use collab::preclude::{merge_updates_v1, JsonValue, Update};
use collab_folder::core::FolderData;
+use event_integration::event_builder::EventBuilder;
use flowy_folder2::entities::{FolderSnapshotPB, RepeatedFolderSnapshotPB, WorkspaceIdPB};
use flowy_folder2::event_map::FolderEvent::GetFolderSnapshots;
-use flowy_test::event_builder::EventBuilder;
use crate::util::FlowySupabaseTest;
diff --git a/frontend/rust-lib/flowy-test/tests/folder/supabase_test/mod.rs b/frontend/rust-lib/event-integration/tests/folder/supabase_test/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/folder/supabase_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/folder/supabase_test/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/folder/supabase_test/test.rs b/frontend/rust-lib/event-integration/tests/folder/supabase_test/test.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/folder/supabase_test/test.rs
rename to frontend/rust-lib/event-integration/tests/folder/supabase_test/test.rs
diff --git a/frontend/rust-lib/flowy-test/tests/main.rs b/frontend/rust-lib/event-integration/tests/main.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/main.rs
rename to frontend/rust-lib/event-integration/tests/main.rs
diff --git a/frontend/rust-lib/flowy-test/tests/user/af_cloud_test/mod.rs b/frontend/rust-lib/event-integration/tests/user/af_cloud_test/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/af_cloud_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/user/af_cloud_test/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/user/af_cloud_test/test.rs b/frontend/rust-lib/event-integration/tests/user/af_cloud_test/test.rs
similarity index 89%
rename from frontend/rust-lib/flowy-test/tests/user/af_cloud_test/test.rs
rename to frontend/rust-lib/event-integration/tests/user/af_cloud_test/test.rs
index 5cbde63af6..79540f573d 100644
--- a/frontend/rust-lib/flowy-test/tests/user/af_cloud_test/test.rs
+++ b/frontend/rust-lib/event-integration/tests/user/af_cloud_test/test.rs
@@ -1,4 +1,4 @@
-use flowy_test::FlowyCoreTest;
+use event_integration::FlowyCoreTest;
use crate::util::{generate_test_email, get_af_cloud_config};
diff --git a/frontend/rust-lib/flowy-test/tests/user/local_test/auth_test.rs b/frontend/rust-lib/event-integration/tests/user/local_test/auth_test.rs
similarity index 95%
rename from frontend/rust-lib/flowy-test/tests/user/local_test/auth_test.rs
rename to frontend/rust-lib/event-integration/tests/user/local_test/auth_test.rs
index 074e86cdaa..2edb5d7d4e 100644
--- a/frontend/rust-lib/flowy-test/tests/user/local_test/auth_test.rs
+++ b/frontend/rust-lib/event-integration/tests/user/local_test/auth_test.rs
@@ -1,5 +1,5 @@
-use flowy_test::user_event::*;
-use flowy_test::{event_builder::EventBuilder, FlowyCoreTest};
+use event_integration::user_event::*;
+use event_integration::{event_builder::EventBuilder, FlowyCoreTest};
use flowy_user::entities::{AuthTypePB, SignInPayloadPB, SignUpPayloadPB};
use flowy_user::errors::ErrorCode;
use flowy_user::event_map::UserEvent::*;
diff --git a/frontend/rust-lib/flowy-test/tests/user/local_test/helper.rs b/frontend/rust-lib/event-integration/tests/user/local_test/helper.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/local_test/helper.rs
rename to frontend/rust-lib/event-integration/tests/user/local_test/helper.rs
diff --git a/frontend/rust-lib/flowy-test/tests/user/local_test/mod.rs b/frontend/rust-lib/event-integration/tests/user/local_test/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/local_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/user/local_test/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/user/local_test/user_awareness_test.rs b/frontend/rust-lib/event-integration/tests/user/local_test/user_awareness_test.rs
similarity index 90%
rename from frontend/rust-lib/flowy-test/tests/user/local_test/user_awareness_test.rs
rename to frontend/rust-lib/event-integration/tests/user/local_test/user_awareness_test.rs
index 01802b74a8..75348b7687 100644
--- a/frontend/rust-lib/flowy-test/tests/user/local_test/user_awareness_test.rs
+++ b/frontend/rust-lib/event-integration/tests/user/local_test/user_awareness_test.rs
@@ -1,7 +1,7 @@
use std::collections::HashMap;
-use flowy_test::event_builder::EventBuilder;
-use flowy_test::FlowyCoreTest;
+use event_integration::event_builder::EventBuilder;
+use event_integration::FlowyCoreTest;
use flowy_user::entities::{ReminderPB, RepeatedReminderPB};
use flowy_user::event_map::UserEvent::*;
diff --git a/frontend/rust-lib/flowy-test/tests/user/local_test/user_profile_test.rs b/frontend/rust-lib/event-integration/tests/user/local_test/user_profile_test.rs
similarity index 98%
rename from frontend/rust-lib/flowy-test/tests/user/local_test/user_profile_test.rs
rename to frontend/rust-lib/event-integration/tests/user/local_test/user_profile_test.rs
index 4e62998dc9..6969be29ac 100644
--- a/frontend/rust-lib/flowy-test/tests/user/local_test/user_profile_test.rs
+++ b/frontend/rust-lib/event-integration/tests/user/local_test/user_profile_test.rs
@@ -1,5 +1,5 @@
use crate::user::local_test::helper::*;
-use flowy_test::{event_builder::EventBuilder, FlowyCoreTest};
+use event_integration::{event_builder::EventBuilder, FlowyCoreTest};
use flowy_user::entities::{UpdateUserProfilePayloadPB, UserProfilePB};
use flowy_user::{errors::ErrorCode, event_map::UserEvent::*};
use nanoid::nanoid;
diff --git a/frontend/rust-lib/flowy-test/tests/user/migration_test/document_test.rs b/frontend/rust-lib/event-integration/tests/user/migration_test/document_test.rs
similarity index 95%
rename from frontend/rust-lib/flowy-test/tests/user/migration_test/document_test.rs
rename to frontend/rust-lib/event-integration/tests/user/migration_test/document_test.rs
index 190ec70cf0..167bbecc9c 100644
--- a/frontend/rust-lib/flowy-test/tests/user/migration_test/document_test.rs
+++ b/frontend/rust-lib/event-integration/tests/user/migration_test/document_test.rs
@@ -1,6 +1,6 @@
+use event_integration::FlowyCoreTest;
use flowy_core::DEFAULT_NAME;
use flowy_folder2::entities::ViewLayoutPB;
-use flowy_test::FlowyCoreTest;
use crate::util::unzip_history_user_db;
diff --git a/frontend/rust-lib/flowy-test/tests/user/migration_test/history_user_db/020_historical_user_data.zip b/frontend/rust-lib/event-integration/tests/user/migration_test/history_user_db/020_historical_user_data.zip
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/migration_test/history_user_db/020_historical_user_data.zip
rename to frontend/rust-lib/event-integration/tests/user/migration_test/history_user_db/020_historical_user_data.zip
diff --git a/frontend/rust-lib/flowy-test/tests/user/migration_test/history_user_db/README.md b/frontend/rust-lib/event-integration/tests/user/migration_test/history_user_db/README.md
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/migration_test/history_user_db/README.md
rename to frontend/rust-lib/event-integration/tests/user/migration_test/history_user_db/README.md
diff --git a/frontend/rust-lib/flowy-test/tests/user/migration_test/history_user_db/historical_empty_document.zip b/frontend/rust-lib/event-integration/tests/user/migration_test/history_user_db/historical_empty_document.zip
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/migration_test/history_user_db/historical_empty_document.zip
rename to frontend/rust-lib/event-integration/tests/user/migration_test/history_user_db/historical_empty_document.zip
diff --git a/frontend/rust-lib/flowy-test/tests/user/migration_test/mod.rs b/frontend/rust-lib/event-integration/tests/user/migration_test/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/migration_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/user/migration_test/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/user/migration_test/version_test.rs b/frontend/rust-lib/event-integration/tests/user/migration_test/version_test.rs
similarity index 97%
rename from frontend/rust-lib/flowy-test/tests/user/migration_test/version_test.rs
rename to frontend/rust-lib/event-integration/tests/user/migration_test/version_test.rs
index 2b327770d3..05caa93510 100644
--- a/frontend/rust-lib/flowy-test/tests/user/migration_test/version_test.rs
+++ b/frontend/rust-lib/event-integration/tests/user/migration_test/version_test.rs
@@ -1,6 +1,6 @@
+use event_integration::FlowyCoreTest;
use flowy_core::DEFAULT_NAME;
use flowy_folder2::entities::ViewLayoutPB;
-use flowy_test::FlowyCoreTest;
use crate::util::unzip_history_user_db;
diff --git a/frontend/rust-lib/flowy-test/tests/user/mod.rs b/frontend/rust-lib/event-integration/tests/user/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/mod.rs
rename to frontend/rust-lib/event-integration/tests/user/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/user/supabase_test/auth_test.rs b/frontend/rust-lib/event-integration/tests/user/supabase_test/auth_test.rs
similarity index 98%
rename from frontend/rust-lib/flowy-test/tests/user/supabase_test/auth_test.rs
rename to frontend/rust-lib/event-integration/tests/user/supabase_test/auth_test.rs
index 985b1516d1..c64ecf2b77 100644
--- a/frontend/rust-lib/flowy-test/tests/user/supabase_test/auth_test.rs
+++ b/frontend/rust-lib/event-integration/tests/user/supabase_test/auth_test.rs
@@ -8,12 +8,12 @@ use collab_folder::core::FolderData;
use nanoid::nanoid;
use serde_json::json;
+use event_integration::document::document_event::DocumentEventTest;
+use event_integration::event_builder::EventBuilder;
+use event_integration::FlowyCoreTest;
use flowy_core::DEFAULT_NAME;
use flowy_encrypt::decrypt_text;
use flowy_server::supabase::define::{USER_EMAIL, USER_UUID};
-use flowy_test::document::document_event::DocumentEventTest;
-use flowy_test::event_builder::EventBuilder;
-use flowy_test::FlowyCoreTest;
use flowy_user::entities::{AuthTypePB, OauthSignInPB, UpdateUserProfilePayloadPB, UserProfilePB};
use flowy_user::errors::ErrorCode;
use flowy_user::event_map::UserEvent::*;
diff --git a/frontend/rust-lib/flowy-test/tests/user/supabase_test/history_user_db/README.md b/frontend/rust-lib/event-integration/tests/user/supabase_test/history_user_db/README.md
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/supabase_test/history_user_db/README.md
rename to frontend/rust-lib/event-integration/tests/user/supabase_test/history_user_db/README.md
diff --git a/frontend/rust-lib/flowy-test/tests/user/supabase_test/history_user_db/workspace_sync.zip b/frontend/rust-lib/event-integration/tests/user/supabase_test/history_user_db/workspace_sync.zip
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/supabase_test/history_user_db/workspace_sync.zip
rename to frontend/rust-lib/event-integration/tests/user/supabase_test/history_user_db/workspace_sync.zip
diff --git a/frontend/rust-lib/flowy-test/tests/user/supabase_test/mod.rs b/frontend/rust-lib/event-integration/tests/user/supabase_test/mod.rs
similarity index 100%
rename from frontend/rust-lib/flowy-test/tests/user/supabase_test/mod.rs
rename to frontend/rust-lib/event-integration/tests/user/supabase_test/mod.rs
diff --git a/frontend/rust-lib/flowy-test/tests/user/supabase_test/workspace_test.rs b/frontend/rust-lib/event-integration/tests/user/supabase_test/workspace_test.rs
similarity index 94%
rename from frontend/rust-lib/flowy-test/tests/user/supabase_test/workspace_test.rs
rename to frontend/rust-lib/event-integration/tests/user/supabase_test/workspace_test.rs
index b10d644c41..74236b458e 100644
--- a/frontend/rust-lib/flowy-test/tests/user/supabase_test/workspace_test.rs
+++ b/frontend/rust-lib/event-integration/tests/user/supabase_test/workspace_test.rs
@@ -1,9 +1,9 @@
use std::collections::HashMap;
+use event_integration::{event_builder::EventBuilder, FlowyCoreTest};
use flowy_folder2::entities::WorkspaceSettingPB;
use flowy_folder2::event_map::FolderEvent::GetCurrentWorkspace;
use flowy_server::supabase::define::{USER_EMAIL, USER_UUID};
-use flowy_test::{event_builder::EventBuilder, FlowyCoreTest};
use flowy_user::entities::{AuthTypePB, OauthSignInPB, UserProfilePB};
use flowy_user::event_map::UserEvent::*;
diff --git a/frontend/rust-lib/flowy-test/tests/util.rs b/frontend/rust-lib/event-integration/tests/util.rs
similarity index 98%
rename from frontend/rust-lib/flowy-test/tests/util.rs
rename to frontend/rust-lib/event-integration/tests/util.rs
index 974a858d35..d0c104ffb8 100644
--- a/frontend/rust-lib/flowy-test/tests/util.rs
+++ b/frontend/rust-lib/event-integration/tests/util.rs
@@ -14,15 +14,15 @@ use tokio::time::timeout;
use uuid::Uuid;
use zip::ZipArchive;
+use event_integration::event_builder::EventBuilder;
+use event_integration::Cleaner;
+use event_integration::FlowyCoreTest;
use flowy_database_deps::cloud::DatabaseCloudService;
use flowy_folder_deps::cloud::{FolderCloudService, FolderSnapshot};
use flowy_server::supabase::api::*;
use flowy_server::{AppFlowyEncryption, EncryptionImpl};
use flowy_server_config::af_cloud_config::AFCloudConfiguration;
use flowy_server_config::supabase_config::SupabaseConfiguration;
-use flowy_test::event_builder::EventBuilder;
-use flowy_test::Cleaner;
-use flowy_test::FlowyCoreTest;
use flowy_user::entities::{AuthTypePB, UpdateUserProfilePayloadPB, UserCredentialsPB};
use flowy_user::errors::FlowyError;
use flowy_user::event_map::UserCloudServiceProvider;
diff --git a/frontend/rust-lib/flowy-database2/Cargo.toml b/frontend/rust-lib/flowy-database2/Cargo.toml
index eb90e88c83..b4867a5fe3 100644
--- a/frontend/rust-lib/flowy-database2/Cargo.toml
+++ b/frontend/rust-lib/flowy-database2/Cargo.toml
@@ -32,7 +32,7 @@ rusty-money = {version = "0.4.1", features = ["iso"]}
lazy_static = "1.4.0"
indexmap = {version = "1.9.2", features = ["serde"]}
url = { version = "2"}
-fancy-regex = "0.10.0"
+fancy-regex = "0.11.0"
futures = "0.3.26"
dashmap = "5"
anyhow = "1.0"
@@ -47,7 +47,7 @@ strum = "0.25"
strum_macros = "0.25"
[dev-dependencies]
-flowy-test = { path = "../flowy-test", default-features = false }
+event-integration = { path = "../event-integration", default-features = false }
[build-dependencies]
flowy-codegen = { path = "../../../shared-lib/flowy-codegen"}
diff --git a/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs b/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs
index 79a56e29fe..125b770cdb 100644
--- a/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs
+++ b/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs
@@ -6,6 +6,8 @@ use collab_database::fields::Field;
use collab_database::rows::{CreateRowParams, RowDetail, RowId};
use strum::EnumCount;
+use event_integration::folder_event::ViewTest;
+use event_integration::FlowyCoreTest;
use flowy_database2::entities::{FieldType, FilterPB, RowMetaPB, SelectOptionPB};
use flowy_database2::services::cell::{CellBuilder, ToCellChangeset};
use flowy_database2::services::database::DatabaseEditor;
@@ -18,8 +20,6 @@ use flowy_database2::services::field::{
};
use flowy_database2::services::share::csv::{CSVFormat, ImportResult};
use flowy_error::FlowyResult;
-use flowy_test::folder_event::ViewTest;
-use flowy_test::FlowyCoreTest;
use crate::database::mock_data::{
make_no_date_test_grid, make_test_board, make_test_calendar, make_test_grid,
diff --git a/frontend/rust-lib/flowy-folder2/Cargo.toml b/frontend/rust-lib/flowy-folder2/Cargo.toml
index 07d7793c4a..3b306db494 100644
--- a/frontend/rust-lib/flowy-folder2/Cargo.toml
+++ b/frontend/rust-lib/flowy-folder2/Cargo.toml
@@ -30,10 +30,6 @@ protobuf = {version = "2.28.0"}
uuid = { version = "1.3.3", features = ["v4"] }
tokio-stream = { version = "0.1.14", features = ["sync"] }
-[dev-dependencies]
-flowy-folder2 = { workspace = true }
-flowy-test = { path = "../flowy-test", default-features = false }
-
[build-dependencies]
flowy-codegen = { path = "../../../shared-lib/flowy-codegen"}
diff --git a/frontend/rust-lib/flowy-folder2/tests/workspace/main.rs b/frontend/rust-lib/flowy-folder2/tests/workspace/main.rs
deleted file mode 100644
index ff48b349e1..0000000000
--- a/frontend/rust-lib/flowy-folder2/tests/workspace/main.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-mod folder_test;
-mod script;
diff --git a/frontend/scripts/makefile/tests.toml b/frontend/scripts/makefile/tests.toml
index 4f94ea8149..0ce5b6f49c 100644
--- a/frontend/scripts/makefile/tests.toml
+++ b/frontend/scripts/makefile/tests.toml
@@ -43,7 +43,7 @@ run_task = { name = ["rust_lib_unit_test", "shared_lib_unit_test"] }
env = { RUST_LOG = "info" }
description = "Run cloud unit tests"
script = '''
-cd rust-lib/flowy-test
+cd rust-lib/event-integration
RUST_BACKTRACE=1 cargo test supabase_ --features "cloud_test"
'''