| 
									
										
										
										
											2024-06-25 01:59:38 +02:00
										 |  |  | use event_integration_test::user_event::user_localhost_af_cloud;
 | 
					
						
							|  |  |  | use event_integration_test::EventIntegrationTest;
 | 
					
						
							| 
									
										
										
										
											2024-08-01 23:13:35 +08:00
										 |  |  | use flowy_ai::entities::CompletionTypePB;
 | 
					
						
							| 
									
										
										
										
											2024-06-25 01:59:38 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | use std::time::Duration;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #[tokio::test]
 | 
					
						
							|  |  |  | async fn af_cloud_complete_text_test() {
 | 
					
						
							|  |  |  |   user_localhost_af_cloud().await;
 | 
					
						
							|  |  |  |   let test = EventIntegrationTest::new().await;
 | 
					
						
							|  |  |  |   test.af_cloud_sign_up().await;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   let _workspace_id = test.get_current_workspace().await.id;
 | 
					
						
							|  |  |  |   let _task = test
 | 
					
						
							|  |  |  |     .complete_text("hello world", CompletionTypePB::MakeLonger)
 | 
					
						
							|  |  |  |     .await;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   tokio::time::sleep(Duration::from_secs(6)).await;
 | 
					
						
							|  |  |  | }
 |