-
-
Save angiejones/0ae0bfd245a262fd15b61ed494b7b8a8 to your computer and use it in GitHub Desktop.
Updated test to include more assertions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void test_add_to_cart(){ | |
String product = "TOKYO TALKIES"; | |
String color = "Red"; | |
String size = "M"; | |
int quantity = 2; | |
productPage.setColor(color); | |
productPage.setSize(size); | |
productPage.setQuanity(quantity); | |
productPage.addToCart(); | |
cart = productPage.goToCart(); | |
assertTrue(cart.isProductInCart(product)); | |
assertEquals(cart.getColor(product), color); | |
assertEquals(cart.getSize(product), size); | |
assertEquals(cart.getQuantity(product), quantity); | |
assertEquals(cart.getPrice(product), "₹100.00"); | |
assertEquals(cart.getTotal(product), "₹200.00"); | |
assertEquals(cart.getNumberOfItems, 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment