Esempio n. 1
0
        public void a02_Learner_experience_certification_where_admit_set_certificate_be_automatically_granted_upon_content_completion_is_No_57970()
        {
            CommonSection.Logout();
            LoginPage.LoginAs("").WithPassword("").Login();
            CommonSection.CreateLink.GeneralCourse();
            _test.Log(Status.Info, "Creating a Paid General Course");
            GeneralCoursePage.CreateGeneralCourse(generalcoursetitle + "TC57970", "Test General Course");
            DocumentPage.ClickButton_CheckIn();

            CommonSection.CreateLink.Certifications();
            _test.Log(Status.Info, "Click create>certification");
            CertificationPage.FillTitle(CertificatrTitle + "TC57970");
            _test.Log(Status.Info, "Fill title");
            Assert.IsTrue(CertificationPage.isShouldthecertificatebeautomaticallygranteduponcontentcompletion_lavelDisplay()); //AC1
            Assert.IsTrue(CertificationPage.automaticallygrantedcertificationDefaultValue("Yes"));                             //AC3
            CertificationPage.SelectautomaticallygrantedcertificationDefaultValue("No");


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

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

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