[Non-ACR][ElmSharp][Fixed Entry TC for TV profile] 00/199300/1
authorJeonghyun Yun <jh0506.yun@samsung.com>
Fri, 8 Feb 2019 08:04:08 +0000 (17:04 +0900)
committerJeonghyun Yun <jh0506.yun@samsung.com>
Fri, 8 Feb 2019 08:06:14 +0000 (17:06 +0900)
Change-Id: Ic126cf1493c8778677ed565b2c5878d9092e0b37
Signed-off-by: Jeonghyun Yun <jh0506.yun@samsung.com>
tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEntry.cs

index 4343512..cd17cb1 100644 (file)
@@ -220,12 +220,24 @@ namespace ElmSharp.Tests
 
         private void SelectNone(object sender, EventArgs e)
         {
+            _entry.SelectAll();
+            string _selection = _entry.GetSelection();
             _entry.SelectNone();
+            if (_selection == _entry.Text && _entry.GetSelection() == null)
+            {
+                Assert.True(true);
+                ManualTest.Confirm();
+            }
         }
 
         private void SelectAll(object sender, EventArgs e)
         {
             _entry.SelectAll();
+            if (_entry.GetSelection() == _entry.Text)
+            {
+                Assert.True(true);
+                ManualTest.Confirm();
+            }
         }
 
         private void OnClickedByAppendText(object sender, EventArgs e)
@@ -442,12 +454,21 @@ namespace ElmSharp.Tests
         [Postcondition(1, "NA")]
         public async Task Activated_EVENT()
         {
-            CreateEntry();
-            _entry.IsSingleLine = true;
-            _entry.Activated += Confirm;
-            // Waits for user confirmation.
-            await ManualTest.WaitForConfirm();
-            _entry.Activated -= Confirm;
+            if ((ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) == 0) ||
+                (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.WearableProfile) == 0))
+            {
+                CreateEntry();
+                _entry.IsSingleLine = true;
+                _entry.Activated += Confirm;
+                // Waits for user confirmation.
+                await ManualTest.WaitForConfirm();
+                _entry.Activated -= Confirm;
+            }
+            else
+            {
+                _testPage.UnlockUIButton();
+                Assert.Pass("Not Supported");
+            }
         }
 
         [Test]
@@ -513,17 +534,15 @@ namespace ElmSharp.Tests
         [Test]
         [Category("P1")]
         [Description("Test: Handle event SelectAll.")]
-        [Property("SPEC", "ElmSharp.Entry.SelectAll U")]
+        [Property("SPEC", "ElmSharp.Entry.SelectAll M")]
         [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "UIBH")]
+        [Property("CRITERIA", "MR")]
         [Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")]
         [Precondition(1, "NA")]
         [Step(1, "Click Run TC")]
         [Step(2, "Click SelectAll button")]
-        [Step(3, "if All is Selected,press 'pass' button")]
-        [Step(4, "Otherwise,press 'fail' button")]
         [Postcondition(1, "NA")]
-        public async Task SelectAll_UIBH()
+        public async Task SelectAll_METHOD()
         {
             CreateEntryPage("SelectAll");
             _entry.Text = "Entry test";
@@ -536,28 +555,22 @@ namespace ElmSharp.Tests
         [Test]
         [Category("P1")]
         [Description("Test: Handle event SelectNone.")]
-        [Property("SPEC", "ElmSharp.Entry.SelectNone U")]
+        [Property("SPEC", "ElmSharp.Entry.SelectNone M")]
         [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "UIBH")]
+        [Property("CRITERIA", "MR")]
         [Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")]
         [Precondition(1, "NA")]
         [Step(1, "Click Run TC")]
-        [Step(2, "Input Entry.")]
-        [Step(3, "Click SelectAll button")]
-        [Step(4, "Click SelectNone button")]
-        [Step(5, "if None is Selected,press 'pass' button")]
-        [Step(6, "Otherwise,press 'fail' button")]
+        [Step(2, "Click SelectNone button")]
         [Postcondition(1, "NA")]
-        public async Task SelectNone_UIBH()
+        public async Task SelectNone_METHOD()
         {
-            CreateEntryPage2("SelectAll", "SelectNone");
+            CreateEntryPage("SelectNone");
             _entry.Text = "Entry test";
-            _button1.Clicked += SelectAll;
-            _button2.Clicked += SelectNone;
+            _button1.Clicked += SelectNone;
             // Waits for user confirmation.
             await ManualTest.WaitForConfirm();
-            _button1.Clicked -= SelectAll;
-            _button2.Clicked -= SelectNone;
+            _button1.Clicked -= SelectNone;
         }
 
         [Test]