[Non-ACR][NUI][Fix TCT fails] 12/231112/1
authorDongsug Song <dongsug.song@samsung.com>
Fri, 17 Apr 2020 08:45:39 +0000 (17:45 +0900)
committerDongsug Song <dongsug.song@samsung.com>
Fri, 17 Apr 2020 08:45:39 +0000 (17:45 +0900)
Change-Id: Iad871d79d046b965b6c4720c4bdb63668181f21a

tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSVideoView.cs

index 45e4f0f954e62500dd298002d3791fc528de5da3..7a9284403e78f47e9666398570b843b9e75b5b34 100755 (executable)
@@ -635,22 +635,26 @@ namespace Tizen.NUI.Tests
             };
             NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(editor);
             var inputMethodContext = editor.GetInputMethodContext();
+            await Task.Delay(500);
             if (inputMethodContext)
             {
                 _temp = 0;
                 inputMethodContext.EventReceived += OnEventReceived;
-                inputMethodContext.Deactivate();
-                inputMethodContext.HideInputPanel();
-                await Task.Delay(500);
+                tlog.Debug(TAG, $"EventReceived_EVENT, OnEventReceived added, State={inputMethodContext.GetInputPanelState()}");
                 inputMethodContext.Activate();
                 inputMethodContext.ShowInputPanel();
-                await Task.Delay(500);\r
-
-                tlog.Debug(TAG, "EventReceived_EVENT Add 500ms delay");
-
+                await Task.Delay(500);
+                tlog.Debug(TAG, $"EventReceived_EVENT, ShowInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}");
+                inputMethodContext.HideInputPanel();
+                await Task.Delay(500);
+                tlog.Debug(TAG, $"EventReceived_EVENT, HideInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}");
                 Assert.AreEqual(10, _temp, "Should be 10");
                 inputMethodContext.EventReceived -= OnEventReceived;
             }
+            else
+            {
+                tlog.Debug(TAG, $"EventReceived_EVENT, error : inputMethodContext is null !");
+            }
             editor.Unparent();
             editor.Dispose();
             editor = null;
@@ -671,23 +675,29 @@ namespace Tizen.NUI.Tests
                 Position2D = new Position2D(10, 550),
                 BackgroundColor = Color.Magenta,
                 Focusable = true,
-            };\r
+            };
             NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(editor);
             var inputMethodContext = editor.GetInputMethodContext();
+            await Task.Delay(500);
             if (inputMethodContext)
             {
                 _temp = 0;
                 inputMethodContext.StatusChanged += OnInputMethodContextEvent;
-                inputMethodContext.Deactivate();
-                inputMethodContext.HideInputPanel();
-                await Task.Delay(500);
+                tlog.Debug(TAG, $"StatusChanged_EVENT, OnInputMethodContextEvent added, State={inputMethodContext.GetInputPanelState()}");
                 inputMethodContext.Activate();
                 inputMethodContext.ShowInputPanel();
                 await Task.Delay(500);
-                tlog.Debug(TAG, "StatusChanged_EVENT Add 500ms delay");
+                tlog.Debug(TAG, $"StatusChanged_EVENT, ShowInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}");
+                inputMethodContext.HideInputPanel();
+                await Task.Delay(500);
+                tlog.Debug(TAG, $"StatusChanged_EVENT, HideInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}");
                 Assert.AreEqual(10, _temp, "Should be 10");
                 inputMethodContext.StatusChanged -= OnInputMethodContextEvent;
             }
+            else
+            {
+                tlog.Debug(TAG, $"StatusChanged_EVENT, error : inputMethodContext is null !");
+            }
             editor.Unparent();
             editor.Dispose();
             editor = null;
@@ -708,23 +718,29 @@ namespace Tizen.NUI.Tests
                 Position2D = new Position2D(10, 550),
                 BackgroundColor = Color.Magenta,
                 Focusable = true,
-            };\r
+            };
             NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(editor);
             var inputMethodContext = editor.GetInputMethodContext();
+            await Task.Delay(500);
             if (inputMethodContext)
             {
                 _temp = 0;
                 inputMethodContext.Resized += OnInputMethodContextEvent;
+                tlog.Debug(TAG, $"Resized_EVENT, OnInputMethodContextEvent added, State={inputMethodContext.GetInputPanelState()}");
                 inputMethodContext.Activate();
                 inputMethodContext.ShowInputPanel();
                 await Task.Delay(500);
-                inputMethodContext.Deactivate();
+                tlog.Debug(TAG, $"Resized_EVENT, ShowInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}");
                 inputMethodContext.HideInputPanel();
-                await Task.Delay(500);\r
-                tlog.Debug(TAG, "Resized_EVENT Add 500ms delay");
+                await Task.Delay(500);
+                tlog.Debug(TAG, $"Resized_EVENT, HideInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}");
                 Assert.AreEqual(10, _temp, "Should be 10");
                 inputMethodContext.Resized -= OnInputMethodContextEvent;
-            }\r
+            }
+            else
+            {
+                tlog.Debug(TAG, $"Resized_EVENT, error : inputMethodContext is null !");
+            }
             editor.Unparent();
             editor.Dispose();
             editor = null;
index 6110933a8295a4f193f720a550d7fb05d8a43f0f..bb123c987e27857dd7ee927d1672466284a029db 100755 (executable)
@@ -376,16 +376,21 @@ namespace Tizen.NUI.Tests
             videoView.Underlay = false;
             Window.Instance.GetDefaultLayer().Add(videoView);
             await Task.Delay(3000);
-
-            //Assert.IsInstanceOf<VideoView>(videoView, "Should be an instance of VideoView type.");
-
+            Assert.IsInstanceOf<VideoView>(videoView, "Should be an instance of VideoView type.");
             try
             {
                 _flagOnFinished = false;
                 videoView.Finished += OnFinished;
                 Assert.False(_flagOnFinished, "_flagOnFinished should false initial");
                 videoView.Play();
-                await Task.Delay(2000);
+                Tizen.Log.Error(TAG, $"Finished_CHECK_EVENT, videoPath={videoPath}");
+                await Task.Delay(3000);
+                if (false == _flagOnFinished)
+                {
+                    Tizen.Log.Error(TAG, $"Finished_CHECK_EVENT, _flagOnFinished is false! this is just Finished event test, so Stop() forcefully");
+                    videoView.Stop();
+                    await Task.Delay(1000);
+                }
                 Assert.True(_flagOnFinished, "_flagOnFinished should be true after Finished triggered");
                 videoView.Unparent();
             }