Пример #1
0
        public void ThreeMusketeersIsOnTheCardsPage()
        {
            var cardsPage       = new CardsPage(driver);
            var threeMusketeers = cardsPage.GoTo().GetCardByName("Three Musketeers");

            Assert.That(threeMusketeers.Displayed);
        }
Пример #2
0
        public void Ice_Spirit_is_on_Cards_Page()
        {
            var cardsPage = new CardsPage(driver);
            var iceSpirit = cardsPage.Goto().GetCardByName("Ice Spirit");

            Assert.That(iceSpirit.Displayed);
        }
Пример #3
0
        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());
        }
Пример #5
0
        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);
        }
Пример #6
0
        public void MirrorAreCorrectOnCardDetailsPage()
        {
            new CardsPage(driver).GoTo().GetCardByName("Mirror").Click();
            var cardDetails = new CardsPage(driver);

            var(category, arena) = cardDetails.GetCardCategory();
            var CardName    = cardDetails.Map.CardName.Text;
            var CardRarirty = cardDetails.Map.CardRarirty.Text;

            Assert.AreEqual("Mirror", CardName);
            Assert.AreEqual("Spell", category);
            Assert.AreEqual("Arena 12", arena);
            Assert.AreEqual("Epic", CardRarirty);
        }
Пример #7
0
        public void ThreeMusketeerAreCorrectOnCardDetailsPage()
        {
            new CardsPage(driver).GoTo().GetCardByName("Ice Sprit").Click();
            var cardDetails = new CardsPage(driver);

            var(category, arena) = cardDetails.GetCardCategory();
            var CardName    = cardDetails.Map.CardName.Text;
            var CardRarirty = cardDetails.Map.CardRarirty.Text;

            Assert.AreEqual("Three Musketeers", CardName);
            Assert.AreEqual("Troop", category);
            Assert.AreEqual("Arena 7", arena);
            Assert.AreEqual("Rare", CardRarirty);
        }
Пример #8
0
        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);
        }
Пример #9
0
        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);
        }
Пример #10
0
        //[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);
        }
Пример #11
0
 protected CardsTestBase() : base()
 {
     Page = new CardsPage(Driver);
 }
Пример #12
0
 public MainTabbedPage()
 {
     Children.Add(CardsPage.CreateInNavigationPage());
 }