[Step(2, "Tap Entry.")]
[Step(3, "Press return button of inputPanel.")]
[Postcondition(1, "NA")]
- public static async Task Activated_EVENT()
+ public async Task Activated_EVENT()
{
CreateEntry();
_entry.IsSingleLine = true;
[Step(1, "Click Run TC")]
[Step(2, "Click Entry.")]
[Postcondition(1, "NA")]
- public static async Task Clicked_EVENT()
+ public async Task Clicked_EVENT()
{
CreateEntry();
_entry.Clicked += Confirm;
[Step(1, "Click Run TC")]
[Step(2, "Input Entry.")]
[Postcondition(1, "NA")]
- public static async Task CursorChanged_EVENT()
+ public async Task CursorChanged_EVENT()
{
CreateEntry();
_entry.CursorChanged += Confirm;
[Step(1, "Click Run TC")]
[Step(2, "Input Entry.")]
[Postcondition(1, "NA")]
- public static async Task ChangedByUser_EVENT()
+ public async Task ChangedByUser_EVENT()
{
CreateEntry();
_entry.ChangedByUser += Confirm;
[Test]
[Category("P1")]
[Description("Test: Handle event SelectAll.")]
- [Property("SPEC", "ElmSharp.Entry.SelectAll M")]
+ [Property("SPEC", "ElmSharp.Entry.SelectAll U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC")]
[Step(3, "if All is Selected,press 'pass' button")]
[Step(4, "Otherwise,press 'fail' button")]
[Postcondition(1, "NA")]
- public static async Task SelectAll_METHOD()
+ public async Task SelectAll_UIBH()
{
CreateEntryPage("SelectAll");
_entry.Text = "Entry test";
[Test]
[Category("P1")]
[Description("Test: Handle event SelectNone.")]
- [Property("SPEC", "ElmSharp.Entry.SelectNone M")]
+ [Property("SPEC", "ElmSharp.Entry.SelectNone U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC")]
[Step(5, "if None is Selected,press 'pass' button")]
[Step(6, "Otherwise,press 'fail' button")]
[Postcondition(1, "NA")]
- public static async Task SelectNone_METHOD()
+ public async Task SelectNone_UIBH()
{
CreateEntryPage2("SelectAll", "SelectNone");
_entry.Text = "Entry test";
[Test]
[Category("P1")]
[Description("Test the inputPanel is not show.")]
- [Property("SPEC", "ElmSharp.Entry.SetInputPanelEnabled M")]
+ [Property("SPEC", "ElmSharp.Entry.SetInputPanelEnabled U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC")]
[Step(2, "Click Entry.")]
[Step(3, "if InputPanel no show,press 'pass' button")]
- [Step(5, "Otherwise,press 'fail' button")]
+ [Step(4, "Otherwise,press 'fail' button")]
[Postcondition(1, "NA")]
- public static async Task SetInputPanelEnabled_METHOD()
+ public async Task SetInputPanelEnabled_UILK()
{
CreateEntry();
_entry.SetInputPanelEnabled(false);
[Test]
[Category("P1")]
[Description("Test InputPanelLayout type.")]
- [Property("SPEC", "ElmSharp.Entry.SetInputPanelLayout M")]
+ [Property("SPEC", "ElmSharp.Entry.SetInputPanelLayout U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC")]
[Step(4, "if it is,press 'pass' button")]
[Step(5, "Otherwise,press 'fail' button")]
[Postcondition(1, "NA")]
- public static async Task SetInputPanelLayout_METHOD()
+ public async Task SetInputPanelLayout_UILK()
{
CreateEntry();
_entry.SetInputPanelLayout(InputPanelLayout.NumberOnly);
[Test]
[Category("P1")]
[Description("Test InputPanel returnKey type.")]
- [Property("SPEC", "ElmSharp.Entry.SetInputPanelReturnKeyType M")]
+ [Property("SPEC", "ElmSharp.Entry.SetInputPanelReturnKeyType U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC")]
[Step(4, "if it is,press 'pass' button")]
[Step(5, "Otherwise,press 'fail' button")]
[Postcondition(1, "NA")]
- public static async Task SetInputPanelReturnKeyType_METHOD()
+ public async Task SetInputPanelReturnKeyType_UILK()
{
CreateEntry();
_entry.SetInputPanelReturnKeyType(InputPanelReturnKeyType.Done);
[Test]
[Category("P1")]
[Description("Test whether filter work when calling AppendMarkUpFilter(Func<ElmSharp.Entry,string,string>).")]
- [Property("SPEC", "ElmSharp.Entry.AppendMarkUpFilter M")]
+ [Property("SPEC", "ElmSharp.Entry.AppendMarkUpFilter U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(4, "Input 'a', and it will show 'a'.")]
[Step(5, "if it is, click Pass, or Fail.")]
[Postcondition(1, "NA")]
- public static async Task AppendMarkUpFilter_METHOD()
+ public async Task AppendMarkUpFilter_UIBH()
{
CreateEntry();
_entry.Text = "Plz input: ";
[Test]
[Category("P1")]
+ [Description("Test whether filter work when calling PrependMarkUpFilter(Func<ElmSharp.Entry,string,string>).")]
+ [Property("SPEC", "ElmSharp.Entry.PrependMarkUpFilter U")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "UIBH")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ [Precondition(1, "NA")]
+ [Step(1, "Turn smart input off(Setting->Input->Keyboard->Smart Input)")]
+ [Step(2, "Click Run TC.")]
+ [Step(3, "Input 't', and it will show 'Tizen'.")]
+ [Step(4, "Input 'a', and it will show 'a'.")]
+ [Step(5, "if it is, click Pass, or Fail.")]
+ [Postcondition(1, "NA")]
+ public async Task PrependMarkUpFilter_UIBH()
+ {
+ CreateEntry();
+ _entry.Text = "Plz input: ";
+ _entry.PrependMarkUpFilter(SetFilter);
+ // Waits for user confirmation.
+ await ManualTest.WaitForConfirm();
+ _entry.RemoveMarkUpFilter(SetFilter);
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Test whether filter is removed when calling RemoveMarkUpFilter(Func<ElmSharp.Entry,string,string>).")]
- [Property("SPEC", "ElmSharp.Entry.RemoveMarkUpFilter M")]
+ [Property("SPEC", "ElmSharp.Entry.RemoveMarkUpFilter U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(5, "Click RemoveMarkUpFilter button, and input 't', and it will show 't'.")]
[Step(6, "if it is, click Pass, or Fail.")]
[Postcondition(1, "NA")]
- public static async Task RemoveMarkUpFilter_METHOD()
+ public async Task RemoveMarkUpFilter_UIBH()
{
CreateEntryPage("RemoveMarkUpFilter");
_entry.Text = "Plz input: ";
[Test]
[Category("P1")]
[Description("Test whether append text after calling AppendText(string).")]
- [Property("SPEC", "ElmSharp.Entry.AppendText M")]
+ [Property("SPEC", "ElmSharp.Entry.AppendText U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Click AppendText button, and you will see '456' after '123' on the entry.")]
[Step(3, "If it is, click Pass, or Fail.")]
[Postcondition(1, "NA")]
- public static async Task AppendText_METHOD()
+ public async Task AppendText_UILK()
{
CreateEntryPage("AppendText");
_entry.Text = "123";
[Description("Test whether the cursor on the begin of the entry after calling BeginCursorSelection().")]
[Property("SPEC", "ElmSharp.Entry.BeginCursorSelection M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Click BeginCursorSelection button.")]
[Step(3, "Test case result will be shown automatically.")]
[Postcondition(1, "NA")]
- public static async Task BeginCursorSelection_METHOD()
+ public async Task BeginCursorSelection_METHOD()
{
CreateEntryPage("BeginCursorSelection");
_entry.Text = "123456";
[Description("Test whether the cursor on the end of the entry after calling EndCursorSelection().")]
[Property("SPEC", "ElmSharp.Entry.EndCursorSelection M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Click EndCursorSelection button.")]
[Step(3, "Test case result will be shown automatically.")]
[Postcondition(1, "NA")]
- public static async Task EndCursorSelection_METHOD()
+ public async Task EndCursorSelection_METHOD()
{
CreateEntryPage("EndCursorSelection");
_entry.Text = "123456";
[Test]
[Category("P1")]
[Description("Test whether copied to clipboard after calling CopySelection().")]
- [Property("SPEC", "ElmSharp.Entry.CopySelection M")]
+ [Property("SPEC", "ElmSharp.Entry.CopySelection U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(2, "Click CopySelection button, and you will see that the text is selected and a popup which shows 'Item already copied to clipboard'.")]
[Step(3, "If it is, click Pass, or Fail.")]
[Postcondition(1, "NA")]
- public static async Task CopySelection_METHOD()
+ public async Task CopySelection_UIBH()
{
if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) != 0)
{
[Test]
[Category("P1")]
[Description("Test whether cutted to clipboard after calling CutSelection().")]
- [Property("SPEC", "ElmSharp.Entry.CutSelection M")]
+ [Property("SPEC", "ElmSharp.Entry.CutSelection U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(2, "Click CutSelection button, and you will see that the text is cutted and a popup which shows 'Item already copied to clipboard'.")]
[Step(3, "If it is, click Pass, or Fail.")]
[Postcondition(1, "NA")]
- public static async Task CutSelection_METHOD()
+ public async Task CutSelection_UIBH()
{
if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) != 0)
{
[Test]
[Category("P1")]
[Description("Test whether paste the text successful after calling PasteSelection().")]
- [Property("SPEC", "ElmSharp.Entry.PasteSelection M")]
+ [Property("SPEC", "ElmSharp.Entry.PasteSelection U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Click PasteSelection button, and you will see '123456' again.")]
[Step(3, "If it is, click Pass, or Fail.")]
[Postcondition(1, "NA")]
- public static async Task PasteSelection_METHOD()
+ public async Task PasteSelection_UILK()
{
if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) != 0)
{
[Test]
[Category("P1")]
[Description("Test whether select text successful after calling DisableSelection(bool).")]
- [Property("SPEC", "ElmSharp.Entry.DisableSelection M")]
+ [Property("SPEC", "ElmSharp.Entry.DisableSelection U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(3, "Please, check the both ends of the selected sentence")]
[Step(4, "Pass if there is no marks(handlers) at both ends of the selected sentence")]
[Postcondition(1, "NA")]
- public static async Task DisableSelection_METHOD()
+ public async Task DisableSelection_UIBH()
{
if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) != 0)
{
[Description("Test whether show the string by the cursor at its current position after calling GetCursorContent().")]
[Property("SPEC", "ElmSharp.Entry.GetCursorContent M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Put the cursor between d and e.")]
[Step(3, "Test case result will be shown automatically.")]
[Postcondition(1, "NA")]
- public static async Task GetCursorContent_METHOD()
+ public async Task GetCursorContent_METHOD()
{
CreateEntry();
_entry.Text = "123456 abcdef";
[Description("Test whether show the text on the label after calling GetCursorContent().")]
[Property("SPEC", "ElmSharp.Entry.GetSelection M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Click GetSelection button.")]
[Step(3, "Test case result will be shown automatically.")]
[Postcondition(1, "NA")]
- public static async Task GetSelection_METHOD()
+ public async Task GetSelection_METHOD()
{
CreateEntryPage("GetSelection");
_entry.Text = "123456 abcdef";
[Test]
[Category("P1")]
[Description("Test whether hidding the input panel after calling HideInputPanel().")]
- [Property("SPEC", "ElmSharp.Entry.HideInputPanel M")]
+ [Property("SPEC", "ElmSharp.Entry.HideInputPanel U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Click HideInputPanel button, and you will see that the input panel is hidden.")]
[Step(3, "If it is, click Pass, or Fail.")]
[Postcondition(1, "NA")]
- public static async Task HideInputPanel_METHOD()
+ public async Task HideInputPanel_UILK()
{
CreateEntryPage("HideInputPanel");
_entry.Text = "123456 abcdef";
[Test]
[Category("P1")]
[Description("Test whether showing the input panel after calling ShowInputPanel().")]
- [Property("SPEC", "ElmSharp.Entry.ShowInputPanel M")]
+ [Property("SPEC", "ElmSharp.Entry.ShowInputPanel U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Click ShowInputPanel button, and you will see that the input panel is shown.")]
[Step(3, "If it is, click Pass, or Fail.")]
[Postcondition(1, "NA")]
- public static async Task ShowInputPanel_METHOD()
+ public async Task ShowInputPanel_UILK()
{
CreateEntryPage("ShowInputPanel");
_entry.Text = "123456 abcdef";
[Test]
[Category("P1")]
[Description("Test whether insert text successful after calling InsertTextToCursor().")]
- [Property("SPEC", "ElmSharp.Entry.InsertTextToCursor M")]
+ [Property("SPEC", "ElmSharp.Entry.InsertTextToCursor U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Click InsertTextToCursor button, and you will see 'InsertText' after '123456'.")]
[Step(3, "If it is, click Pass, or Fail.")]
[Postcondition(1, "NA")]
- public static async Task InsertTextToCursor_METHOD()
+ public async Task InsertTextToCursor_UILK()
{
CreateEntryPage("InsertTextToCursor");
_entry.Text = "123456 abcdef";
[Description("Test whether set file successful after calling SetFile(string, ElmSharp.TextFormat).")]
[Property("SPEC", "ElmSharp.Entry.SetFile M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(3, "Click ExistsFile? button.")]
[Step(4, "Test case result will be shown automatically.")]
[Postcondition(1, "NA")]
- public static async Task SetFile_METHOD()
+ public async Task SetFile_METHOD()
{
CreateEntryPage("ExistsFile?");
_entry.IsAutoSave = true;
[Description("Test whether save file successful after calling SaveFile().")]
[Property("SPEC", "ElmSharp.Entry.SaveFile M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Click SaveFile button.")]
[Step(3, "Test case result will be shown automatically.")]
[Postcondition(1, "NA")]
- public static async Task SaveFile_METHOD()
+ public async Task SaveFile_METHOD()
{
CreateEntryPage("SaveFile");
_entry.IsAutoSave = false;
[Test]
[Category("P1")]
[Description("Test whether showing an icon successful after calling SetIconVisible(bool).")]
- [Property("SPEC", "ElmSharp.Entry.SetIconVisible M")]
+ [Property("SPEC", "ElmSharp.Entry.SetIconVisible U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC.")]
[Step(2, "Click Pass if you can see an icon on the left-side, or click Fail.")]
[Postcondition(1, "NA")]
- public static async Task SetIconVisible_METHOD()
+ public async Task SetIconVisible_UILK()
{
CreateEntry();
[Test]
[Category("P1")]
[Description("Test whether the return key on the input panel is disabled automatically when entry has no text.")]
- [Property("SPEC", "ElmSharp.Entry.SetInputPanelReturnKeyAutoEnable M")]
+ [Property("SPEC", "ElmSharp.Entry.SetInputPanelReturnKeyAutoEnable U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(3, "Input 'abc'. The return key is enabled when the entry has text.")]
[Step(4, "If it is, click Pass, or click Fail.")]
[Postcondition(1, "NA")]
- public static async Task SetInputPanelReturnKeyAutoEnable_METHOD()
+ public async Task SetInputPanelReturnKeyAutoEnable_UIBH()
{
CreateEntry();
_entry.Text = "";
[Test]
[Category("P1")]
[Description("Test whether '123456' is selected after calling SetSelectionRegion(int, int).")]
- [Property("SPEC", "ElmSharp.Entry.SetSelectionRegion M")]
+ [Property("SPEC", "ElmSharp.Entry.SetSelectionRegion U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(1, "Click Run TC.")]
[Step(2, "Click Pass if you can see '123456' is selected, or click Fail.")]
[Postcondition(1, "NA")]
- public static async Task SetSelectionRegion_METHOD()
+ public async Task SetSelectionRegion_UIBH()
{
CreateEntry();
_entry.Text = "123456 abcdef";
[Test]
[Category("P1")]
[Description("Test whether calling bind ItemProvider function successfully.")]
- [Property("SPEC", "ElmSharp.Entry.AppendItemProvider M")]
+ [Property("SPEC", "ElmSharp.Entry.AppendItemProvider U")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run TC")]
[Step(2, "An image will be shown on the entry.")]
- [Step(4, "if it is, click Pass, or Fail.")]
+ [Step(3, "if it is, click Pass, or Fail.")]
+ [Postcondition(1, "NA")]
+ public async Task AppendItemProvider_UILK()
+ {
+ CreateEntry();
+ _entry.AppendItemProvider(ItemProvider);
+ _entry.Text = "<item size=50x50 vsize=full href=itemprovider></item>";
+ // Waits for user confirmation.
+ await ManualTest.WaitForConfirm();
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test whether calling bind ItemProvider function successfully.")]
+ [Property("SPEC", "ElmSharp.Entry.PrependItemProvider U")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "UILK")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ [Precondition(1, "NA")]
+ [Step(1, "Click Run TC")]
+ [Step(2, "An image will be shown on the entry.")]
+ [Step(3, "if it is, click Pass, or Fail.")]
+ [Postcondition(1, "NA")]
+ public async Task PrependItemProvider_UILK()
+ {
+ CreateEntry();
+ _entry.PrependItemProvider(ItemProvider);
+ _entry.Text = "<item size=50x50 vsize=full href=itemprovider></item>";
+ // Waits for user confirmation.
+ await ManualTest.WaitForConfirm();
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test whether calling RemoveItemProvider successfully.")]
+ [Property("SPEC", "ElmSharp.Entry.RemoveItemProvider U")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "UILK")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ [Precondition(1, "NA")]
+ [Step(1, "Click Run TC")]
+ [Step(2, "Click Pass if the image on the entry is not flower image, or click Fail.")]
[Postcondition(1, "NA")]
- public static async Task AppendItemProvider_METHOD()
+ public async Task RemoveItemProvider_UILK()
{
CreateEntry();
_entry.AppendItemProvider(ItemProvider);
_entry.Text = "<item size=50x50 vsize=full href=itemprovider></item>";
+ _entry.RemoveItemProvider(ItemProvider);
// Waits for user confirmation.
await ManualTest.WaitForConfirm();
}
}
-}
\ No newline at end of file
+}
{
private static TestPage _testPage = TestPage.GetInstance();
private static Box _box;
+ private static Button _button;
private static EvasImage _evasImage1;
private static EvasImage _evasImage2;
private static EvasImage _evasImage3;
_box.Unrealize();
_box = null;
}
+ if (_button != null)
+ {
+ _button.Unrealize();
+ _button = null;
+ }
if (_evasImage1 != null)
{
_evasImage1.Unrealize();
_evasImage2.IsSourceVisible = false;
}
+ private static void OnClickedBySaveFile(object sender, EventArgs e)
+ {
+ _evasImage1.Save(@"/tmp/testfile.png", null, "quality=100 compress=0");
+
+ if (File.Exists(@"/tmp/testfile.png"))
+ {
+ ManualTest.Confirm();
+
+ FileInfo file = new FileInfo(@"/tmp/testfile.png");
+ file.Delete();
+ }
+
+ if (!ManualTest.IsConfirmed())
+ {
+ TSettings.GetInstance().TCResult = StrResult.FAIL;
+ ManualTest.Confirm();
+ }
+ }
+
[Test]
[Category("P1")]
[Description("Check whether calling SetBorder can show normal.")]
- [Property("SPEC", "ElmSharp.EvasImage.SetBorder M")]
+ [Property("SPEC", "ElmSharp.EvasImage.SetBorder U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(1, "Click run TC")]
[Step(2, "Plz click Pass if you can see a border with image.")]
[Postcondition(1, "NA")]
- public static async Task SetBorder_Check()
+ public async Task SetBorder_UILK()
{
_evasImage1 = CreateEvasImage();
_evasImage1.IsFilled = true;
[Test]
[Category("P1")]
[Description("Check whether calling SetFile can show normal.")]
- [Property("SPEC", "ElmSharp.EvasImage.SetFile M")]
+ [Property("SPEC", "ElmSharp.EvasImage.SetFile U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(1, "Click run TC")]
[Step(2, "Plz click Pass if you can see a flower image.")]
[Postcondition(1, "NA")]
- public static async Task SetFile_Check()
+ public async Task SetFile_UILK()
{
_evasImage1 = CreateEvasImage();
_evasImage1.IsFilled = true;
[Test]
[Category("P1")]
[Description("Check whether calling SetFill can show normal.")]
- [Property("SPEC", "ElmSharp.EvasImage.SetFill M")]
+ [Property("SPEC", "ElmSharp.EvasImage.SetFill U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(1, "Click run TC")]
[Step(2, "Plz click Pass if you can see 6 flower images on the bottom, or click Fail")]
[Postcondition(1, "NA")]
- public static async Task SetFill_Check()
+ public async Task SetFill_UILK()
{
_evasImage1 = CreateEvasImage();
[Test]
[Category("P1")]
[Description("Check whether calling SetSource can show normal.")]
- [Property("SPEC", "ElmSharp.EvasImage.SetSource M")]
+ [Property("SPEC", "ElmSharp.EvasImage.SetSource U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(1, "Click run TC")]
[Step(2, "Plz click Pass if you can see 2 flower images, or click Fail")]
[Postcondition(1, "NA")]
- public static async Task SetSource_Check()
+ public async Task SetSource_UILK()
{
_evasImage1 = CreateEvasImage();
[Test]
[Category("P1")]
[Description("Check whether calling SetStream can show normal.")]
- [Property("SPEC", "ElmSharp.EvasImage.SetStream M")]
+ [Property("SPEC", "ElmSharp.EvasImage.SetStream U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(1, "Click run TC")]
[Step(2, "Plz click Pass if you can see 1 flower images, or click Fail.")]
[Postcondition(1, "NA")]
- public static async Task SetStream_Check()
+ public async Task SetStream_UILK()
{
_evasImage1 = CreateEvasImage();
[Test]
[Category("P1")]
[Description("Check whether calling BorderCenterFillMode can show normal.")]
- [Property("SPEC", "ElmSharp.EvasImage.BorderCenterFillMode A")]
+ [Property("SPEC", "ElmSharp.EvasImage.BorderCenterFillMode U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(1, "Click run TC")]
[Step(2, "Plz click Pass is you can see the second image only shows its border and the other images show all, or click Fail.")]
[Postcondition(1, "NA")]
- public static async Task BorderCenterFillMode_Check()
+ public async Task BorderCenterFillMode_UILK()
{
_evasImage1 = CreateEvasImage();
_evasImage1.Show();
[Test]
[Category("P1")]
[Description("Check whether calling File can show normal.")]
- [Property("SPEC", "ElmSharp.EvasImage.File A")]
+ [Property("SPEC", "ElmSharp.EvasImage.File U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(1, "Click run TC")]
[Step(2, "Plz click Pass if you can see 1 flower images, or click Fail.")]
[Postcondition(1, "NA")]
- public static async Task File_Check()
+ public async Task File_UILK()
{
_evasImage1 = CreateEvasImage();
_evasImage1.IsFilled = true;
[Test]
[Category("P1")]
+ [Description("Test: Check whether image file save successful after calling Save().")]
+ [Property("SPEC", "ElmSharp.EvasImage.Save M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ [Precondition(1, "NA")]
+ [Step(1, "Click Run TC.")]
+ [Step(2, "Click Save button.")]
+ [Step(3, "Test case result will be shown automatically.")]
+ [Postcondition(1, "NA")]
+ public async Task Save_METHOD()
+ {
+ _box = CreateBox();
+ _box.Show();
+
+ _evasImage1 = CreateEvasImage();
+ _evasImage1.IsFilled = true;
+ _evasImage1.SetFile(Path.Combine(Program.ResourceDir, "test.jpg"), null);
+ _evasImage1.Show();
+ _box.PackEnd(_evasImage1);
+
+ _button = new Button(_window)
+ {
+ Text = "Save",
+ AlignmentX = -1,
+ AlignmentY = -1,
+ MinimumWidth = 100,
+ MinimumHeight = 80,
+ };
+ _button.Show();
+ _box.PackEnd(_button);
+
+ _testPage.ExecuteTCByPage(_box);
+
+ _button.Clicked += OnClickedBySaveFile;
+ // Waits for user confirmation.
+ await ManualTest.WaitForConfirm();
+ _button.Clicked -= OnClickedBySaveFile;
+
+ var niviframe = _testPage.getNavigationPage();
+ if (niviframe != null)
+ niviframe.Pop();
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Check whether calling IsFilled can show normal.")]
- [Property("SPEC", "ElmSharp.EvasImage.IsFilled A")]
+ [Property("SPEC", "ElmSharp.EvasImage.IsFilled U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(1, "Click run TC")]
[Step(2, "Plz click Pass if you can see 1 flower images, or click Fail.")]
[Postcondition(1, "NA")]
- public static async Task IsFilled_Check()
+ public async Task IsFilled_UILK()
{
EvasImage evasImage1 = new EvasImage(_window)
{
[Test]
[Category("P1")]
[Description("Check whether EvasImage can be shown if IsSourceVisible is true, and cannot be shown if IsSourceVisible is false.")]
- [Property("SPEC", "ElmSharp.EvasImage.IsSourceVisible A")]
+ [Property("SPEC", "ElmSharp.EvasImage.IsSourceVisible U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UILK")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click run TC")]
[Step(2, "Click 'Change Visible' button")]
- [Step(2, "Plz click Pass if you can see only 1 tree, or click Fail.")]
+ [Step(3, "Plz click Pass if you can see only 1 tree, or click Fail.")]
[Postcondition(1, "NA")]
- public static async Task IsSourceVisible_Check()
+ public async Task IsSourceVisible_UILK()
{
_img1 = CreateImage("test.jpg");
_img1.Show();
btn.Clicked -= OnClickedByVisible;
}
}
-}
\ No newline at end of file
+}
using System;
using System.Threading.Tasks;
using NUnit.Framework;
+using NUnit.Framework.TUnit;
using ElmSharpApplication.Tizen;
using System.Collections.Generic;
ManualTest.Confirm();
}
+ private void OnItemSelectedByCursor(object s, GenListItemEventArgs e)
+ {
+ _selectedItem = e.Item;
+
+ if (_selectedItem.Cursor == "boat")
+ {
+ ManualTest.Confirm();
+ }
+ else
+ {
+ if (!ManualTest.IsConfirmed())
+ {
+ TSettings.GetInstance().TCResult = StrResult.FAIL;
+ ManualTest.Confirm();
+ }
+ }
+ }
+
+ private void OnItemSelectedByCursorStyle(object s, GenListItemEventArgs e)
+ {
+ _selectedItem = e.Item;
+ _selectedItem.CursorStyle = "transparent";
+
+ if (_selectedItem.CursorStyle == "transparent")
+ {
+ ManualTest.Confirm();
+ }
+ else
+ {
+ if (!ManualTest.IsConfirmed())
+ {
+ TSettings.GetInstance().TCResult = StrResult.FAIL;
+ ManualTest.Confirm();
+ }
+ }
+ }
+
[Test]
[Category("P1")]
[Description("Check whether tooltip is shown after click grid item.")]
- [Property("SPEC", "ElmSharp.GenItem.UpdateTooltipDelegate M")]
+ [Property("SPEC", "ElmSharp.GenItem.UpdateTooltipDelegate U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(2, "Click any grid item.")]
[Step(3, "Click Pass if you can see the item's tooltip which is a button, or click Fail.")]
[Postcondition(1, "NA")]
- public async Task UpdateTooltipDelegate_BEHAVIOR()
+ public async Task UpdateTooltipDelegate_UIBH()
{
if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.WearableProfile) == 0)
{
[Test]
[Category("P1")]
[Description("Check whether tooltip is shown after click list item.")]
- [Property("SPEC", "ElmSharp.GenItem.TooltipContentDelegate A")]
+ [Property("SPEC", "ElmSharp.GenItem.TooltipContentDelegate U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(2, "Click any list item.")]
[Step(3, "Click Pass if you can see the item's tooltip which is a button, or click Fail.")]
[Postcondition(1, "NA")]
- public async Task TooltipContentDelegate_BEHAVIOR()
+ public async Task TooltipContentDelegate_UIBH()
{
if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.WearableProfile) == 0)
{
[Test]
[Category("P1")]
[Description("Check whether tooltip is shown after click grid item.")]
- [Property("SPEC", "ElmSharp.GenItem.GetTooltipContentDelegate.GetTooltipContentDelegate M")]
+ [Property("SPEC", "ElmSharp.GenItem.GetTooltipContentDelegate.GetTooltipContentDelegate U")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "UIBH")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Step(2, "Click any grid item.")]
[Step(3, "Click Pass if you can see the item's tooltip which is a button, or click Fail.")]
[Postcondition(1, "NA")]
- public async Task GetTooltipContentDelegate_BEHAVIOR()
+ public async Task GetTooltipContentDelegate_UIBH()
{
if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.WearableProfile) == 0)
{
[Test]
[Category("P1")]
[Description("Check whether calling OnInvalidate method successful after deleting item.")]
- [Property("SPEC", "ElmSharp.GenItem.OnInvalidate M")]
+ [Property("SPEC", "ElmSharp.GenItem.OnInvalidate E")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "UIBH")]
+ [Property("CRITERIA", "EVL")]
[Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
[Precondition(1, "NA")]
[Step(1, "Click Run tc.")]
[Step(2, "Click any list item.")]
[Step(3, "Testcase result will show automatically.")]
[Postcondition(1, "NA")]
- public async Task OnInvalidate_BEHAVIOR()
+ public async Task OnInvalidate_EVENT()
{
_defaultClass.DeleteHandler = DeleteHandlerDelegate;
for (int i = 1; i <= 5; i++)
await ManualTest.WaitForConfirm();
_genList.ItemSelected -= OnItemSelected;
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Check return data of Cursor is equal to set value.")]
+ [Property("SPEC", "ElmSharp.GenItem.Cursor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ [Precondition(1, "NA")]
+ [Step(1, "Click Run tc.")]
+ [Step(2, "Click any list item.")]
+ [Step(3, "Testcase result will show automatically.")]
+ [Postcondition(1, "NA")]
+ public async Task Cursor_SET_GET()
+ {
+ for (int i = 1; i <= 5; i++)
+ {
+ GenItem item = _genList.Append(_defaultClass, "Item" + i, GenListItemType.Normal);
+ item.Cursor = "boat";
+ }
+ _genList.Show();
+ _genList.ItemSelected += OnItemSelectedByCursor;
+
+ _testPage.ExecuteTC(_genList);
+
+ await ManualTest.WaitForConfirm();
+ _genList.ItemSelected -= OnItemSelectedByCursor;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check return data of CursorStyle is equal to set value.")]
+ [Property("SPEC", "ElmSharp.GenItem.CursorStyle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ [Precondition(1, "NA")]
+ [Step(1, "Click Run tc.")]
+ [Step(2, "Click any list item.")]
+ [Step(3, "Testcase result will show automatically.")]
+ [Postcondition(1, "NA")]
+ public async Task CursorStyle_SET_GET()
+ {
+ for (int i = 1; i <= 5; i++)
+ {
+ GenItem item = _genList.Append(_defaultClass, "Item" + i, GenListItemType.Normal);
+ item.Cursor = "boat";
+ }
+ _genList.Show();
+ _genList.ItemSelected += OnItemSelectedByCursorStyle;
+
+ _testPage.ExecuteTC(_genList);
+
+ await ManualTest.WaitForConfirm();
+ _genList.ItemSelected -= OnItemSelectedByCursorStyle;
+ }
}
-}
\ No newline at end of file
+}
using NUnit.Framework;
using NUnit.Framework.TUnit;
using ElmSharpApplication.Tizen;
+using System.Threading;
namespace ElmSharp.Tests
{
[Step(1, "Click run TC")]
[Step(2, "Click image")]
[Postcondition(1, "NA")]
- public static async Task Clicked_Check()
+ public async Task Clicked_EVENT()
{
CreateImage();
_image.Clicked += OnClicked;
[Description("Test: Check wheter image loading is working or not asynchronously.")]
[Property("SPEC", "ElmSharp.Image.LoadAsync M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "EVL")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "kangho.hur@samsung.com")]
[Precondition(1, "Ensure network connectoin is available")]
[Step(1, "Click run TC")]
[Step(2, "Click 'File' Button")]
[Step(3, "Click 'URI' Button")]
[Step(4, "Wait for 5~10 seconds")]
- [Step(6, "Click 'Stream' Button")]
- [Step(7, "Click 'Invalid' Button")]
- [Step(8, "Test results are automatically determined")]
+ [Step(5, "Click 'Stream' Button")]
+ [Step(6, "Click 'Invalid' Button")]
+ [Step(7, "Test results are automatically determined")]
[Postcondition(1, "NA")]
- public static async Task LoadAsync_Check()
+ public async Task LoadAsync_METHOD()
{
bool checkFile = false;
bool checkUri = false;
//Clean up
box.Unrealize();
box = null;
+ image.LoadingCompleted -= (s, e) => { };
+ image.LoadingFailed -= (s, e) => { };
+ btnFile.Clicked -= async (s, e) => { };
+ btnUri.Clicked -= async (s, e) => { };
+ btnStream.Clicked -= async (s, e) => { };
+ btnInvalid.Clicked -= async (s, e) => { };
// Validation
if (checkFile && checkUri && checkStream && !checkInvalid && checkLoadingCompleted && checkLoadingFailed)
[Test]
[Category("P1")]
+ [Description("Test: Check wheter image loading is working or not asynchronously with cancellation token.")]
+ [Property("SPEC", "ElmSharp.Image.LoadAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "kangho.hur@samsung.com")]
+ [Precondition(1, "Ensure network connectoin is available")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Click 'File' Button")]
+ [Step(3, "Click 'URI' Button")]
+ [Step(4, "Wait for 5~10 seconds")]
+ [Step(5, "Click 'Stream' Button")]
+ [Step(6, "Test results are automatically determined")]
+ [Postcondition(1, "NA")]
+ public async Task LoadAsync2_METHOD()
+ {
+ bool checkFile = false;
+ bool checkUri = false;
+ bool checkStream = false;
+ bool checkLoadingCompleted = false;
+
+ Box box = new Box(_window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ };
+ box.Show();
+
+ Box buttonBox = new Box(_window)
+ {
+ IsHorizontal = true,
+ AlignmentX = -1,
+ AlignmentY = 0,
+ };
+ buttonBox.Show();
+
+ Button btnFile = new Button(_window)
+ {
+ Text = "File",
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1
+ };
+ btnFile.Show();
+
+ Button btnUri = new Button(_window)
+ {
+ Text = "URI",
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1
+ };
+ btnUri.Show();
+
+ Button btnStream = new Button(_window)
+ {
+ Text = "Stream",
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1
+ };
+ btnStream.Show();
+
+ Label info = new Label(_window)
+ {
+ Color = Color.White,
+ AlignmentX = -1,
+ AlignmentY = 0,
+ WeightX = 1
+ };
+ info.Show();
+
+ Image image = new Image(_window)
+ {
+ IsFixedAspect = true,
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1
+ };
+ image.Show();
+
+ image.LoadingCompleted += (s, e) =>
+ {
+ checkLoadingCompleted = true;
+ info.Text = "Image has been loaded successfully.";
+ };
+
+ buttonBox.PackEnd(btnFile);
+ buttonBox.PackEnd(btnUri);
+ buttonBox.PackEnd(btnStream);
+
+ if (ElmSharpProfile.GetProfile() != ElmSharpProfile.WearableProfile)
+ {
+ buttonBox.PackEnd(image);
+ box.PackEnd(buttonBox);
+ box.PackEnd(info);
+ }
+ else
+ {
+ box.PackEnd(image);
+ Scroller scroller = new Scroller(_window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ };
+ scroller.Show();
+ scroller.SetContent(buttonBox);
+ box.PackEnd(scroller);
+ box.PackEnd(info);
+ }
+
+ box.PackEnd(buttonBox);
+ box.PackEnd(info);
+
+ btnFile.Clicked += async (s, e) =>
+ {
+ info.Text = "";
+ checkFile = await image.LoadAsync(Program.Current.DirectoryInfo.Resource + "test.jpg", default(CancellationToken));
+ };
+
+ btnUri.Clicked += async (s, e) =>
+ {
+ info.Text = "";
+ checkUri = await image.LoadAsync("http://pe.tedcdn.com/images/ted/2e306b9655267cee35e45688ace775590b820510_615x461.jpg", default(CancellationToken));
+ };
+
+ btnStream.Clicked += async (s, e) =>
+ {
+ info.Text = "";
+ FileStream fs = new FileStream(Program.Current.DirectoryInfo.Resource + "test2.jpg", FileMode.Open, FileAccess.Read);
+ checkStream = await image.LoadAsync(fs, default(CancellationToken));
+ fs.Dispose();
+ ManualTest.Confirm();
+ };
+
+ _testPage.ExecuteTC(box);
+ await ManualTest.WaitForConfirm();
+
+ //Clean up
+ box.Unrealize();
+ box = null;
+ image.LoadingCompleted -= (s, e) => { };
+ btnFile.Clicked -= async (s, e) => { };
+ btnUri.Clicked -= async (s, e) => { };
+ btnStream.Clicked -= async (s, e) => { };
+
+ // Validation
+ if (checkFile && checkUri && checkStream && checkLoadingCompleted)
+ {
+ Assert.Pass("Image.LoadAsync working properly");
+ }
+ else
+ {
+ Assert.Fail("Image.LoadAsync doesn't working properly");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Test: Check LoadingCompleted is invoked successfully")]
[Property("SPEC", "ElmSharp.Image.LoadingCompleted E")]
[Property("SPEC_URL", "-")]
[Step(3, "Click 'Check' button")]
[Step(4, "Test results are automatically determined")]
[Postcondition(1, "NA")]
- public static async Task LoadingCompleted_Check()
+ public async Task LoadingCompleted_EVENT()
{
bool isValid = false;
Box box = new Box(_window)
//Clean up
box.Unrealize();
box = null;
+ image.LoadingCompleted -= (s, e) => { };
+ loadButton.Clicked -= async (s, e) => { };
+ validateButton.Clicked -= (s, e) => { };
if (isValid)
{
[Step(1, "Click run TC")]
[Step(2, "Click 'Load' button")]
[Step(3, "Click 'Check' button")]
- [Step(3, "Test results are automatically determined")]
+ [Step(4, "Test results are automatically determined")]
[Postcondition(1, "NA")]
- public static async Task LoadingFailed_Check()
+ public async Task LoadingFailed_EVENT()
{
bool isValid = false;
Box box = new Box(_window)
//Clean up
box.Unrealize();
box = null;
+ image.LoadingFailed -= (s, e) => { };
+ loadButton.Clicked -= async (s, e) => { };
+ validateButton.Clicked -= (s, e) => { };
if (isValid)
{
}
}
}
-}
\ No newline at end of file
+}
using NUnit.Framework;
using NUnit.Framework.TUnit;
+using System;
using ElmSharpForTizen.Tizen;
namespace ElmSharp.Tests {
Assert.AreEqual(Color.Blue, _button.BackgroundColor, "BackgroundColor doesn't set and get successfully.");
}
+ [Test]
+ [Category("P1")]
+ [Description("Test DeleteColorClass method")]
+ [Property("SPEC", "ElmSharp.Button.DeleteColorClass M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ public void DeleteColorClass_CHECK_METHOD()
+ {
+ try
+ {
+ _button.DeleteColorClass("button/bg");
+ }
+ catch (Exception ex)
+ {
+ Assert.IsFalse(true, "DeleteColorClass method failed: " + ex.ToString());
+ }
+ }
}
}
[Test]
[Category("P1")]
+ [Description("Check ForceCalculation method")]
+ [Property("SPEC", "ElmSharp.Entry.ForceCalculation M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ public void ForceCalculation_CHECK_METHOD()
+ {
+ /* TEST CODE */
+ try
+ {
+ _entry.ForceCalculation();
+ }
+ catch (Exception ex)
+ {
+ Assert.Fail("Should not throw exception. " + ex.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Check SetPartColor method whether move cursor up")]
[Property("SPEC", "ElmSharp.Entry.SetPartColor M")]
[Property("SPEC_URL", "-")]
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using ElmSharpForTizen.Tizen;
+namespace ElmSharp.Tests
+{
+
+ [TestFixture]
+ [Description("Testing ElmSharp.EvasCanvas class")]
+ public class EvasCanvasTests
+ {
+ private static EvasObject _evasObject;
+ private static EvasCanvas _evasCanvas;
+ private static MainWindow _window = MainWindow.GetInstance();
+
+ [SetUp]
+ public static void Init()
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
+ _evasObject = (EvasObject)new Polygon(_window);
+ _evasCanvas = _evasObject.EvasCanvas;
+ }
+
+ [TearDown]
+ public static void Destroy()
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST");
+ if (_evasObject != null)
+ {
+ _evasObject.Unrealize();
+ _evasObject = null;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether AddDamageRectangle method work well")]
+ [Property("SPEC", "ElmSharp.EvasCanvas.AddDamageRectangle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ public void AddDamageRectangle_CHECK_METHOD()
+ {
+ try
+ {
+ _evasCanvas.AddDamageRectangle(0, 0, 100, 100);
+ }
+ catch (Exception ex)
+ {
+ Assert.IsFalse(true, "AddDamageRectangle method failed: " + ex.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether AddObscuredRectangle method work well")]
+ [Property("SPEC", "ElmSharp.EvasCanvas.AddObscuredRectangle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ public void AddObscuredRectangle_CHECK_METHOD()
+ {
+ try
+ {
+ _evasCanvas.AddObscuredRectangle(0, 0, 100, 100);
+ }
+ catch (Exception ex)
+ {
+ Assert.IsFalse(true, "AddObscuredRectangle method failed: " + ex.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether ClearObscuredRectangle method work well")]
+ [Property("SPEC", "ElmSharp.EvasCanvas.ClearObscuredRectangle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ public void ClearObscuredRectangle_CHECK_METHOD()
+ {
+ try
+ {
+ _evasCanvas.ClearObscuredRectangle();
+ }
+ catch (Exception ex)
+ {
+ Assert.IsFalse(true, "ClearObscuredRectangle method failed: " + ex.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether FlushImageCache method work well")]
+ [Property("SPEC", "ElmSharp.EvasCanvas.FlushImageCache M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ public void FlushImageCache_CHECK_METHOD()
+ {
+ try
+ {
+ _evasCanvas.FlushImageCache();
+ }
+ catch (Exception ex)
+ {
+ Assert.IsFalse(true, "FlushImageCache method failed: " + ex.ToString());
+ }
+ }
+ }
+}
[Test]
[Category("P1")]
+ [Description("Check Calculate method")]
+ [Property("SPEC", "ElmSharp.EvasObject.Calculate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ public void Calculate_CHECK_METHOD()
+ {
+ try
+ {
+ _evasObject.Calculate();
+ }
+ catch (Exception)
+ {
+ Assert.IsFalse(true, "Calculate method failed");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Check whether get value of AllEventsFrozen are identical with the set value or not.")]
[Property("SPEC", "ElmSharp.EvasObject.AllEventsFrozen A")]
[Property("SPEC_URL", "-")]
}
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether setting and getting HorizontalScrollBarVisiblePolicy are equal.")]
+ [Property("SPEC", "ElmSharp.HorizontalScrollBarVisiblePolicy A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRE")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ public void HorizontalScrollBarVisiblePolicy_CHECK()
+ {
+ _genList.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto;
+ Assert.AreEqual(ScrollBarVisiblePolicy.Auto, _genList.HorizontalScrollBarVisiblePolicy, "The HorizontalScrollBarVisiblePolicy value should be Auto.");
+
+ _genList.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible;
+ Assert.AreEqual(ScrollBarVisiblePolicy.Invisible, _genList.HorizontalScrollBarVisiblePolicy, "The HorizontalScrollBarVisiblePolicy value should be Invisible.");
+
+ _genList.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Visible;
+ Assert.AreEqual(ScrollBarVisiblePolicy.Visible, _genList.HorizontalScrollBarVisiblePolicy, "The HorizontalScrollBarVisiblePolicy value should be Visible.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether setting and getting VerticalScrollBarVisiblePolicy are equal.")]
+ [Property("SPEC", "ElmSharp.VerticalScrollBarVisiblePolicy A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRE")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ public void VerticalScrollBarVisiblePolicy_CHECK()
+ {
+ _genList.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto;
+ Assert.AreEqual(ScrollBarVisiblePolicy.Auto, _genList.VerticalScrollBarVisiblePolicy, "The VerticalScrollBarVisiblePolicy value should be Auto.");
+
+ _genList.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible;
+ Assert.AreEqual(ScrollBarVisiblePolicy.Invisible, _genList.VerticalScrollBarVisiblePolicy, "The VerticalScrollBarVisiblePolicy value should be Invisible.");
+
+ _genList.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Visible;
+ Assert.AreEqual(ScrollBarVisiblePolicy.Visible, _genList.VerticalScrollBarVisiblePolicy, "The VerticalScrollBarVisiblePolicy value should be Visible.");
+ }
}
}
using NUnit.Framework.TUnit;
using System;
using ElmSharpForTizen.Tizen;
-using System.Threading;
+using System.Threading.Tasks;
namespace ElmSharp.Tests
{
public class Layout_T : Layout
{
+ bool _isRealized;
+
+ public bool CheckOnRealized => _isRealized;
+
public Layout_T(EvasObject parent) : base(parent)
{
}
{
base.CreateHandle(MainWindow.GetInstance());
}
+
+ protected override void OnRealized()
+ {
+ _isRealized = true;
+ base.OnRealized();
+ }
}
[TestFixture]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "EVL")]
[Property("AUTHOR", "Li Hongqing, hongqing.li@samsung.com")]
- public void LanguageChanged_CHECK()
+ public async Task LanguageChanged_CHECK()
{
_mark = 0;
_layout.LanguageChanged += OnLanguageChanged;
Elementary.SetLanguage("CHS");
- Thread.Sleep(5000);
+ await Task.Delay(5000);
if (_mark == 0)
{
Assert.Fail("The event should be invoked, but is not invoked");
[Test]
[Category("P1")]
+ [Description("Check ThemeChanged is invoked successfully")]
+ [Property("SPEC", "ElmSharp.Layout.ThemeChanged E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+ public async Task ThemeChanged_CHECK()
+ {
+ _mark = 0;
+ _layout = new Button(_window);
+ _layout.ThemeChanged += OnThemeChanged;
+ _layout.Style = "circle";
+
+ await Task.Delay(5000);
+ if (_mark == 0)
+ {
+ Assert.Fail("The event should be invoked, but is not invoked");
+ }
+ _layout.ThemeChanged -= OnThemeChanged;
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Create a Layout instance. Check whether object is successfully created or not.")]
[Property("SPEC", "ElmSharp.Layout.Layout C")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
+ [Description("Check whether GetEdjeData is succesfully.")]
+ [Property("SPEC", "ElmSharp.Layout.GetEdjeData M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")]
+ public void GetEdjeData_CHECK()
+ {
+ _layout = new Entry(_window);
+
+ Assert.IsNotNull(_layout.GetEdjeData("focus_highlight"), "Cannot get the edje data.");
+ Assert.IsNull(_layout.GetEdjeData("none"), "The edje data should be null.");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Check invoke SetVerticalTextAlignment without exception")]
[Property("SPEC", "ElmSharp.Layout.SetVerticalTextAlignment M")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
+ [Description("Check invoke GetVerticalTextAlignment without exception")]
+ [Property("SPEC", "ElmSharp.Layout.GetVerticalTextAlignment M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")]
+ public void GetVerticalTextAlignment_CHECK()
+ {
+ var mark = _layout.GetVerticalTextAlignment("bg");
+ Assert.IsInstanceOf<double>(mark, "Should be instance of double");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Check whether setting and getting TextBlockAccessibility are equal.")]
[Property("SPEC", "ElmSharp.Layout.TextBlockAccessibility A")]
[Property("SPEC_URL", "-")]
Assert.IsInstanceOf<Boolean>(mark);
naviFrameTemp = null;
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether OnRelaized is successfully invoked or not.")]
+ [Property("SPEC", "ElmSharp.Layout.OnRealized M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")]
+ public void OnRealized_Check()
+ {
+ Layout_T layout_T = new Layout_T();
+ layout_T.Realize(_window);
+ Assert.True(layout_T.CheckOnRealized);
+ }
}
}
Assert.AreEqual("{X=100 Y=200}", p.ToString(), "The Point's string should be equal to new create Point.");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether Point.GetHashCode() working properly or not.")]
+ [Property("SPEC", "ElmSharp.Point.GetHashCode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")]
+ public void GetHashCode_CHECK()
+ {
+ bool result = new Point().GetHashCode() == new Point().GetHashCode();
+ if (result)
+ Assert.Pass();
+ else
+ Assert.Fail();
+ }
}
}
Assert.AreEqual("{X=100 Y=200 Z=300}", p.ToString(), "The Point3D's string should be equal to new create Point3D.");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether Point3D.GetHashCode() working properly or not.")]
+ [Property("SPEC", "ElmSharp.Point3D.GetHashCode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")]
+ public void GetHashCode_CHECK()
+ {
+ bool result = new Point3D().GetHashCode() == new Point3D().GetHashCode();
+ if (result)
+ Assert.Pass();
+ else
+ Assert.Fail();
+ }
}
}
[Test]
[Category("P1")]
+ [Description("Check StopPluse (obsolete) returns without any exceptions.")]
+ [Property("SPEC", "ElmSharp.ProgressBar.StopPluse M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")]
+ public void StopPluse_CHECK()
+ {
+ try
+ {
+ _progress.IsPulseMode = true;
+ _progress.StopPluse();
+ }
+ catch (Exception ex)
+ {
+ Assert.Fail("Should not throw exception. " + ex.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Check whether get value of Color is identical with the set value or not")]
[Property("SPEC", "ElmSharp.ProgressBar.Color A")]
[Property("SPEC_URL", "-")]
Assert.AreEqual("{X=100 Y=200 Width=300 Height=400}", r.ToString(), "The Rect's string should be equal to new create Rect.");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether Rect.GetHashCode() working properly or not.")]
+ [Property("SPEC", "ElmSharp.Rect.GetHashCode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")]
+ public void GetHashCode_CHECK()
+ {
+ bool result = new Rect(100, 100, 100, 100).GetHashCode() == new Rect(100, 100, 100, 100).GetHashCode();
+ if (result)
+ Assert.Pass();
+ else
+ Assert.Fail();
+ }
}
}
Assert.AreEqual("{Width=100 Height=200}", s.ToString(), "The Size's string should be equal to new create Size.");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether Size.GetHashCode() working properly or not.")]
+ [Property("SPEC", "ElmSharp.Size.GetHashCode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")]
+ public void GetHashCode_CHECK()
+ {
+ bool result = new Size(100, 100).GetHashCode() == new Size(100, 100).GetHashCode();
+ if (result)
+ Assert.Pass();
+ else
+ Assert.Fail();
+ }
}
}
[Test]
[Category("P1")]
+ [Description("Check whether get value of AavailableRotations(obsolete) are identical with the set value or not.")]
+ [Property("SPEC", "ElmSharp.Window.AavailableRotations A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")]
+ public void AavailableRotations_PROPERTY_SET_GET()
+ {
+ var _availableRotations = DisplayRotation.Degree_90;
+ _testwindow.AavailableRotations = _availableRotations;
+ Assert.AreEqual(_availableRotations, _testwindow.AvailableRotations, "Retrieved AvailableRotations of window should be equal to set value");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Check whether get value of AutoDeletion are identical with the set value or not.")]
[Property("SPEC", "ElmSharp.Window.AutoDeletion A")]
[Property("SPEC_URL", "-")]