You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: event_bubbling.rs
    path of file: ./repos/freya/crates/core/tests
    
    the code of the file until where you have to start completion: use dioxus::prelude::*;
use freya_core::prelude::*;
use freya_elements::elements as dioxus_elements;
use freya_testing::{events::pointer::MouseButton, events::MouseEvent, launch_test};
use torin::prelude::CursorPoint;

#[tokio::test]
pub async fn captured_event() {
    fn app() -> Element {
        let mut state = use_signal(String::new);

        rsx!(
            rect {
                height: "100%",
                width: "100%",
                onclick: move |_: MouseEvent| {
                    state.set("1".to_string());
                },
                rect {
                    he
    
pub async fn not_captured_event() {
    fn app() -> Element {
        let mut state = use_signal(String::new);

        rsx!(
            rect {
                height: "100%",
                width: "100%",
                onclick: move |_: MouseEvent| {
                    state.set("1".to_string());
                },
                rect {
                    height: "100",
                    width: "100",
                    background: "red",
                    onclick: move |_: MouseEvent| {
                        state.set("2".to_string());
                    }
                }
                label {
                    "{state}"
                }
            }
        )
    }

    let mut utils = launch_test(app);

    let root = utils.root().get(0);
    let label = root.get(1);

    assert_eq!(label.get(0).text(), Some(""));

    utils.push_event(PlatformEvent::Mouse {
        name: EventName::Click,
        cursor: CursorPoint::new(50.0, 50.0),
        button: Some(MouseButton::Left),
    });

    utils.wait_for_update().await;

    assert_eq!(label.get(0).text(), Some("1"));
}