2024-01-16 01:14:11 +00:00
|
|
|
use dioxus::dioxus_core::{ElementId, Mutation::*};
|
2022-11-24 11:47:14 +00:00
|
|
|
use dioxus::prelude::*;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn bool_test() {
|
2024-01-16 19:18:46 +00:00
|
|
|
let mut app = VirtualDom::new(|| rsx!(div { hidden: false }));
|
2023-01-02 20:40:25 +00:00
|
|
|
|
2022-11-24 11:47:14 +00:00
|
|
|
assert_eq!(
|
2024-01-11 01:21:15 +00:00
|
|
|
app.rebuild_to_vec().santize().edits,
|
2022-11-24 11:47:14 +00:00
|
|
|
[
|
|
|
|
LoadTemplate { name: "template", index: 0, id: ElementId(1) },
|
2022-12-09 22:18:37 +00:00
|
|
|
SetAttribute {
|
|
|
|
name: "hidden",
|
2024-01-11 01:21:15 +00:00
|
|
|
value: dioxus_core::AttributeValue::Bool(false),
|
2022-12-09 22:18:37 +00:00
|
|
|
id: ElementId(1,),
|
|
|
|
ns: None
|
|
|
|
},
|
2022-12-03 00:24:49 +00:00
|
|
|
AppendChildren { m: 1, id: ElementId(0) },
|
2022-11-24 11:47:14 +00:00
|
|
|
]
|
2022-12-09 22:18:37 +00:00
|
|
|
);
|
2022-11-24 11:47:14 +00:00
|
|
|
}
|