[ElmSharp][Non-ACR] Enhance ElmSharp function coverage 74/178274/5
authorsung-su.kim <sung-su.kim@samsung.com>
Wed, 9 May 2018 06:01:05 +0000 (15:01 +0900)
committersung-su.kim <sung-su.kim@samsung.com>
Wed, 9 May 2018 06:55:53 +0000 (15:55 +0900)
- Change TC from Elementary.FlushAllCashe to Elementary.FlushAllCache
- Add manual TC for GenGrid.ItemFocused/ItemUnfocused events
- Add manual TC for Scroller.ScrollAnimationStarted/ScrollAnimationStopped events

Change-Id: I61a6ec292c433ccf776279b812f8a5b728f54f88

tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSGenGrid.cs
tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSScroller.cs
tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSElementary.cs

index 5f7d47f..cb69d18 100755 (executable)
@@ -889,5 +889,60 @@ namespace ElmSharp.Tests
 
             _genGrid.Changed -= OnItemEventConfirm;
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether ItemFocused event is triggered if a GenGrid is shown.")]
+        [Property("SPEC", "ElmSharp.GenGrid.ItemFocused E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
+        [Precondition(1, "NA")]
+        [Step(1, "Click Run tc.")]
+        [Step(2, "Click item.")]
+        [Postcondition(1, "NA")]
+        public async Task ItemFocused_EVENT()
+        {
+            for (int i = 0; i < _colorList.Count / 4; i++)
+            {
+                _genGridItemList.Add(_genGrid.Append(_genItemClass, _colorList[i]));
+            }
+            _genGrid.ItemFocused += OnItemEventConfirm;
+            _genGrid.Show();
+
+            _testPage.ExecuteTC(_genGrid);
+
+            await ManualTest.WaitForConfirm();
+
+            _genGrid.ItemFocused -= OnItemEventConfirm;
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether ItemUnfocused event is triggered if a GenGrid is shown.")]
+        [Property("SPEC", "ElmSharp.GenGrid.ItemUnfocused E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
+        [Precondition(1, "NA")]
+        [Step(1, "Click Run tc.")]
+        [Step(2, "Click item.")]
+        [Step(3, "Click other item.")]
+        [Postcondition(1, "NA")]
+        public async Task ItemUnfocused_EVENT()
+        {
+            for (int i = 0; i < _colorList.Count / 4; i++)
+            {
+                _genGridItemList.Add(_genGrid.Append(_genItemClass, _colorList[i]));
+            }
+            _genGrid.ItemUnfocused += OnItemEventConfirm;
+            _genGrid.Show();
+
+            _testPage.ExecuteTC(_genGrid);
+
+            await ManualTest.WaitForConfirm();
+
+            _genGrid.ItemUnfocused -= OnItemEventConfirm;
+        }
     }
 }
\ No newline at end of file
index fd99de9..458fb79 100755 (executable)
@@ -1108,5 +1108,65 @@ namespace ElmSharp.Tests
             _scroller.DragStop -= _CheckDragStop;
             _scroller.PageScrolled -= _CheckPageScrolled;
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether ScrollAnimationStarted event is triggered if scroll to start with animation.")]
+        [Property("SPEC", "ElmSharp.Scroller.ScrollAnimationStarted E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "UIBH")]
+        [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
+        [Precondition(1, "NA")]
+        [Step(1, "Click run TC")]
+        [Step(2, "Scroll it")]
+        [Step(3, "Testcase result will be shown automatically")]
+        [Postcondition(1, "NA")]
+        public static async Task ScrollAnimationStarted_EVENT()
+        {
+            CreateScroller("Scroll it !!");
+            _scroller.SetPageSize(1, 1);
+
+            _testPage.ExecuteTCByPage(_scroller);
+
+            _scroller.ScrollAnimationStarted += _Confirm;
+
+            await ManualTest.WaitForConfirm();
+
+            var niviframe = _testPage.getNavigationPage();
+            if (niviframe != null)
+                niviframe.Pop();
+
+            _scroller.ScrollAnimationStarted -= _Confirm;
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether ScrollAnimationStopped event is triggered if scroll to end with animation.")]
+        [Property("SPEC", "ElmSharp.Scroller.ScrollAnimationStopped E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "UIBH")]
+        [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
+        [Precondition(1, "NA")]
+        [Step(1, "Click run TC")]
+        [Step(2, "Scroll it")]
+        [Step(3, "Testcase result will be shown automatically")]
+        [Postcondition(1, "NA")]
+        public static async Task ScrollAnimationStopped_EVENT()
+        {
+            CreateScroller("Scroll it !!");
+            _scroller.SetPageSize(1, 1);
+
+            _testPage.ExecuteTCByPage(_scroller);
+
+            _scroller.ScrollAnimationStopped += _Confirm;
+
+            await ManualTest.WaitForConfirm();
+
+            var niviframe = _testPage.getNavigationPage();
+            if (niviframe != null)
+                niviframe.Pop();
+
+            _scroller.ScrollAnimationStopped -= _Confirm;
+        }
     }
 }
\ No newline at end of file
index 54f6ad5..0192d2b 100755 (executable)
@@ -168,20 +168,20 @@ namespace ElmSharp.Tests
 
         [Test]
         [Category("P1")]
-        [Description("Check FlushAllCashe method is work well without any exceptions.")]
-        [Property("SPEC", "ElmSharp.Elementary.FlushAllCashe M")]
+        [Description("Check FlushAllCache method is work well without any exceptions.")]
+        [Property("SPEC", "ElmSharp.Elementary.FlushAllCache M")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "MR")]
         [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
-        public void FlushAllCashe_CHECK_METHOD()
+        public void FlushAllCache_CHECK_METHOD()
         {
             try
             {
-                Elementary.FlushAllCashe();
+                Elementary.FlushAllCache();
             }
             catch (Exception ex)
             {
-                Assert.IsTrue(false, "Elementary FlushAllCashe method failed: " + ex.ToString());
+                Assert.IsTrue(false, "Elementary FlushAllCache method failed: " + ex.ToString());
             }
         }