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.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
use std::time::Duration;
use event_integration_test::EventIntegrationTest;
use flowy_user::{
entities::{RepeatedUserWorkspacePB, UserWorkspacePB},
protobuf::UserNotification,
};
use crate::util::receive_with_timeout;
pub async fn get_synced_workspaces(
test: &EventIntegrationTest,
user_id: i64,
) -> Vec<UserWorkspacePB> {
let workspaces = test.get_all_workspaces().await.items;
let sub_id = user_id.to_string();
let rx = test
.notification_sender
.subscribe::<RepeatedUserWorkspacePB>(
&sub_id,
UserNotification::DidUpdateUserWorkspaces as i32,
);
if let Some(result) = receive_with_timeout(rx, Duration::from_secs(10)).await {
result.items
} else {
workspaces
}
}