Adding some coverage for the .Include EF statements
This commit is contained in:
parent
b580856e66
commit
a67bd6820c
|
|
@ -335,6 +335,16 @@ namespace E2ETests
|
||||||
Assert.Contains("<a href=\"/Admin/StoreManager\">Back to List</a>", responseContent, StringComparison.OrdinalIgnoreCase);
|
Assert.Contains("<a href=\"/Admin/StoreManager\">Back to List</a>", responseContent, StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This gets the view that non-admin users get to see.
|
||||||
|
private void GetAlbumDetailsFromStore(string albumId, string albumName)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Getting details of album with Id '{0}'", albumId);
|
||||||
|
var response = httpClient.GetAsync(string.Format("Store/Details/{0}", albumId)).Result;
|
||||||
|
ThrowIfResponseStatusNotOk(response);
|
||||||
|
var responseContent = response.Content.ReadAsStringAsync().Result;
|
||||||
|
Assert.Contains(albumName, responseContent, StringComparison.OrdinalIgnoreCase);
|
||||||
|
}
|
||||||
|
|
||||||
private void AddAlbumToCart(string albumId, string albumName)
|
private void AddAlbumToCart(string albumId, string albumName)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Adding album id '{0}' to the cart", albumId);
|
Console.WriteLine("Adding album id '{0}' to the cart", albumId);
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,9 @@ namespace E2ETests
|
||||||
//Get details of the album
|
//Get details of the album
|
||||||
VerifyAlbumDetails(albumId, albumName);
|
VerifyAlbumDetails(albumId, albumName);
|
||||||
|
|
||||||
|
//Get the non-admin view of the album.
|
||||||
|
GetAlbumDetailsFromStore(albumId, albumName);
|
||||||
|
|
||||||
//Add an album to cart and checkout the same
|
//Add an album to cart and checkout the same
|
||||||
AddAlbumToCart(albumId, albumName);
|
AddAlbumToCart(albumId, albumName);
|
||||||
CheckOutCartItems();
|
CheckOutCartItems();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue