public void A11_Access_Key_Expire_When_User_Completed_the_Content_Bundle_34189()
        {
            #region Create General Course and Bundle With Cost and Access keys Enabled
            CommonSection.CreateLink.GeneralCourse();
            _test.Log(Status.Info, "Creating a Paid General Course");
            GeneralCoursePage.CreateGeneralCourse(generalcourse + "TC34189", "Test General Course");
            GeneralCoursePage.setCost("5");
            DocumentPage.ClickButton_CheckIn();
            _test.Log(Status.Info, "Paid general course created");
            CommonSection.Learn.Home();
            CommonSection.CreateLink.Bundle();
            _test.Log(Status.Info, "Creating a Paid Bundle Course with Access Keys");
            objCreate.FillBundlePage(browserstr + "TC34189");
            GeneralCoursePage.setCost("5");
            _test.Log(Status.Info, "Cost Has Been Set");
            BundlesPage.enableAccessKeys();
            _test.Log(Status.Info, "Access Keys Enabled");
            BundlesPage.addContentIntoBundle(generalcourse + "TC34189");
            _test.Log(Status.Info, "Adding Paid General Course into Bundle");
            DocumentPage.ClickButton_CheckIn();

            #endregion
            #region Purchase Access Keys for Bundle
            ShoppingCarts.purchaseAccessKeys("Bundle", Variables.bundleTitle + browserstr + "TC34189");
            ShoppingCarts.completePurchaseProcess();
            _test.Log(Status.Info, "Keys has been purchased from shopping cart");
            CommonSection.Manage.Training();
            CommonSection.Manage.AccessKeys();
            AccessKeysPage.searchForContent(Variables.bundleTitle + browserstr + "TC34189");
            AccessKeysPage.assignKeysToLearner("*****@*****.**");
            _test.Log(Status.Info, "Keys has been assigned to learner");
            driver.LogoutUser(ObjectRepository.LogoutHoverLink, ObjectRepository.HoverMainLink);
            #endregion
            LoginPage.LoginAs("ssuser1").WithPassword("password").Login();
            Assert.IsTrue(BundlesPage.searchforBundle(Variables.bundleTitle + browserstr + "TC34189", generalcourse + "TC34189"));
            _test.Log(Status.Info, "General Course Displaying inside Bundle, Assertion Pass");
            Assert.IsTrue(Driver.Instance.IsElementVisible(By.XPath("//input[@value='Enroll']")));
            _test.Log(Status.Info, "Cost of General Course Override, Assertion Pass");
            GeneralCoursePage.completeGeneralCourse();
            BundlesPage.simplysearchforBundle(Variables.bundleTitle + browserstr + "TC34189");
            Assert.IsTrue(Driver.Instance.IsElementVisible(By.XPath("//p[contains(.,'You have already completed this item. You must use another access key to begin a new attempt.')]")));
            driver.LogoutUser(ObjectRepository.LogoutHoverLink, ObjectRepository.HoverMainLink);
            LoginPage.LoginAs("").WithPassword("").Login();
        }
示例#2
0
        public void A16_Test_Access_Keys_with_Curriculum_34153()
        {
            #region Create General Course and Curriculum With Cost and Access keys Enabled
            CommonSection.CreateLink.GeneralCourse();
            _test.Log(Status.Info, "Creating a Paid General Course");
            GeneralCoursePage.CreateGeneralCourse(generalcourse + "Curr", "Test General Course");
            GeneralCoursePage.setCost("5");
            DocumentPage.ClickButton_CheckIn();
            _test.Log(Status.Info, "Paid general course created");
            CommonSection.Learn.Home();
            CommonSection.CreateLink.Curriculam();
            _test.Log(Status.Info, "Creating a Paid Curriculum Course with Access Keys");
            objCreate.FillCurriculumPage("AK", browserstr);
            GeneralCoursePage.setCost("5");
            _test.Log(Status.Info, "Cost Has Been Set");
            BundlesPage.enableAccessKeys();
            _test.Log(Status.Info, "Access Keys Enabled");
            CurriculumsPage.CurriculumContent.addContentIntoCurriculam(generalcourse + "Curr");
            _test.Log(Status.Info, "Adding Paid General Course into Curriculum");
            DocumentPage.ClickButton_CheckIn();

            #endregion
            #region Purchase Access Keys for Curriculam
            ShoppingCarts.purchaseAccessKeys("Curriculam", Variables.curriculumTitle + browserstr + "AK");
            ShoppingCarts.completePurchaseProcess();
            _test.Log(Status.Info, "Keys has been purchased from shopping cart");
            CommonSection.Manage.Training();
            CommonSection.Manage.AccessKeys();
            AccessKeysPage.searchForContent(Variables.curriculumTitle + browserstr + "AK");
            AccessKeysPage.assignKeysToLearner("*****@*****.**");
            _test.Log(Status.Info, "Keys has been assigned to learner");
            driver.LogoutUser(ObjectRepository.LogoutHoverLink, ObjectRepository.HoverMainLink);
            #endregion
            LoginPage.LoginAs("ssuser1").WithPassword("password").Login();
            Assert.IsTrue(CurriculumsPage.searchforCurriculam(Variables.curriculumTitle + browserstr + "AK", generalcourse + "Curr"));
            _test.Log(Status.Info, "General Course Displaying inside Curriculuam, Assertion Pass");
            Assert.IsTrue(Driver.Instance.IsElementVisible(By.XPath("//input[@value='Enroll']")));
            // TC_10823 = true;
            _test.Log(Status.Info, "Cost of General Course Override, Assertion Pass");
            driver.LogoutUser(ObjectRepository.LogoutHoverLink, ObjectRepository.HoverMainLink);
            LoginPage.LoginAs("").WithPassword("").Login();
        }