public void WhenAnItemIsAddedToTheCart() { EtsySearchPage = new EtsySearchPageModel(Driver); EtsySearchResultsPage = EtsySearchPage.SearchForSomething("Hat"); EtsyItemPage = EtsySearchResultsPage.ClickFirstResult(); ScenarioContext.Current["Item Title"] = EtsyItemPage.ItemTitle(); EtsyCartPage = EtsyItemPage.ClickAddToCart(); }
public void ThenIShouldSeeNoSearchResults(string term) { StringAssert.DoesNotMatch(@"\d+,?\d* items for " + term, EtsySearchResultsPage.SearchResultsText()); StringAssert.IsMatch(@"^We didn't find anything for " + term + @"\.$", EtsySearchResultsPage.SearchResultsText()); }
public void ThenIShouldSeeTheSearchWasFor(string newTerm, string oldTerm) { StringAssert.IsMatch("No results found for " + oldTerm + ", searching instead for " + newTerm + ".", EtsySearchResultsPage.SpellingText()); }