feat: add main features
Agents for developpement added + frontend add + backend added. Git viewer created + agent and template creator + layout and project creator
This commit is contained in:
28
crates/app-tauri/tests/dto_window.rs
Normal file
28
crates/app-tauri/tests/dto_window.rs
Normal file
@ -0,0 +1,28 @@
|
||||
//! L10 DTO tests: `move_tab_to_new_window` result mapping + tab-id parsing.
|
||||
|
||||
use app_tauri_lib::dto::{parse_tab_id, MoveTabResultDto};
|
||||
use application::MoveTabToNewWindowOutput;
|
||||
use domain::ids::WindowId;
|
||||
use domain::layout::Workspace;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[test]
|
||||
fn move_tab_result_serializes_new_window_id_camel_case() {
|
||||
let out = MoveTabToNewWindowOutput {
|
||||
new_window_id: WindowId::from_uuid(Uuid::from_u128(42)),
|
||||
workspace: Workspace::default(),
|
||||
};
|
||||
let dto = MoveTabResultDto::from(out);
|
||||
let json = serde_json::to_string(&dto).unwrap();
|
||||
assert!(json.contains("\"newWindowId\""), "json was {json}");
|
||||
assert!(!json.contains("new_window_id"), "no snake_case leak: {json}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_tab_id_accepts_uuid_and_rejects_garbage() {
|
||||
let uuid = Uuid::from_u128(7).to_string();
|
||||
assert!(parse_tab_id(&uuid).is_ok());
|
||||
|
||||
let err = parse_tab_id("not-a-uuid").unwrap_err();
|
||||
assert_eq!(err.code, "INVALID");
|
||||
}
|
||||
Reference in New Issue
Block a user