Exemplo n.º 1
0
 public void P20_1_A05_Learner_View_Content_Tab_of_Curriculum_35589()
 {
     #region Create a Curriculum and Add Content Into it
     CommonSection.CreteNewCurriculumn(curriculamtitle + "_TC35589");
     _test.Log(Status.Info, "Create A new Curriculum");
     ContentDetailsPage.ClickCurriculumContentEditButton();
     CurriculumContentPage.ClickAddCurriculumBlock();
     CurriculumContentPage.AddCurriculumBlock.AddMultiple_TypeBlocks(block);
     CurriculumContentPage.AddTrainingActivities_UnOrdered("");
     CurriculumContentPage.AddTrainingActivities_Ordered();
     CurriculumContentPage.AddTrainingActivities_Credit();
     CurriculumContentPage.AddTrainingActivities_Optional();
     #endregion
     CommonSection.SearchCatalog(curriculamtitle + "_TC35589");
     _test.Log(Status.Info, "Enter curriculum title in global search box");
     SearchResultsPage.ClickCourseTitle(curriculamtitle + "_TC35589");
     _test.Log(Status.Info, "Click on search result from catalog");
     Assert.IsFalse(Driver.existsElement(By.XPath("//a[@href='#contentTab']")));
     _test.Log(Status.Info, "Assertion Pass as Content Tab Not displaying when content under revison");
     ContentDetailsPage.ClickEditContent_New19_2();
     DocumentPage.ClickButton_CheckIn();
     CommonSection.SearchCatalog(curriculamtitle + "_TC35589");
     _test.Log(Status.Info, "Enter curriculum title in global search box");
     SearchResultsPage.ClickCourseTitle(curriculamtitle + "_TC35589");
     _test.Log(Status.Info, "Click on search result from catalog");
     ContentDetailsPage.Click_ContentTab();
     Assert.IsTrue(ContentDetailsPage.VerifyCurriculum_ContentTab(block + "_UnOrdered", block + "_Ordered", block + "_Credit", block + "_Optional", curriculamtitle + "TCID1"));
 }
        public void tc_35907_Curriculum__Learner_views_progress_towards_completeing_curriculum_for_each_block_type()
        {
            #region create 4 general course
            CommonSection.CreateGeneralCourse(generalcoursetitle + "TC35907_od_1");
            _test.Log(Status.Info, "Create general Course");
            DocumentPage.ClickButton_CheckIn();
            CommonSection.CreateGeneralCourse(generalcoursetitle + "TC35907_od_2");
            _test.Log(Status.Info, "Create general Course");
            DocumentPage.ClickButton_CheckIn();
            CommonSection.CreateGeneralCourse(generalcoursetitle + "TC35907_Uod_1");
            _test.Log(Status.Info, "Create general Course");
            DocumentPage.ClickButton_CheckIn();
            CommonSection.CreateGeneralCourse(generalcoursetitle + "TC35907_Uod_2");
            _test.Log(Status.Info, "Create general Course");
            DocumentPage.ClickButton_CheckIn();
            #endregion

            CommonSection.CreteNewCurriculumn(curriculamtitle + "TC35907");
            _test.Log(Status.Info, "Create Curriculum");
            ContentDetailsPage.ClickCurriculumContentEditButton();
            _test.Log(Status.Info, "Click Edit Content for Curriculum");
            ContentDetailsPage.ClickAddCurriculumBlock();
            _test.Log(Status.Info, "Click Curriculum content Block");
            CurriculumContentPage.AddCurriculumBlock.AddBlockAs("UnOrdered");
            _test.Log(Status.Info, "Add Curriculum UnOrdered Block");
            CurriculumContentPage.AddTrainingActivities_UnOrdered(generalcoursetitle + "TC35907_Uod_1");
            _test.Log(Status.Info, "Add training Activities");
            CurriculumContentPage.AddTrainingActivities_UnOrdered(generalcoursetitle + "TC35907_Uod_2");
            _test.Log(Status.Info, "Add training Activities");

            ContentDetailsPage.ClickAddCurriculumBlock();
            _test.Log(Status.Info, "Click Curriculum content Block");
            CurriculumContentPage.AddCurriculumBlock.AddBlockAs_OrderedType("Ordered");
            _test.Log(Status.Info, "Add Curriculum Ordered Block");
            CurriculumContentPage.AddTrainingActivities_Ordered(generalcoursetitle + "TC35907_od_1");
            _test.Log(Status.Info, "Add training Activities");
            CurriculumContentPage.AddTrainingActivities_Ordered(generalcoursetitle + "TC35907_od_2");
            _test.Log(Status.Info, "Add training Activities");
            AdminContentDetailsPage.ClickCheckInbutton();
            _test.Log(Status.Info, "Click Check In button");

            CommonSection.Logout();
            LoginPage.LoginAs("srlearner103").WithPassword("").Login();
            CommonSection.SearchCatalog(curriculamtitle + "TC35907");
            SearchResultsPage.ClickCourseTitle(curriculamtitle + "TC35907");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isContentTitledisplay(curriculamtitle + "TC35907"));
            _test.Log(Status.Pass, "Verify Content details page is opend");
            ContentDetailsPage.ClickCurriculumnEnroll();
            Assert.IsTrue(ContentDetailsPage.ContentBanner.ContentProgress() == "0%");
            _test.Log(Status.Pass, "Verify Curriculum progress is 0%");
            Assert.IsTrue(ContentDetailsPage.ContentTab.CurriculumUnOrderedBlock.BannerCompletionText("Complete 2 in any order"));
            ContentDetailsPage.CurriculumContentTab.ClickStartGeneralCourse(generalcoursetitle + "TC35907_Uod_1");
            _test.Log(Status.Info, "Launch first General Course");
            ContentDetailsPage.CompleteCurriculumnContent();
            Assert.IsTrue(ContentDetailsPage.ContentTab.CurriculumUnOrderedBlock.BannerCompletionContentCount("1 / 2"));
            Assert.IsTrue(ContentDetailsPage.ContentBanner.ContentProgress() == "25%");
            _test.Log(Status.Pass, "Verify Curriculum progress is 25%");

            Assert.IsTrue(ContentDetailsPage.ContentTab.CurriculumOrderedBlock.BannerCompletionText("Complete 2 in any order"));
            ContentDetailsPage.CurriculumContentTab.ClickStartGeneralCourse(generalcoursetitle + "TC35907_od_1");
            _test.Log(Status.Info, "Launch first General Course");
            ContentDetailsPage.CompleteCurriculumnContent();
            Assert.IsTrue(ContentDetailsPage.ContentTab.CurriculumOrderedBlock.BannerCompletionContentCount("1 / 2"));
            Assert.IsTrue(ContentDetailsPage.ContentBanner.ContentProgress() == "50%");
            _test.Log(Status.Pass, "Verify Curriculum progress is 50%");
        }