mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: support changing the workspace icon (#4898)
This commit is contained in:
@ -29,18 +29,28 @@ async fn af_cloud_workspace_delete() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn af_cloud_workspace_name_change() {
|
||||
async fn af_cloud_workspace_change_name_and_icon() {
|
||||
user_localhost_af_cloud().await;
|
||||
let test = EventIntegrationTest::new().await;
|
||||
let user_profile_pb = test.af_cloud_sign_up().await;
|
||||
let workspaces = test.get_all_workspaces().await;
|
||||
let workspace_id = workspaces.items[0].workspace_id.as_str();
|
||||
let new_workspace_name = "new_workspace_name".to_string();
|
||||
let new_icon = "🚀".to_string();
|
||||
test
|
||||
.rename_workspace(workspace_id, "new_workspace_name")
|
||||
.rename_workspace(workspace_id, &new_workspace_name)
|
||||
.await
|
||||
.expect("failed to rename workspace");
|
||||
test
|
||||
.change_workspace_icon(workspace_id, &new_icon)
|
||||
.await
|
||||
.expect("failed to change workspace icon");
|
||||
let workspaces = get_synced_workspaces(&test, user_profile_pb.id).await;
|
||||
assert_eq!(workspaces[0].name, "new_workspace_name".to_string());
|
||||
assert_eq!(workspaces[0].name, new_workspace_name);
|
||||
assert_eq!(workspaces[0].icon, new_icon);
|
||||
let local_workspaces = test.get_all_workspaces().await;
|
||||
assert_eq!(local_workspaces.items[0].name, new_workspace_name);
|
||||
assert_eq!(local_workspaces.items[0].icon, new_icon);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
Reference in New Issue
Block a user