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)
[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]
[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";
[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]