Ejemplo n.º 1
0
        public void tc_26335_Access_Re_certification()
        {
            CommonSection.CreateLink.GeneralCourse();
            _test.Log(Status.Info, "Creating a Paid General Course");
            GeneralCoursePage.CreateGeneralCourse(generalcoursetitle + "TC26335", "Test General Course");
            DocumentPage.ClickButton_CheckIn();
            CommonSection.CreateLink.GeneralCourse();
            _test.Log(Status.Info, "Creating a Paid General Course");
            GeneralCoursePage.CreateGeneralCourse(generalcoursetitle + "TC26335_Recitify", "Test General Course");
            DocumentPage.ClickButton_CheckIn();

            CommonSection.CreateLink.Certifications();
            _test.Log(Status.Info, "Click create>certification");
            CertificationPage.FillTitle(CertificatrTitle + "TC26335");
            _test.Log(Status.Info, "Fill title");
            CertificatePage.Doesthiscertificationexpire("Yes");
            CertificationPage.isthisarecurringcertification("Yes");
            CertificationPage.Whenistsertificationperiod("Immediately").until("1").Days();

            CertificationPage.ClickCreateCertification();
            _test.Log(Status.Info, "Click create");
            CertificatePage.addContentIntoCertificate(generalcoursetitle + "TC26335");
            CertificatePage.Click_backbutton();

            CertificatePage.addContenttoRecertification(generalcoursetitle + "TC26335_Recitify");
            CertificatePage.Click_backbutton();
            ContentDetailsPage.ClickCheckInbutton();

            CommonSection.Logout();
            LoginPage.LoginAs("srlearner103").WithPassword("").Login(); //Login as regular user (Learner)

            CommonSection.SearchCatalog('"' + CertificatrTitle + "TC26335" + '"');
            _test.Log(Status.Info, "Searched" + CertificatrTitle + "TC26335" + "from Catalog");
            SearchResultsPage.ClickCourseTitle(CertificatrTitle + "TC26335");
            _test.Log(Status.Info, "Clicked searched course title");
            ContentDetailsPage.ClickAccessItemButton_Certi();
            ContentDetailsPage.ContentItemsPortlet.ClickItemTitle(generalcoursetitle + "TC26335");
            ContentDetailsPage.ClickEnroll_CerficationGeneralCourse();
            AdminContentDetailsPage.ClickOpenNewAttemptbutton.CompleteContent_Certification();
            CertificationDetailsPage.ClickBreadCrumb();
            Assert.IsTrue(ContentDetailsPage.certificationProgress() == "100% Completed");  //AC4
            _test.Log(Status.Pass, "Verify progress display after content completed");
            Assert.IsTrue(ContentDetailsPage.IsViewCertificateButtondisplay());

            Assert.IsTrue(ContentDetailsPage.isRe_certifybuttondisplay());
            _test.Log(Status.Pass, "Verify recertify button display");
            ContentDetailsPage.Click_Recertfybutton();
            Assert.IsTrue(ContentDetailsPage.isReCertificationContentportletdisplay());
            Assert.IsTrue(ContentDetailsPage.RecertificationCriteriaPortlet.content(generalcoursetitle + "TC26335_Recitify"));
            _test.Log(Status.Pass, "Verify recertify content is display");
            ContentDetailsPage.RecertificationCriteriaPortlet.clickContentTitle(generalcoursetitle + "TC26335_Recitify");
            ContentDetailsPage.ClickEnroll_CerficationGeneralCourse();
            AdminContentDetailsPage.ClickOpenNewAttemptbutton.CompleteContent_Certification();
            CertificationDetailsPage.ClickBreadCrumb();
            Assert.IsTrue(ContentDetailsPage.certificationProgress() == "100% Completed");
            _test.Log(Status.Pass, "Verify progress display after content completed");
            Assert.IsTrue(ContentDetailsPage.IsViewCertificateButtondisplay());
            //Assert.IsTrue(ContentDetailsPage.IsViewCoreCertificateButtondisplay());
        }