public void Ice_Spirit_is_on_Cards_Page() { var cardsPage = new CardsPage(driver); var iceSpirit = cardsPage.GoTo().GetCardByName("Ice Spirit"); Assert.That(iceSpirit.Displayed); }
public void ThreeMusketeersIsOnTheCardsPage() { var cardsPage = new CardsPage(driver); var threeMusketeers = cardsPage.GoTo().GetCardByName("Three Musketeers"); Assert.That(threeMusketeers.Displayed); }
public void AssertIceSpiritCardIsOnCardPage() { //use our Page Map Pattern Classes CardsPage _cardsPage = new CardsPage(driver); _cardsPage.GoTo(); var card = _cardsPage.GetCardByCardName("Ice Spirit"); Assert.IsTrue(card.Displayed); }
public void AssertIceSpiritCardStatsOnDetailsPage() { CardsPage _cardsPage = new CardsPage(driver); _cardsPage.GoTo(); _cardsPage.GetCardByCardName("Ice Spirit").Click(); CardDetailsPage _cardDetailsPage = new CardDetailsPage(driver); var cardRarity = _cardDetailsPage.GetCardRarity().Text.Split(','); Assert.AreEqual("Troop", cardRarity[0]); Assert.AreEqual("Arena 8", cardRarity[1].Trim()); }
public void AssertIceSpiritCardStatsOnDetailsPage() { CardsPage _cardsPage = new CardsPage(driver); _cardsPage.GoTo(); _cardsPage.GetCardByCardName("Ice Spirit").Click(); CardDetailsPage _cardDetailsPage = new CardDetailsPage(driver); Assert.AreEqual("Troop", _cardDetailsPage.GetCardCategory()); Assert.AreEqual("Arena 8", _cardDetailsPage.GetCardArena()); Assert.AreEqual("Ice Spirit", _cardDetailsPage._Map.CardName.Text); Assert.AreEqual("Common", _cardDetailsPage._Map.CardRarityStatus.Text); }
public void Ice_Spirit_is_on_the_cards_page() { // 1. go to statsroyale.com //driver.Url = "https://statsroyale.com"; // 2. click cards links in header nav //driver.FindElement(By.CssSelector("a[href='/cards']")).Click(); var cardPage = new CardsPage(driver); var IceSpirit = cardPage.GoTo().GetCardByName("Ice Spirit"); // 3. Assert ice spirit is displayed //var IceSpirit = driver.FindElement(By.CssSelector("a[href*='Ice+Spirit']")); Assert.That(IceSpirit.Displayed); }
public void AssertMirrorCardStatsOnDetailsPage() { CardsPage _cardsPage = new CardsPage(driver); _cardsPage.GoTo(); Thread.Sleep(TimeSpan.FromSeconds(10)); _cardsPage.GetCardByCardName("Mirror").Click(); CardDetailsPage _cardDetailsPage = new CardDetailsPage(driver); var mirror = new MirrorCard(); Assert.AreEqual(mirror.Category, _cardDetailsPage._Map.CardRarity.Text.Split(',')[0]); Assert.AreEqual(mirror.Arena, _cardDetailsPage._Map.CardRarity.Text.Split(',')[1].Trim()); Assert.AreEqual(mirror.Name, _cardDetailsPage._Map.CardName.Text); Assert.AreEqual(mirror.RarityStatus, _cardDetailsPage._Map.CardRarityStatus.Text); }
//[TestCase("Mirror")] //[TestCase("Ice Spirit")] public void AssertDifferentCardStatsOnDetailsPage(string cardName) { CardsPage _cardsPage = new CardsPage(driver); _cardsPage.GoTo(); Thread.Sleep(TimeSpan.FromSeconds(20)); _cardsPage.GetCardByCardName(cardName).Click(); CardDetailsPage _cardDetailsPage = new CardDetailsPage(driver); var cardOnPage = _cardDetailsPage.GetBaseCard(); //var mirror = new MirrorCard(); var targetedCardModel = new InMemoryCardService().GetCardByName(cardName); Assert.AreEqual(targetedCardModel.Category, cardOnPage.Category); Assert.AreEqual(targetedCardModel.Arena, cardOnPage.Arena); Assert.AreEqual(targetedCardModel.Name, cardOnPage.Name); Assert.AreEqual(targetedCardModel.RarityStatus, cardOnPage.RarityStatus); }