Example #1
0
        public void P20_1_tc_55430_As_a_learner_I_want_to_see_what_surveys_are_required_and_when_they_are_available_Bundle_Progress()
        {
            #region Create a general course
            CommonSection.CreateGeneralCourse(GeneralCourseTitle + "_TC55430");
            DocumentPage.ClickButton_CheckIn();
            #endregion
            CommonSection.CreateLink.Bundle();
            _test.Log(Status.Info, "Click create>Bundle");
            CreatebundlePage.CreateBundle("Progress Bundle", bunbdleTitle + "TC55430", "Bundle Price");
            _test.Log(Status.Info, "Create a new Content Bundle");
            BundlesPage.addContentIntoBundle(GeneralCourseTitle + "_TC55430");
            _test.Log(Status.Info, "Adding Paid General Course into Bundle");

            Assert.IsTrue(ContentDetailsPage.isSurveyAccordiandisplayed());
            _test.Log(Status.Info, "Verify Survey accordian display on RHS side");
            ContentDetailsPage.Accordians.ClickManage_Survey();
            _test.Log(Status.Info, "Click Survey Manage button");
            Assert.IsTrue(SurveysPage.IsSurveyPageCompenetsarepresent("btn_AssignSurverbtn", "resultgrid"));
            _test.Log(Status.Info, "Verify Survey page has Assign Surveys button and result grid has no record");
            SurveysPage.ClickAssignSurveysnew();
            _test.Log(Status.Info, "Click on Assign Surveys Button");
            Assert.IsTrue(SurveysPage.AddSurveyModal.IsSearchfieldsDisplayed());
            _test.Log(Status.Pass, "Verify Search, Result grid, Add button on Add survey Modal");
            string Surveytitle_OnEnroll = SurveysPage.AddSurveyModal.AddSurveystoContentWithAvailabilityas("When learner enrolls");
            _test.Log(Status.Info, "Search Survey and add one survey to content with availability as When learner enrolls");
            SurveysPage.ClickAssignSurveysnew();
            _test.Log(Status.Info, "Click on Assign Surveys Button");
            string Surveytitle_OnContentComplete = SurveysPage.AddSurveyModal.AddSurveystoContentWithAvailabilityas("When content completed");
            _test.Log(Status.Info, "Search Survey and add one survey to content with availability as When content completed");
            //SurveysPage.Click_backbutton();
            ContentDetailsPage.ClickCheckInbutton();

            CommonSection.SearchCatalog(bunbdleTitle + "TC55430");
            SearchResultsPage.ClickCourseTitle(bunbdleTitle + "TC55430");
            Assert.IsTrue(ContentDetailsPage.OverviewTab.SurveyPortlet.IsSurveysDisplay(Surveytitle_OnEnroll, Surveytitle_OnContentComplete));
            Assert.IsTrue(ContentDetailsPage.SurveyPortlet.IsSurveysareNotavailable);
            ContentDetailsPage.Click_ReviewTab_GeneralCourse();
            Assert.IsFalse(ContentDetailsPage.GeneralCourse_ReviewsTab.isWriteaReviewButtondisplay());
            _test.Log(Status.Pass, "Verify Write a Review button is not visibile");
            ContentDetailsPage.ContentBanner.Click_Startbutton();
            Assert.IsTrue(ContentDetailsPage.ContentBanner.ContentProgress() == "0%");
            ContentDetailsPage.Click_ReviewTab_GeneralCourse();
            Assert.IsTrue(ContentDetailsPage.GeneralCourse_ReviewsTab.isWriteaReviewButtondisplay());
            ContentDetailsPage.GeneralCourse_ReviewsTab.WriteaReview("Title", "For Testing");
            Assert.IsTrue(ContentDetailsPage.GeneralCourse_ReviewsTab.isReviewlistUpdated("Title"));
            TC57571 = true;
            ContentDetailsPage.ContentBanner.ClickViewContentButton();
            ContentDetailsPage.ContentTab.RequiredContent.ClickContentEnroll(GeneralCourseTitle + "_TC55430");
            ContentDetailsPage.ContentTab.RequiredContent.ClickContentStart(GeneralCourseTitle + "_TC55430");
            ContentDetailsPage.ContentTab.RequiredContent.CompleteBundleContent();
            Assert.IsTrue(ContentDetailsPage.ContentBanner.ContentProgress() == "100%");
            _test.Log(Status.Pass, "Verify content progress display 100% completed");
            TC57313   = true;
            TC57025_1 = true;
            TC27105   = true;
            ContentDetailsPage.Click_OverviewTab();
            Assert.IsTrue(ContentDetailsPage.OverviewTab.SurveyPortlet.IsSurveysAvailable(Surveytitle_OnEnroll));
            Assert.IsTrue(ContentDetailsPage.OverviewTab.SurveyPortlet.IsSurveysAvailable(Surveytitle_OnContentComplete));
        }
        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();
        }
Example #3
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();
        }
Example #4
0
        public void P20_1_b15_Bundles_Containing_a_Document_27196()
        {
            CommonSection.CreteNewDocuemnt(DocumentTitle + "TC27196");
            _test.Log(Status.Info, "Create a Document");
            AdminContentDetailsPage.ClickCheckInbutton();
            _test.Log(Status.Info, "Click Check In Button");



            CommonSection.CreateLink.Bundle();
            _test.Log(Status.Info, "Create Bundle");
            BundlesPage.EnterTitle(bundleTitle + "TC27196");
            _test.Log(Status.Info, "Create bundle course");
            BundlesPage.BundleType("Content Bundle");
            _test.Log(Status.Info, "Select Bundle Type");
            BundlesPage.BundleCostType();
            _test.Log(Status.Info, "Select Bundle Type");
            BundlesPage.ClickCreate();
            _test.Log(Status.Info, "Click on Create Bundle");
            BundlesPage.addContentIntoBundle(DocumentTitle + "TC27196");
            _test.Log(Status.Info, "Add Content in Bundle");
            BundlesPage.checkIn();
            _test.Log(Status.Info, "Click on CheckIn Button");
            CommonSection.SearchCatalog(bundleTitle + "TC27196");
            _test.Log(Status.Info, "Make a Search of Bundle course");
            SearchResultsPage.ClickCourseTitle(bundleTitle + "TC27196");
            _test.Log(Status.Info, "Click on Course Title");
            Assert.IsTrue(ContentDetailsPage.isBundlesCostTypeDisplayed());
            _test.Log(Status.Pass, "Verify Bundle Cost Type is Displayed");
            ContentDetailsPage.ClickOnContent();
            _test.Log(Status.Info, "Click on Content");
            Assert.IsTrue(ContentDetailsPage.isSuggestedBundlesDisplayed());
            _test.Log(Status.Pass, "Verify Suggested Bundle is Displayed");
            Assert.IsTrue(ContentDetailsPage.isBundlesTitleDisplayed());
            _test.Log(Status.Pass, "Verify Bundle Title is Displayed");
            Assert.IsTrue(ContentDetailsPage.isBundlesCostDisplayed());
            _test.Log(Status.Pass, "Verify bundle Cost is Displayed");
        }
Example #5
0
        public void tc_55367_Require_Survey_for_getting_a_certificate_Progress_Bundle()
        {
            #region Survey with Required status Yes
            CommonSection.Logout();
            _test.Log(Status.Pass, "Logout with Site Admin Account");
            LoginPage.LoginAs("").WithPassword("").Login();
            _test.Log(Status.Info, "login with siteadmin Account");
            CommonSection.CreateGeneralCourse(generalcoursetitle + "TC55367");
            DocumentPage.ClickButton_CheckIn();

            CommonSection.CreateLink.Bundle();
            _test.Log(Status.Info, "Click create>Bundle");
            CreatebundlePage.CreateBundle("Progress Bundle", bunbdleTitle + "TC55367", "Bundle Price");
            _test.Log(Status.Info, "Create a new Content Bundle");
            BundlesPage.addContentIntoBundle(generalcoursetitle + "TC55367");
            _test.Log(Status.Info, "Adding Paid General Course into Bundle");

            Assert.IsTrue(ContentDetailsPage.isSurveyAccordiandisplayed());
            _test.Log(Status.Info, "Verify Survey accordian display on RHS side");
            ContentDetailsPage.Accordians.ClickManage_Survey();
            _test.Log(Status.Info, "Click Survey Manage button");
            Assert.IsTrue(SurveysPage.IsSurveyPageCompenetsarepresent("btn_AssignSurverbtn", "resultgrid"));
            _test.Log(Status.Info, "Verify Survey page has Assign Surveys button and result grid has no record");
            SurveysPage.ClickAssignSurveysnew();
            _test.Log(Status.Info, "Click on Assign Surveys Button");
            Assert.IsTrue(SurveysPage.AddSurveyModal.IsSearchfieldsDisplayed());
            _test.Log(Status.Pass, "Verify Search, Result grid, Add button on Add survey Modal");
            SurveysPage.AddSurveyModal.AddSurveystoContent("Before Course Start");
            _test.Log(Status.Info, "Search Survey and add one survey to content with availability as When learner enrolls");

            //SurveysPage.Click_backbutton();
            ContentDetailsPage.ClickCheckInbutton();

            _test.Log(Status.Pass, "Click on Check-In");
            CommonSection.Logout();
            _test.Log(Status.Pass, "Logout From SiteAdmin Account");
            LoginPage.LoginAs("srlearner105").WithPassword("").Login();
            _test.Log(Status.Info, "Login From Learner Account");
            CommonSection.SearchCatalog(bunbdleTitle + "TC55367");
            _test.Log(Status.Info, "Search Created Course");
            SearchResultsPage.ClickCourseTitle(bunbdleTitle + "TC55367");
            _test.Log(Status.Info, "Click Course Title");
            ContentDetailsPage.ContentBanner.Click_Startbutton();
            ContentDetailsPage.Click_OverviewTab();
            Assert.IsTrue(ContentDetailsPage.SurveyPortlet.IsSurveysAvailable("Before Course Start"));
            //  ---------------------------------------------------------

            ContentDetailsPage.Click_ContentTab();
            ContentDetailsPage.ContentTab.RequiredContent.ClickContentEnroll(generalcoursetitle + "TC55367");
            ContentDetailsPage.ContentTab.RequiredContent.ClickContentStart(generalcoursetitle + "TC55367");
            ContentDetailsPage.ContentTab.RequiredContent.CompleteBundleContent();
            Assert.IsFalse(ContentDetailsPage.ContentBanner.isViewCertificationButtonDisplay());
            _test.Log(Status.Pass, "Verify View Certificate Button is displayed");
            ContentDetailsPage.Click_OverviewTab();
            ContentDetailsPage.SurveyPortlet.ClickonattachedSurvey("Before Course Start");
            _test.Log(Status.Info, "Click Attached Survey");
            ContentDetailsPage.SurveyPortlet.CompleteSurvey("Before Course Start");
            _test.Log(Status.Info, "Complete Survey");
            ContentDetailsPage.Click_OverviewTab();
            Assert.True(ContentDetailsPage.ContentBanner.isViewCertificationButtonDisplay());
            _test.Log(Status.Pass, "Verify View Certificate Button is displayed");
            ContentDetailsPage.ContentBanner.clickViewCertificateButton();
            _test.Log(Status.Pass, "Click View Certificate");
            Assert.IsTrue(ContentDetailsPage.isCertificateDisplayed());
            _test.Log(Status.Pass, "Verify certificate Page is displayed");
            Driver.focusParentWindow();
            #endregion

            #region Survey with Required status NO
            CommonSection.Logout();
            LoginPage.LoginAs("").WithPassword("").Login();
            _test.Log(Status.Info, "Login with site admin Account");

            CommonSection.CreateGeneralCourse(generalcoursetitle + "TC55367_1");
            DocumentPage.ClickButton_CheckIn();

            CommonSection.CreateLink.Bundle();
            _test.Log(Status.Info, "Click create>Bundle");
            CreatebundlePage.CreateBundle("Progress Bundle", bunbdleTitle + "TC55367_1", "Bundle Price");
            _test.Log(Status.Info, "Create a new Content Bundle");
            BundlesPage.addContentIntoBundle(generalcoursetitle + "TC55367_1");
            _test.Log(Status.Info, "Adding Paid General Course into Bundle");

            Assert.IsTrue(ContentDetailsPage.isSurveyAccordiandisplayed());
            _test.Log(Status.Info, "Verify Survey accordian display on RHS side");
            ContentDetailsPage.Accordians.ClickManage_Survey();
            _test.Log(Status.Info, "Click Survey Manage button");
            Assert.IsTrue(SurveysPage.IsSurveyPageCompenetsarepresent("btn_AssignSurverbtn", "resultgrid"));
            _test.Log(Status.Info, "Verify Survey page has Assign Surveys button and result grid has no record");
            SurveysPage.ClickAssignSurveysnew();
            _test.Log(Status.Info, "Click on Assign Surveys Button");
            Assert.IsTrue(SurveysPage.AddSurveyModal.IsSearchfieldsDisplayed());
            _test.Log(Status.Pass, "Verify Search, Result grid, Add button on Add survey Modal");
            SurveysPage.AddSurveyModal.AddSurveystoContent("Before Course Start");
            _test.Log(Status.Info, "Search Survey and add one survey to content");
            // AddedsurveyTitle = SurveysPage.AddedSurveysTtile();
            _test.Log(Status.Pass, "Verify Survey Added to Content");
            SurveysPage.resultgrid.RequiredforFirstSurvey("No");
            _test.Log(Status.Pass, "Verify Required field is Yes");
            SurveysPage.CheckIn();
            _test.Log(Status.Pass, "Click on Check-In");

            CommonSection.Logout();
            _test.Log(Status.Pass, "Logout From SiteAdmin Account");
            LoginPage.LoginAs("srlearner105").WithPassword("").Login();
            _test.Log(Status.Info, "Login From Learner Account");
            CommonSection.SearchCatalog(bunbdleTitle + "TC55367_1");
            _test.Log(Status.Info, "Search Created Course");
            SearchResultsPage.ClickCourseTitle(bunbdleTitle + "TC55367_1");
            _test.Log(Status.Info, "Click Course Title");
            ContentDetailsPage.ContentBanner.Click_Startbutton();
            ContentDetailsPage.Click_OverviewTab();
            Assert.IsTrue(ContentDetailsPage.SurveyPortlet.IsSurveysAvailable("Before Course Start"));
            _test.Log(Status.Pass, "Verify Survey is Displayed");
            ContentDetailsPage.Click_ContentTab();
            ContentDetailsPage.ContentTab.RequiredContent.ClickContentEnroll(generalcoursetitle + "_TC55367");
            ContentDetailsPage.ContentTab.RequiredContent.ClickContentStart(generalcoursetitle + "_TC55367");
            ContentDetailsPage.ContentTab.RequiredContent.CompleteBundleContent();
            _test.Log(Status.Info, "Click on Open Item");
            ContentDetailsPage.Click_OverviewTab();
            Assert.IsTrue(ContentDetailsPage.SurveyPortlet.IsSurveysAvailable("Before Course Start"));
            _test.Log(Status.Info, "Verify Survey is Displayed");

            Assert.IsTrue(ContentDetailsPage.ContentBanner.isViewCertificationButtonDisplay());
            _test.Log(Status.Pass, "Verify View Certificate Button is displayed");
            //ContentDetailsPage.ClickViewCertificate();
            //_test.Log(Status.Pass, "Click View Certificate");
            //Assert.IsTrue(ContentDetailsPage.isCertificateDisplayed());
            //_test.Log(Status.Pass, "Verify certificate Page is displayed");
            //Driver.focusParentWindow();

            #endregion
        }