From: Shrouq Sabah Date: Thu, 19 Aug 2021 10:22:07 +0000 (+0300) Subject: [NUI][ACR-444] Add EllipsisPosition property to TextLabel, TextField and TextEditor X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6e1ad584330b098b18b1b27de010347902e9a44;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI][ACR-444] Add EllipsisPosition property to TextLabel, TextField and TextEditor Add test-cases read/write property for: Ellipsis_Position Property in TextLabel, TextField and TextEditor Positions: END, START and MIDDLE Ellipsis Property in TextEditor Note: Ellipsis Property exists in TextLabel & TextField with test-cases Change-Id: Iabd9c9362ccfd2d644d4ec19f244a03d8eb5a8fe --- diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs index bc1625d..b03b637 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs @@ -936,6 +936,61 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] + [Description("Test Ellipsis. Check whether Ellipsis is readable and writable.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.Ellipsis A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")] + public void Ellipsis_SET_GET_VALUE() + { + /* TEST CODE */ + var textEditor = new TextEditor(); + textEditor.Ellipsis = false; + Assert.IsFalse(textEditor.Ellipsis, "Retrieved Ellipsis value should be equal to the set value (False)"); + + textEditor.Ellipsis = true; + Assert.IsTrue(textEditor.Ellipsis, "Retrieved Ellipsis value should be equal to the set value (True)"); + } + + + [Test] + [Category("P1")] + [Description("Test EllipsisPosition. Check default value of EllipsisPosition is End.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.EllipsisPosition A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PDV")] + [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")] + public void EllipsisPosition_DEFAULT_VALUE() + { + /* TEST CODE */ + var textEditor = new TextEditor(); + Assert.AreEqual(EllipsisPosition.End, textEditor.EllipsisPosition,"Retrieved EllipsisPosition value (Default) should be equal to (End))"); + } + + [Test] + [Category("P1")] + [Description("Test EllipsisPosition. Check whether EllipsisPosition is readable and writable.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.EllipsisPosition A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")] + public void EllipsisPosition_SET_GET_VALUE() + { + /* TEST CODE */ + var textEditor = new TextEditor(); + + textEditor.EllipsisPosition = EllipsisPosition.Start; + Assert.AreEqual(EllipsisPosition.Start, textEditor.EllipsisPosition,"Retrieved EllipsisPosition value should be equal to the set value (Start)"); + + textEditor.EllipsisPosition = EllipsisPosition.Middle; + Assert.AreEqual(EllipsisPosition.Middle, textEditor.EllipsisPosition,"Retrieved EllipsisPosition value should be equal to the set value (Middle)"); + + textEditor.EllipsisPosition = EllipsisPosition.End; + Assert.AreEqual(EllipsisPosition.End, textEditor.EllipsisPosition,"Retrieved EllipsisPosition value should be equal to the set value (End)"); + } + + [Test] + [Category("P1")] [Description("Test PlaceholderText. Check whether PlaceholderText is readable and writable.")] [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.PlaceholderText A")] [Property("SPEC_URL", "-")] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs index 2776e77..1e83b65 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs @@ -134,6 +134,42 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] + [Description("Test EllipsisPosition. Check default value of EllipsisPosition is End.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.EllipsisPosition A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PDV")] + [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")] + public void EllipsisPosition_DEFAULT_VALUE() + { + /* TEST CODE */ + var textField = new TextField(); + Assert.AreEqual(EllipsisPosition.End, textField.EllipsisPosition,"Retrieved EllipsisPosition value (Default) should be equal to (End))"); + } + + [Test] + [Category("P1")] + [Description("Test EllipsisPosition. Check whether EllipsisPosition is readable and writable.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.EllipsisPosition A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")] + public void EllipsisPosition_SET_GET_VALUE() + { + /* TEST CODE */ + var textField = new TextField(); + + textField.EllipsisPosition = EllipsisPosition.Start; + Assert.AreEqual(EllipsisPosition.Start, textField.EllipsisPosition,"Retrieved EllipsisPosition value should be equal to the set value (Start)"); + + textField.EllipsisPosition = EllipsisPosition.Middle; + Assert.AreEqual(EllipsisPosition.Middle, textField.EllipsisPosition,"Retrieved EllipsisPosition value should be equal to the set value (Middle)"); + + textField.EllipsisPosition = EllipsisPosition.End; + Assert.AreEqual(EllipsisPosition.End, textField.EllipsisPosition,"Retrieved EllipsisPosition value should be equal to the set value (End)"); + } + + [Test] + [Category("P1")] [Description("Test HiddenInputSettings. Check whether HiddenInputSettings is readable and writable.")] [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.HiddenInputSettings A")] [Property("SPEC_URL", "-")] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs index 15ac65f..e35012c 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs @@ -111,7 +111,7 @@ namespace Tizen.NUI.Tests map.Insert("slant", value); textLabel.FontStyle = map; - //This is for MDC-Solis TCT: MCD-Solis has different fonts installed so it needs seperated test case. (There is no condition or definition for specific target) + //This is for MDC-Solis TCT: MCD-Solis has different fonts installed so it needs seperated test case. (There is no condition or definition for specific target) if (map.Count() != textLabel.FontStyle.Count()) { map.Clear(); @@ -482,6 +482,42 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] + [Description("Test EllipsisPosition. Check default value of EllipsisPosition is End.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.EllipsisPosition A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PDV")] + [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")] + public void EllipsisPosition_DEFAULT_VALUE() + { + /* TEST CODE */ + var textLabel = new TextLabel(); + Assert.AreEqual(EllipsisPosition.End, textLabel.EllipsisPosition,"Retrieved EllipsisPosition value (Default) should be equal to (End))"); + } + + [Test] + [Category("P1")] + [Description("Test EllipsisPosition. Check whether EllipsisPosition is readable and writable.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.EllipsisPosition A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")] + public void EllipsisPosition_SET_GET_VALUE() + { + /* TEST CODE */ + var textLabel = new TextLabel(); + + textLabel.EllipsisPosition = EllipsisPosition.Start; + Assert.AreEqual(EllipsisPosition.Start, textLabel.EllipsisPosition,"Retrieved EllipsisPosition value should be equal to the set value (Start)"); + + textLabel.EllipsisPosition = EllipsisPosition.Middle; + Assert.AreEqual(EllipsisPosition.Middle, textLabel.EllipsisPosition,"Retrieved EllipsisPosition value should be equal to the set value (Middle)"); + + textLabel.EllipsisPosition = EllipsisPosition.End; + Assert.AreEqual(EllipsisPosition.End, textLabel.EllipsisPosition,"Retrieved EllipsisPosition value should be equal to the set value (End)"); + } + + [Test] + [Category("P1")] [Description("Test Emboss. Check whether Emboss is readable and writable.")] [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.Emboss A")] [Property("SPEC_URL", "-")]