From: Seoyeon Kim Date: Tue, 28 Apr 2020 09:43:36 +0000 (+0900) Subject: [Non-ACR][NUI][Fix InputMethodContext TCT fails] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=949161e35514c8d8eb1e11ca12349da5bb2bcd01;p=test%2Ftct%2Fcsharp%2Fapi.git [Non-ACR][NUI][Fix InputMethodContext TCT fails] - To show input panel, TextEditor should be focused. Change-Id: I07091c11051d74607936ca18c4430658bc51e25b Signed-off-by: Seoyeon Kim --- diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs index 7a9284403..26699faca 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs @@ -634,6 +634,7 @@ namespace Tizen.NUI.Tests Focusable = true, }; NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(editor); + FocusManager.Instance.SetCurrentFocusView(editor); var inputMethodContext = editor.GetInputMethodContext(); await Task.Delay(500); if (inputMethodContext) @@ -643,6 +644,7 @@ namespace Tizen.NUI.Tests tlog.Debug(TAG, $"EventReceived_EVENT, OnEventReceived added, State={inputMethodContext.GetInputPanelState()}"); inputMethodContext.Activate(); inputMethodContext.ShowInputPanel(); + editor.Text = "text"; // EventReceived event emits when the text is preedit or commit while focusing. await Task.Delay(500); tlog.Debug(TAG, $"EventReceived_EVENT, ShowInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}"); inputMethodContext.HideInputPanel(); @@ -655,6 +657,7 @@ namespace Tizen.NUI.Tests { tlog.Debug(TAG, $"EventReceived_EVENT, error : inputMethodContext is null !"); } + FocusManager.Instance.ClearFocus(); editor.Unparent(); editor.Dispose(); editor = null; @@ -677,6 +680,7 @@ namespace Tizen.NUI.Tests Focusable = true, }; NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(editor); + FocusManager.Instance.SetCurrentFocusView(editor); var inputMethodContext = editor.GetInputMethodContext(); await Task.Delay(500); if (inputMethodContext) @@ -698,6 +702,7 @@ namespace Tizen.NUI.Tests { tlog.Debug(TAG, $"StatusChanged_EVENT, error : inputMethodContext is null !"); } + FocusManager.Instance.ClearFocus(); editor.Unparent(); editor.Dispose(); editor = null; @@ -720,6 +725,7 @@ namespace Tizen.NUI.Tests Focusable = true, }; NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(editor); + FocusManager.Instance.SetCurrentFocusView(editor); var inputMethodContext = editor.GetInputMethodContext(); await Task.Delay(500); if (inputMethodContext) @@ -741,6 +747,7 @@ namespace Tizen.NUI.Tests { tlog.Debug(TAG, $"Resized_EVENT, error : inputMethodContext is null !"); } + FocusManager.Instance.ClearFocus(); editor.Unparent(); editor.Dispose(); editor = null;