public void CheckAddingPersonalisation() { Logger.Log.Info("CheckAddingPersonalisation"); expectedProduct = ProductCreator.withPersonalisation(); ProductPage productPageCheckAddingPersonalisation = new ProductPage(driver); try { BasketPage basketPageCheckAddingPersonalisation = productPageCheckAddingPersonalisation.OpenPage(expectedProduct.URL) .AcceptCookies() .AddPersonalization(expectedProduct.personalisation) .AddProductToBasket() .NavigateToBasket(); products = basketPageCheckAddingPersonalisation.GetProducts(); } catch (Exception ex) { Logger.ErrorHandler(driver, ex); } Assert.AreEqual(expectedProduct.name, products[0].name, "invalid name"); Assert.AreEqual(expectedProduct.color.ToLower(), products[0].color, "invalid color"); Assert.AreEqual(expectedProduct.size, products[0].size, "invalid size"); Assert.AreEqual(expectedProduct.item, products[0].item, "invalid item"); Assert.AreEqual(expectedProduct.personalisation, products[0].personalisation, "invalid personalisation"); Assert.AreEqual(expectedProduct.personalisationColor, products[0].personalisationColor, "invalid personalisation color"); Assert.AreEqual(expectedProduct.price, products[0].price, "invalid price"); Assert.AreEqual(expectedProduct.count, products[0].count, "invalid count"); }
public void CheckProductAttributesAfterSizeChange() { ProductPage productPageCheckProductAttributesAfterSizeChange = new ProductPage(driver); BasketPage basketCheckProductAttributesAfterSizeChange = productPageCheckProductAttributesAfterSizeChange .OpenPage(TestingProducts.OversizedShirt.URL) .AcceptCookies() .ChooseSize("04") .AddProductToBasket() .NavigateToBasket(); List <Product> products = basketCheckProductAttributesAfterSizeChange.GetProducts(); Assert.AreEqual(TestingProducts.OversizedShirt.name, products[0].name, "invalid name"); Assert.AreEqual(TestingProducts.OversizedShirt.color.ToLower(), products[0].color, "invalid color"); Assert.AreEqual(TestingProducts.OversizedShirt.size, products[0].size, "invalid size"); Assert.AreEqual(TestingProducts.OversizedShirt.item, products[0].item, "invalid item"); Assert.AreEqual(TestingProducts.OversizedShirt.price, products[0].price, "invalid price"); Assert.AreEqual(TestingProducts.OversizedShirt.count, products[0].count, "invalid count"); }
public void CheckProductAttributesAfterColorChange() { ProductPage productPageCheckProductAttributesAfterColorChange = new ProductPage(driver); BasketPage basketCheckProductAttributesAfterColorChange = productPageCheckProductAttributesAfterColorChange .OpenPage(TestingProducts.SonnyBumBagBlack.URL) .AcceptCookies() .ChooseColor("Archive beige", TestingProducts.CottonBumBag.name) .AddProductToBasket() .NavigateToBasket(); List <Product> products = basketCheckProductAttributesAfterColorChange.GetProducts(); Assert.AreEqual(TestingProducts.CottonBumBag.name, products[0].name, "invalid name"); Assert.AreEqual(TestingProducts.CottonBumBag.color, products[0].color, "invalid color"); Assert.AreEqual(TestingProducts.CottonBumBag.size, products[0].size, "invalid size"); Assert.AreEqual(TestingProducts.CottonBumBag.item, products[0].item, "invalid item"); Assert.AreEqual(TestingProducts.CottonBumBag.price, products[0].price, "invalid price"); Assert.AreEqual(TestingProducts.CottonBumBag.count, products[0].count, "invalid count"); }