Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
An atomic test that sets the state of the application
[Test]
public void ShouldBeAbleToCheckOutWithItems()
{
//Arrange
var overviewPage = new CheckoutOverviewPage(Driver);
overviewPage.Open();
//We don't need to actually use th UI to add items to the cart.
//I'm injecting Javascript to control the state of the cart
overviewPage.Cart.SetCartState();
//Act - very few UI interactions
overviewPage.FinishCheckout().
IsCheckoutComplete.Should().BeTrue("we finished the checkout process"); //Assert
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment