Beispiel #1
0
        public void tc_26327_Add_Certification_To_Cart()
        {
            CommonSection.CreateLink.Certifications();
            _test.Log(Status.Info, "Click create>certification");
            CertificationPage.FillTitle(CertificatrTitle + "TC26327");
            _test.Log(Status.Info, "Fill title");
            CertificationPage.ClickCreateCertification();
            _test.Log(Status.Info, "Click create");
            AdminContentDetailsPage.AddCost();
            ContentDetailsPage.Click_Check_in();
            //CommonSection.SearchCatalog('"' + CertificatrTitle + "TC26327" + '"'); // Search for Bundle that has Promotional Video
            //_test.Log(Status.Info, "Searched" + CertificatrTitle + "TC26327" + "from Catalog");
            //SearchResultsPage.ClickCourseTitle(CertificatrTitle + "TC26327"); // Click on Bundle Title
            //_test.Log(Status.Info, "Clicked searched course title");
            //ContentDetailsPage.Click_CheckOut();
            //ContentDetailsPage.ClickEditContent_New19_2();
            //AdminContentDetailsPage.AddCost();
            //ContentDetailsPage.Click_Check_in();

            CommonSection.SearchCatalog('"' + CertificatrTitle + "TC26327" + '"'); // Search for Bundle that has Promotional Video
            _test.Log(Status.Info, "Searched" + CertificatrTitle + "TC26327" + "from Catalog");
            SearchResultsPage.ClickCourseTitle(CertificatrTitle + "TC26327");      // Click on Bundle Title
            _test.Log(Status.Info, "Clicked searched course title");
            Assert.IsTrue(ContentDetailsPage.isAddToCartButtonDisplayed());
            ContentDetailsPage.ClickAddtoCart_GeneralCourse();
            StringAssert.AreEqualIgnoringCase("Success\r\nThe item was added to the cart.\r\n×", Driver.getSuccessMessage(), "Error message is different");
            Assert.IsTrue(ContentDetailsPage.ClickAddtoCartPortlet.isAddedtocardinfodisplay());
            Assert.IsTrue(CommonSection.isCountincrease_ShopingCart());
        }
Beispiel #2
0
        public void tc_59265_As_a_learner_I_want_to_redeem_discount_codes_at_the_classroom_section_Level()
        {
            CommonSection.Logout();
            LoginPage.LoginAs("ak_learner").WithPassword("").Login();

            CommonSection.SearchCatalog("NewClassroomTest_DIscountCode002");
            _test.Log(Status.Info, "Search for the content");
            SearchResultsPage.ClickCourseTitle("NewClassroomTest_DIscountCode002");
            _test.Log(Status.Info, "Click on searched title");
            ContentDetailsPage.ClickOnAddtoCartButtonOfSection();
            _test.Log(Status.Info, "Click on Add to Cart Button");
            Assert.IsTrue(CommonSection.isCountincrease_ShopingCart());
            _test.Log(Status.Pass, "Verify the cart count has Increased");
            CommonSection.ClickShoppingCart();
            _test.Log(Status.Info, "Click on Shopping Cart");
            ShoppingCartPage.ApplyDiscountCode("Ak005");
            _test.Log(Status.Info, "Apply wrong Discount code");
            StringAssert.AreEqualIgnoringCase("The discount code you entered is not a valid discount code. Confirm that you have entered the code correctly. If you did, then perhaps you no longer have permission to use the code.", ShoppingCartPage.VerifyWrongDiscountCodeMessage());
            _test.Log(Status.Pass, "Verify Alert message for wrong discount Code");
            ShoppingCartPage.ApplyDiscountCode("Ak003");
            _test.Log(Status.Info, "Apply valid discount code");
            StringAssert.AreEqualIgnoringCase("The discount code was applied to your order.", ShoppingCartPage.VerifyValidDiscountCodeMessage());
            _test.Log(Status.Pass, "Verify Alert message for valid discount Code");
            Assert.IsTrue(ShoppingCartPage.DiscountedAmountIsDisplayed());
            _test.Log(Status.Pass, "Verify discounted amount is displayed");
            ShoppingCartPage.RemoveDiscountCode();
            _test.Log(Status.Info, "Remove discount code");
            StringAssert.AreEqualIgnoringCase("The discount code was removed from your order.", ShoppingCartPage.VerifyDiscountCodeRemoveMessage());
            _test.Log(Status.Pass, "Verify Alert message for remove discount Code");
            ShoppingCartPage.ApplyDiscountCode("Ak004");
            _test.Log(Status.Info, "Apply valid percentage discount code");
            StringAssert.AreEqualIgnoringCase("The discount code was applied to your order.", ShoppingCartPage.VerifyValidDiscountCodeMessage());
            _test.Log(Status.Pass, "Verify Alert message for valid discount Code");
            Assert.IsTrue(ShoppingCartPage.DiscountedAmountInPercentageDisplayed());
            _test.Log(Status.Pass, "Verify discounted amount is displayed");
            ShoppingCartPage.RemoveContent("NewClassroomTest_DIscountCode002 - Section 1");
            _test.Log(Status.Info, "Remove content from cart");
            CommonSection.Logout();
            _test.Log(Status.Info, "Logout from learner's account");
            LoginPage.LoginAs("siteadmin").WithPassword("").Login();
            CommonSection.Administer.ECommerce.PricingAndCodes.DiscountCodes();
            _test.Log(Status.Info, "Click Discount codes From administer");
            DiscountCodesPage.SearchCodeAndEditContent("Ak003");
            _test.Log(Status.Info, "Seach the discount code and from Manage go to Edit content");
            DiscountCodesPage.RemoveDiscountCode();
            _test.Log(Status.Info, "Remove Discount code");
            DiscountCodesPage.SearchCodeAndEditContent("Ak004");
            _test.Log(Status.Info, "Seach the discount code and from Manage go to Edit content");
            DiscountCodesPage.RemoveDiscountCode();
            _test.Log(Status.Info, "Remove Discount code");
        }
Beispiel #3
0
        public void a05_Add_General_Course_to_Cart_26229()
        {
            #region Create a general course
            CommonSection.CreateGeneralCourse(GeneralCourseTitle + "_TC26229");
            AdminContentDetailsPage.AddCost();
            ContentDetailsPage.ClickEditContent_New19_2();
            DocumentPage.ClickButton_CheckIn();
            #endregion

            CommonSection.SearchCatalog(GeneralCourseTitle + "_TC26229");
            SearchResultsPage.ClickCourseTitle(GeneralCourseTitle + "_TC26229");
            Assert.IsTrue(ContentDetailsPage.isAddToCartButtonDisplayed());

            ContentDetailsPage.ClickAddtoCart_GeneralCourse();
            // StringAssert.AreEqualIgnoringCase("Success\r\nThe item was added to the cart.\r\n×", Driver.getSuccessMessage(), "Error message is different");

            Assert.IsTrue(ContentDetailsPage.ClickAddtoCartPortlet.isAddedtocardinfodisplay());
            Assert.IsTrue(CommonSection.isCountincrease_ShopingCart());
        }
        public void P20_1_a01_Add_SCROM_Course_to_Cart_26227()
        {
            CommonSection.CreteNewScorm(scormtitle + "TC26227");
            _test.Log(Status.Info, "Creating New Scorm");
            Assert.IsTrue(ContentDetailsPage.IsContentCreated());
            _test.Log(Status.Pass, "Verify New Scorm Course is Created");

            Assert.IsTrue(ContentDetailsPage.isCostNSalesTaxAccordiandisplayed());
            _test.Log(Status.Pass, "Verify Cost and Sales Tax Accordian Display");

            ContentDetailsPage.Accordians.ClickEdit_CostNSalesTax();
            _test.Log(Status.Info, "Click on Cost & SalesTax Accordian Edit button");
            Assert.IsTrue(CostPage.VerifyDifferentPortlets());
            _test.Log(Status.Pass, "Verify the Manage Sales Tax, Default Cost, Alternate Costs, Pricing Schedules sections are displayed");

            CostPage.DefaultCostAs("15").Save();
            _test.Log(Status.Info, "Enter Defailt Cost and Click Save");
            Assert.IsTrue(CostPage.Successmessage("The default cost was saved."));
            _test.Log(Status.Pass, "Verfy Default cost is saved");
            ContentDetailsPage.Click_Check_in();
            CommonSection.Logout();

            LoginPage.LoginAs("srlearner101").WithPassword("").Login();
            CommonSection.SearchCatalog('"' + scormtitle + "TC26227" + '"'); // Search for Bundle that has Promotional Video
            _test.Log(Status.Info, "Searched" + scormtitle + "TC26227" + "from Catalog");
            SearchResultsPage.ClickCourseTitle(scormtitle + "TC26227");      // Click on Bundle Title
            _test.Log(Status.Info, "Clicked searched course title");
            Assert.IsTrue(ContentDetailsPage.isAddToCartButtonDisplayed());  //57254 AC6
            ContentDetailsPage.ClickAddtoCart_GeneralCourse();
            //StringAssert.AreEqualIgnoringCase("Success\r\nThe item was added to the cart.\r\n×", Driver.getSuccessMessage(), "Error message is different");
            Assert.IsTrue(ContentDetailsPage.ClickAddtoCartPortlet.isAddedtocardinfodisplay());
            Assert.IsTrue(CommonSection.isCountincrease_ShopingCart());
            CommonSection.ClickShoppingCart();

            ShoppingCartPage.CompletePurchaseProcess();
            OrderPage.Click_PurchasedContentTitle();
            Assert.IsTrue(ContentDetailsPage.OverviewTab.Costportlet.isViewOrderlinkDisplay());
            ContentDetailsPage.OverviewTab.Costportlet.ClickViewOrderlink();
            Assert.IsTrue(OrderDetailsPage.VerifyPurchasedContent(scormtitle + "TC26227"));
            TC26372 = true;
            TC57930 = true;
        }