Skip to content

Instantly share code, notes, and snippets.

@jimevans
Last active October 27, 2016 22:09
Show Gist options
  • Save jimevans/8fd6ea73f3e5e0c133d666bb07c0aa3a to your computer and use it in GitHub Desktop.
Save jimevans/8fd6ea73f3e5e0c133d666bb07c0aa3a to your computer and use it in GitHub Desktop.
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MaterialFlow.Pages;
using MaterialFlow.Utilities;
namespace Tests
{
[TestClass]
public class CanPlaceOrderSuccesfullyFromHomeCategories : TestBase
{
public static int Generate(int num1, int num2)
{
Random ran = new Random();
int randomNumber = ran.Next(num1, num2);
return randomNumber;
}
[TestMethod]
public void OrderStartingFromHomePage()
{
int randomNumber = Generate(1, 28);
Pages.Home.GoTo();
Commons.UseHomePageCategoriesToFindItem();
//Makes sure is on correct category page. Not sure how to dynamically change the page depending on
//what page is selected.
//Assert.IsTrue(Pages.)
Commons.Checkout(randomNumber.ToString());
//Add test to make sure that the quantity and pricing information are correct on checkout page.
Shipping.ShippingInfo();
Payment.PaymentInfo();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment