예제 #1
0
        //[TestCase("Mirror")]
        //[TestCase("Ice Spirit")]
        public void AssertDifferentCardStatsOnDetailsPage(string cardName)
        {
            //CardsPage _cardsPage = new CardsPage(Driver.Current);
            // _cardsPage.GoTo();
            Pages.Cards.GoTo();//loading of the page after this action

            if (WaitUtils.isVisible(Driver.Current, TimeSpan.FromSeconds(20), By.XPath("//div[@class='ui__headerMedium'][contains(text(),'Cards')]")) == true)
            {
                Pages.Cards.GetCardByCardName(cardName).Click();
                if (WaitUtils.isVisible(Driver.Current, TimeSpan.FromSeconds(20), By.XPath("//div[text()='Statistics']")) == true)
                {
                    var cardOnPage        = Pages.CardDetails.GetBaseCard();
                    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);
                }
            }
        }