public void Verify_Search_SaveSearchButton()/*WhenTapOnSaveSearch_DialogShowsUp * While on the Search screen, tapping the Save Search button display the Save Search Dialog*/ { _drawer.NavigateTo("Search"); Settings.AppContext.WaitForElement(SaveSearchButton); Settings.AppContext.Tap(SaveSearchButton); _entryDialog.WaitToAppear(); var entryText = _entryDialog.GetEntryText(); Assert.IsFalse(string.IsNullOrWhiteSpace(entryText)); Settings.AppContext.Screenshot("Save Search Dialog"); }
public void WhenSaveSearch_ThenSearchSaved() { _drawer.NavigateTo("Search"); Settings.AppContext.WaitForElement(_searchScreen.SaveSearchButton); _searchScreen.SearchScreenLoaded(); Settings.AppContext.Tap(_searchScreen.SaveSearchButton); _entryDialog.WaitToAppear(); var entryText = _entryDialog.GetEntryText(); Settings.AppContext.Screenshot("Verifying the Saved Search name is as expected"); _entryDialog.TapAcceptButton(); _drawer.NavigateTo("Saved Searches"); WaitToAppear(); var texts = GetItemLabels().Select(c => c.Text).ToArray(); Assert.IsTrue(texts.Any(c => string.Equals(c, entryText)), $"The saved search \"{entryText}\" should exist in the saved searches screen."); Settings.AppContext.Screenshot("Verifying that the newly saved search appears in the Saved Searches list"); }