From 8887d674ed9ff04b4196dc7d93f4ec16abf2b432 Mon Sep 17 00:00:00 2001 From: Ege Gungordu Date: Tue, 23 Jan 2024 18:33:28 +0300 Subject: [PATCH] add is_composing check to desktop headless tests --- packages/desktop/headless_tests/events.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/desktop/headless_tests/events.rs b/packages/desktop/headless_tests/events.rs index 69f743a1a..9f6f9fea7 100644 --- a/packages/desktop/headless_tests/events.rs +++ b/packages/desktop/headless_tests/events.rs @@ -154,7 +154,7 @@ fn app(cx: Scope) -> Element { ctrlKey: false, metaKey: false, shiftKey: false, - isComposing: false, + isComposing: true, which: 65, bubbles: true, })"#, @@ -356,6 +356,7 @@ fn app(cx: Scope) -> Element { assert_eq!(event.data.code().to_string(), "KeyA"); assert_eq!(event.data.location(), Location::Standard); assert!(event.data.is_auto_repeating()); + assert!(event.data.is_composing()); received_events.modify(|x| *x + 1) } } @@ -368,6 +369,7 @@ fn app(cx: Scope) -> Element { assert_eq!(event.data.code().to_string(), "KeyA"); assert_eq!(event.data.location(), Location::Standard); assert!(!event.data.is_auto_repeating()); + assert!(!event.data.is_composing()); received_events.modify(|x| *x + 1) } } @@ -380,6 +382,7 @@ fn app(cx: Scope) -> Element { assert_eq!(event.data.code().to_string(), "KeyA"); assert_eq!(event.data.location(), Location::Standard); assert!(!event.data.is_auto_repeating()); + assert!(!event.data.is_composing()); received_events.modify(|x| *x + 1) } }