예제 #1
0
        public void AdoptSparkyTest()
        {
            var puppyList = new PuppyListPage(_driver);

            puppyList.GoToPage();

            var puppy = puppyList.GetPuppyByName("Sparky");

            puppyList.GoToPuppyDetails(puppy);

            var puppyDetails = new PuppyDetailsPage(_driver);

            puppyDetails.Adopt();

            var puppyAdopt = new PuppyAdoptPage(_driver);

            puppyAdopt.AddCollarAndLeash();
            Console.WriteLine($"Total amount: {puppyAdopt.TotalValue}");
            puppyAdopt.Order();

            var order = new OrderPage(_driver);

            order.PlaceOrder("Credit card");

            // Assertion goes here
        }
예제 #2
0
        public void AdoptBrookeTest()
        {
            var puppyList = new PuppyListPage(_driver);

            puppyList.GoToPage();

            var puppy = puppyList.GetPuppyByName("Brook");

            puppyList.GoToPuppyDetails(puppy);

            var puppyDetails = new PuppyDetailsPage(_driver);

            puppyDetails.Adopt();

            var puppyAdopt = new PuppyAdoptPage(_driver);

            puppyAdopt.AddChewToy();
            puppyAdopt.AddTravelCarrier();
            Console.WriteLine($"Total amount: {puppyAdopt.TotalValue}");
            puppyAdopt.Order();

            var order = new OrderPage(_driver);

            order.PlaceOrder("Check");

            // Assertion goes here
        }
예제 #3
0
        public void AdoptTwoDogs()
        {
            var puppyList = new PuppyListPage(_driver);

            puppyList.GoToPage();

            // get two random puppies
            var twoDogs = puppyList.TwoRandomPuppies();

            puppyList.GoToPage();

            // handle first Puppy
            var firstPuppy = puppyList.GetPuppyByName(twoDogs.FirstOrDefault());

            puppyList.GoToPuppyDetails(firstPuppy);

            var puppyDetails = new PuppyDetailsPage(_driver);

            puppyDetails.Adopt();

            var puppyAdopt = new PuppyAdoptPage(_driver);

            puppyAdopt.AddCollarAndLeash();
            puppyAdopt.AdoptAnother();

            // handle second Puppy
            var secondPuppy = puppyList.GetPuppyByName(twoDogs.LastOrDefault());

            puppyList.GoToPuppyDetails(secondPuppy);

            puppyDetails.Adopt();

            puppyAdopt.AddCollarAndLeash();
            puppyAdopt.Order();

            var order = new OrderPage(_driver);

            order.PlaceOrder("Credit card");

            // Assertion goes here
        }