mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Fix/grid group (#1787)
* ci: config rust log * chore: rename flowy-sdk to appflowy-core * fix: create group after editing the url * fix: start listen on new group * chore: add tests * refactor: mock data * ci: update command
This commit is contained in:
@ -3,7 +3,7 @@ pub mod helper;
|
||||
|
||||
use crate::helper::*;
|
||||
|
||||
use flowy_core::{FlowySDK, FlowySDKConfig};
|
||||
use flowy_core::{AppFlowyCore, AppFlowyCoreConfig};
|
||||
use flowy_document::entities::DocumentVersionPB;
|
||||
use flowy_net::get_client_server_configuration;
|
||||
use flowy_user::entities::UserProfilePB;
|
||||
@ -16,11 +16,11 @@ pub mod prelude {
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct FlowySDKTest {
|
||||
pub inner: FlowySDK,
|
||||
pub inner: AppFlowyCore,
|
||||
}
|
||||
|
||||
impl std::ops::Deref for FlowySDKTest {
|
||||
type Target = FlowySDK;
|
||||
type Target = AppFlowyCore;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.inner
|
||||
@ -36,10 +36,10 @@ impl std::default::Default for FlowySDKTest {
|
||||
impl FlowySDKTest {
|
||||
pub fn new(document_version: DocumentVersionPB) -> Self {
|
||||
let server_config = get_client_server_configuration().unwrap();
|
||||
let config = FlowySDKConfig::new(&root_dir(), nanoid!(6), server_config)
|
||||
let config = AppFlowyCoreConfig::new(&root_dir(), nanoid!(6), server_config)
|
||||
.with_document_version(document_version)
|
||||
.log_filter("info", vec![]);
|
||||
let sdk = std::thread::spawn(|| FlowySDK::new(config)).join().unwrap();
|
||||
let sdk = std::thread::spawn(|| AppFlowyCore::new(config)).join().unwrap();
|
||||
std::mem::forget(sdk.dispatcher());
|
||||
Self { inner: sdk }
|
||||
}
|
||||
|
Reference in New Issue
Block a user