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

            CommonSection.CreateLink.Certifications();
            _test.Log(Status.Info, "Click create>certification");
            CertificationPage.FillTitle(CertificatrTitle + "TC57971");
            _test.Log(Status.Info, "Fill title");
            Assert.IsTrue(CertificationPage.isShouldthecertificatebeautomaticallygranteduponcontentcompletion_lavelDisplay());    //AC1
            Assert.IsTrue(CertificationPage.automaticallygrantedcertificationDefaultValue("Yes"));                                //AC3
            Assert.IsTrue(CertificationPage.automaticallygrantedcertificationValuesare("Yes", "No, admin approval is required")); //AC2
            _test.Log(Status.Pass, "Verified is automatically granted certification lavel and default value is Yes");
            CertificationPage.ClickCreateCertification();
            _test.Log(Status.Info, "Click create");
            CertificatePage.addContentIntoCertificate(generalcoursetitle + "TC57971");
            CertificatePage.Click_backbutton();
            ContentDetailsPage.ClickCheckInbutton();

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

            CommonSection.SearchCatalog('"' + CertificatrTitle + "TC57971" + '"');
            _test.Log(Status.Info, "Searched" + CertificatrTitle + "TC57971" + "from Catalog");
            SearchResultsPage.ClickCourseTitle(CertificatrTitle + "TC57971");
            _test.Log(Status.Info, "Clicked searched course title");
            ContentDetailsPage.ClickAccessItemButton_Certi();
            ContentDetailsPage.ContentItemsPortlet.ClickItemTitle(generalcoursetitle + "TC57971");
            ContentDetailsPage.ClickEnroll_CerficationGeneralCourse();
            AdminContentDetailsPage.ClickOpenNewAttemptbutton.CompleteContent_Certification();
            CertificationDetailsPage.ClickBreadCrumb();
            Assert.IsTrue(ContentDetailsPage.certificationProgress() == "100% Completed"); //AC4
            Assert.IsTrue(ContentDetailsPage.IsViewCertificateButtondisplay());            //AC5
            //ContentDetailsPage.Click_HistoryTab_Curriculum();
            //Assert.IsTrue(ContentDetailsPage.HistoryTab.isViewCertificateButtonDisplay());  //AC6
            CommonSection.Transcript();
            TranscriptPage.ClickCertificationsTab();
            TranscriptPage.CertificationTab.sortbyDate("as");
            Assert.IsTrue(TranscriptPage.CertificationTab.isCertificationStatus(CertificatrTitle + "TC57971") == "Certified"); //AC7
        }