public void tc_60489_Public_catalog_banner_actions_for_Test()
        {
            ContentDetailsPage.clickReturningUserLogin();
            LoginPage.LoginAs("").WithPassword("").Login();
            CommonSection.Administer.ContentManagement.Tests();
            TestsPage.ClickCreateNew();
            TestwizardPage.CreateNewTest(TestTitle + "_TC60489");
            _test.Log(Status.Info, "A New test created");
            TestwizardPage.addPrerequisitetotest();
            TestwizardPage.UploadImagetoTest();
            TestwizardPage.PublishtoPublishcatalog();
            TestwizardPage.checkin();

            CommonSection.Logout();
            LoginPage.ClickBrowsePublicCatalogLink();
            CommonSection.SearchCatalog(TestTitle + "_TC60489");
            SearchResultsPage.ClickCourseTitle(TestTitle + "_TC60489");
            Assert.IsTrue(ContentDetailsPage.isBradCrumbdisplay());
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isContentTitledisplay(TestTitle + "_TC60489"));
            _test.Log(Status.Pass, "Verify Content title is display on Banner");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isContentTypedisplay());
            _test.Log(Status.Pass, "Verify Content type is display on Banner");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isContentImagedisplay());
            _test.Log(Status.Pass, "Verify Image is display on Banner");
            Assert.IsTrue(ContentDetailsPage.OverviewTab.isPrerequisitePortletDisplay());
        }
        public void P20_1_tc_26290_Reviews_and_ratings_the_Tests()
        {
            CommonSection.Logout();
            LoginPage.LoginAs("").WithPassword("").Login();
            CommonSection.Administer.ContentManagement.Tests();
            TestsPage.ClickCreateNew();
            TestwizardPage.CreateNewTest(TestTitle + "_TC26290");
            _test.Log(Status.Info, "A New test created");
            TestwizardPage.checkin();

            CommonSection.Logout();
            LoginPage.LoginAs("srlearner103").WithPassword("password").Login();
            CommonSection.SearchCatalog(TestTitle + "_TC26290");
            SearchResultsPage.ClickCourseTitle(TestTitle + "_TC26290");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isOpenItembuttonDisplay_GeneralCourse());
            ContentDetailsPage.Click_ReviewTab_GeneralCourse();
            Assert.IsFalse(ContentDetailsPage.GeneralCourse_ReviewsTab.isWriteaReviewButtondisplay());
            ContentDetailsPage.ContentBanner.ClickOpenItembutton();
            //ContentDetailsPage.CompleteTest();
            ContentDetailsPage.ContentBanner.CloseOpenedTestwindow();

            ContentDetailsPage.Click_ReviewTab_GeneralCourse();
            Assert.IsTrue(ContentDetailsPage.GeneralCourse_ReviewsTab.isWriteaReviewButtondisplay());
            ContentDetailsPage.GeneralCourse_ReviewsTab.WriteaReview("Title", "For Testing");
            Assert.IsTrue(ContentDetailsPage.GeneralCourse_ReviewsTab.isReviewlistUpdated("Title"));
            _test.Log(Status.Pass, "User submited review");


            Assert.IsTrue(ContentDetailsPage.GeneralCourse_ReviewsTab.isEditReviewlinkdisplay());
            _test.Log(Status.Pass, "Verify user can edit his own review in content edit mode");
            ContentDetailsPage.GeneralCourse_ReviewsTab.DeleteReview();
            Assert.IsTrue(ContentDetailsPage.GeneralCourse_ReviewsTab.isWriteaReviewButtondisplay());
            _test.Log(Status.Pass, "Verify review deleted and Write a Review button display");
            TC60280 = true;
        }
        public void tc_60287_Tests_Banner_Actions_View_History_for_requesting_access()
        {
            CommonSection.Administer.ContentManagement.Tests();
            TestsPage.ClickCreateNew();
            TestwizardPage.CreateNewTest(TestTitle);
            _test.Log(Status.Info, "A New test created");
            TestwizardPage.setApprovalPath();
            TestwizardPage.checkin();
            CommonSection.SearchCatalog(TestTitle);
            SearchResultsPage.ClickCourseTitle(TestTitle);
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isRequestAccessbuttondisplay());
            _test.Log(Status.Pass, "Verify is Request Access button display on Banner");
            ContentDetailsPage.AccessApprovalModal.SubmitRequestAccess("ForTest");
            _test.Log(Status.Info, "Submit Request Access");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isCancleRequestbuttonDisplay());
            _test.Log(Status.Pass, "Verify is Cancle Request Access button display");
            ContentDetailsPage.ContentBanner.ClickViewRequestHistory();
            Assert.IsTrue(ContentDetailsPage.isHistorywindowopened());

            Assert.IsTrue(ContentDetailsPage.Historywin.isfieldsdisplay(TestTitle, "Content type", "status"));
            Driver.Instance.SelectWindowClose2("History", Meridian_Common.parentwdw);
            ContentDetailsPage.AccessApprovalModal.SubmitCancelRequestAccess("ForTest");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isRequestAccessbuttondisplay());
            _test.Log(Status.Info, "Verify Cancel Request access wotk flow");
            TC26286 = true;
            TC26287 = true;
        }
        public void P20_1_tc_26288_Add_Test_to_Cart()
        {
            CommonSection.Administer.ContentManagement.Tests();
            TestsPage.ClickCreateNew();
            TestwizardPage.CreateNewTest(TestTitle + "_TC26288");
            _test.Log(Status.Info, "A New test created");
            TestwizardPage.addCosttoTest("5");
            _test.Log(Status.Info, "Upload any Image file to content");
            TestwizardPage.checkin();
            CommonSection.Logout();
            LoginPage.LoginAs("srlearner103").WithPassword("").Login();
            CommonSection.SearchCatalog(TestTitle + "_TC26288");
            SearchResultsPage.ClickCourseTitle(TestTitle + "_TC26288");
            Assert.IsTrue(ContentDetailsPage.OverviewTab.isAddtoCartbuttondisplay());
            _test.Log(Status.Pass, "Verify Add to Cart button display");
            ContentDetailsPage.OverviewTab.click_AddtoCart();
            Assert.IsTrue(ContentDetailsPage.OverviewTab.AddtoCartportlet.isTestAddedtoCart());
            CommonSection.ClickShoppingCart();

            ShoppingCartPage.CompletePurchaseProcess();
            OrderPage.Click_Purchased_Content(TestTitle + "_TC26288");
            Assert.IsTrue(ContentDetailsPage.OverviewTab.Costportlet.isViewOrderlinkDisplay());
            _test.Log(Status.Pass, "Verify view order link display on Add to Cart portlet");
            ContentDetailsPage.OverviewTab.Costportlet.ClickViewOrderlink();

            Assert.IsTrue(OrderDetailsPage.VerifyPurchasedContent(TestTitle + "_TC26288"));
            TC26378 = true;
        }
        public void P20_1_tc_27131_View_RT_Assignments_for_Test()
        {
            CommonSection.Logout();
            LoginPage.LoginAs("").WithPassword("").Login();
            CommonSection.Administer.ContentManagement.Tests();
            TestsPage.ClickCreateNew();
            TestwizardPage.CreateNewTest(TestTitle + "_TC27131");
            _test.Log(Status.Info, "A New test created");
            TestwizardPage.checkin();

            #region cretate TA
            CommonSection.Manage.Training();
            _test.Log(Status.Info, "Navigate to Manage >> Training Page");
            TrainingPage.TrainingAssignments.Click_CreateTrainingAssignment();
            _test.Log(Status.Info, "Click Create Training Assignment link from training assignment portlet");
            CreateTrainingAssignmentPage.Create(TATitle + "TC27131");
            _test.Log(Status.Info, "A new training assignement created as draft");
            CreateTrainingAssignmentPage.ContentTab.ClickAddContent();
            _test.Log(Status.Info, "Click Add Content");
            CreateTrainingAssignmentPage.ContentTab.AddContentModal.AddContent(TestTitle + "_TC27131");
            _test.Log(Status.Info, "Content added to training assignment");
            CreateTrainingAssignmentPage.AssignessTab.ClickAddAssignees();
            _test.Log(Status.Info, "Click Add Assignees button in Assignees tab");
            CreateTrainingAssignmentPage.AssignessTab.AddAssignessModal.AddAssigne("learner 101");
            _test.Log(Status.Info, "A user added to training assignment");
            CreateTrainingAssignmentPage.DueDateTab.ClickChage();
            _test.Log(Status.Info, "Click Chage button in Due Date tab");
            string previousCompletions = CreateTrainingAssignmentPage.DueDateTab.AssignmentDueDateModal.SetPreviousCompletionsYesandRecurringNo("days");
            _test.Log(Status.Info, "Set Previous Completions count and save for Non recurring assignement");
            CreateTrainingAssignmentPage.ClickDueDateTab();
            _test.Log(Status.Info, "Click Chage button in Due Date tab");
            Assert.IsTrue(CreateTrainingAssignmentPage.DueDateTab.VerifyPreviousComplistion(previousCompletions));
            _test.Log(Status.Pass, "Verify Copletion count saved properly");
            CreateTrainingAssignmentPage.clickAssignButton();
            #endregion

            CommonSection.Logout();
            LoginPage.LoginAs("srlearner101").WithPassword("").Login();

            CommonSection.SearchCatalog(TestTitle + "_TC27131");
            SearchResultsPage.ClickCourseTitle(TestTitle + "_TC27131");

            ContentDetailsPage.Click_OverviewTab();
            Assert.IsTrue(ContentDetailsPage.OverviewTab.isTrainingAssignmentportletDisplay());
            Assert.IsTrue(ContentDetailsPage.OverviewTab.TrainingAssignment.isDuedatedisplay());
            TC25153 = true;
        }
 public void tc_60082_Test_Overview_Tab_What_is_the_content_about()
 {
     CommonSection.Logout();
     LoginPage.LoginAs("").WithPassword("").Login();
     CommonSection.Administer.ContentManagement.Tests();
     TestsPage.ClickCreateNew();
     TestwizardPage.CreateNewTest(TestTitle + "_TC60082");
     _test.Log(Status.Info, "A New test created");
     TestwizardPage.addCosttoTest("5");
     TestwizardPage.checkin();
     CommonSection.SearchCatalog(TestTitle + "_TC60082");
     SearchResultsPage.ClickCourseTitle(TestTitle + "_TC60082");
     Assert.IsTrue(ContentDetailsPage.OverviewTab.DescriptionPortletTitle("Description"));
     Assert.IsTrue(ContentDetailsPage.OverviewTab.isMasteryScoredisplay());
     Assert.IsTrue(ContentDetailsPage.OverviewTab.isMaxAttempsdisplay());
     Assert.IsTrue(ContentDetailsPage.OverviewTab.isNumberidQuestiondisplay());
     _test.Log(Status.Pass, "Verify of Attempts, Mastery Score, Maximum time Allowed options are display");
 }
        public void tc_60285_Test_Banner_Actions_Course_Info_and_Navigation()
        {
            CommonSection.Administer.ContentManagement.Tests();
            TestsPage.ClickCreateNew();
            TestwizardPage.CreateNewTest(TestTitle + "_TC60285");
            _test.Log(Status.Info, "A New test created");
            TestwizardPage.UploadImagetoTest();
            _test.Log(Status.Info, "Upload any Image file to content");
            TestwizardPage.checkin();

            CommonSection.SearchCatalog(TestTitle + "_TC60285");
            SearchResultsPage.ClickCourseTitle(TestTitle + "_TC60285");
            Assert.IsTrue(ContentDetailsPage.isBradCrumbdisplay());
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isContentTitledisplay(TestTitle + "_TC60285"));
            _test.Log(Status.Pass, "Verify Content title is display on Banner");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isContentTypedisplay());
            _test.Log(Status.Pass, "Verify Content type is display on Banner");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isContentImagedisplay());
            _test.Log(Status.Pass, "Verify Image is display on Banner");
        }
        public void P20_1_tc_26864_Rate_Test_Transcript()
        {
            CommonSection.Logout();
            LoginPage.LoginAs("").WithPassword("").Login();
            CommonSection.Administer.ContentManagement.Tests();
            TestsPage.ClickCreateNew();
            TestwizardPage.CreateNewTest(TestTitle + "_TC26864");
            _test.Log(Status.Info, "A New test created");

            TestwizardPage.checkin();

            CommonSection.Logout();
            Driver.CreateNewAccount();
            _test.Log(Status.Info, "Create new user account");
            LoginPage.LoginAs(Meridian_Common.NewUserId).WithPassword("").Login();
            _test.Log(Status.Info, "Login as Learner");
            CommonSection.SearchCatalog(TestTitle + "_TC26864");
            SearchResultsPage.ClickCourseTitle(TestTitle + "_TC26864");
            ContentDetailsPage.Click_ReviewTab_GeneralCourse();
            Assert.IsFalse(ContentDetailsPage.GeneralCourse_ReviewsTab.isWriteaReviewButtondisplay());
            ContentDetailsPage.ContentBanner.ClickTakeTest();
            ContentDetailsPage.CompleteTest(TestTitle + "_TC26864");

            Assert.True(ContentDetailsPage.ContentBanner.isViewCertificationButtonDisplay());
            _test.Log(Status.Pass, "Verify View Certificate Button is displayed");
            ContentDetailsPage.Click_ReviewTab_GeneralCourse();
            Assert.IsTrue(ContentDetailsPage.GeneralCourse_ReviewsTab.isWriteaReviewButtondisplay());
            _test.Log(Status.Pass, "Verify Write a Review Button is display");
            CommonSection.Learn.Transcript();
            TranscriptPage.AllTrainingTab.FilterandClickTesttitle(TestTitle + "_TC26864");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isContentTitledisplay(TestTitle + "_TC26864"));
            ContentDetailsPage.Click_ReviewTab_GeneralCourse();
            Assert.IsTrue(ContentDetailsPage.GeneralCourse_ReviewsTab.isWriteaReviewButtondisplay());
            ContentDetailsPage.GeneralCourse_ReviewsTab.WriteaReview("Title", "For Testing");
            Assert.IsTrue(ContentDetailsPage.GeneralCourse_ReviewsTab.isReviewlistUpdated("Title"));
            _test.Log(Status.Pass, "User submited review");


            Assert.IsTrue(ContentDetailsPage.GeneralCourse_ReviewsTab.isEditReviewlinkdisplay());
            _test.Log(Status.Pass, "Verify user can edit his own review in content edit mode");
        }
        public void P20_1_tc_26973_View_Prerequisities_to_Test()
        {
            CommonSection.CreateGeneralCourse(GeneralCourseTitle + "TC26973");
            DocumentPage.ClickButton_CheckIn();
            CommonSection.Administer.ContentManagement.Tests();
            TestsPage.ClickCreateNew();
            TestwizardPage.CreateNewTest(TestTitle + "_tc26973");
            _test.Log(Status.Info, "A New test created");
            TestwizardPage.addPrerequisitetotest(GeneralCourseTitle + "TC26973");
            TestwizardPage.checkin();

            CommonSection.Logout();
            LoginPage.LoginAs("srlearner105").WithPassword("").Login();
            CommonSection.SearchCatalog(TestTitle + "_tc26973");
            SearchResultsPage.ClickCourseTitle(TestTitle + "_tc26973");

            Assert.IsTrue(ContentDetailsPage.OverviewTab.isPrerequisitePortletDisplay());
            _test.Log(Status.Pass, "Verify prerequisite Accordian is Displayed");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isPrereqisiteRequiredmessageDisplay("Complete 1 prerequisites to continue"));
            _test.Log(Status.Pass, "Verify  information");
            tc25132 = true;
        }
        public void P20_1_tc_60090_Take_Tests_Related_Surveys()
        {
            CommonSection.Logout();
            LoginPage.LoginAs("").WithPassword("").Login();
            CommonSection.Administer.ContentManagement.Tests();
            TestsPage.ClickCreateNew();
            TestwizardPage.CreateNewTest(TestTitle + "_TC60090");
            _test.Log(Status.Info, "A New test created");

            TestwizardPage.checkin();
            CommonSection.Administer.ContentManagement.Tests();
            TestsPage.searchtest(TestTitle + "_TC60090");
            TestsPage.clickOnTestTitle(TestTitle + "_TC60090");
            TestwizardPage.AddSurvettoTest("Before Course Start", TestTitle + "_TC60090");

            CommonSection.SearchCatalog(TestTitle + "_TC60090");
            SearchResultsPage.ClickCourseTitle(TestTitle + "_TC60090");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isTakeTestButtonDisplay());
            Assert.IsTrue(ContentDetailsPage.OverviewTab.issurveyPortletisDisplay());
            ContentDetailsPage.ContentBanner.ClickTakeTest();
            ContentDetailsPage.CompleteTest(TestTitle + "_TC60090");

            Assert.IsTrue(ContentDetailsPage.ContentBanner.RequiredSurveymessage("Complete 1 survey(s) to receive your certificate."));
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isTakeSurveyButtonDisplay());
            ContentDetailsPage.ContentBanner.Click_TakeSurveybutton();

            ContentDetailsPage.SurveyPortlet.CompleteSurvey("Before Course Start");
            //_test.Log(Status.Info, "Complete Survey");
            _test.Log(Status.Info, "Complete Survey");
            Assert.True(ContentDetailsPage.ContentBanner.isViewCertificationButtonDisplay());
            _test.Log(Status.Pass, "Verify View Certificate Button is displayed");
            TC25152 = true;
            ContentDetailsPage.ContentBanner.clickViewCertificateButton();
            Assert.IsTrue(ContentDetailsPage.isCertificateDisplayed());
            _test.Log(Status.Pass, "Verify certificate Page is displayed");
            Driver.focusParentWindow();
            TC26291 = true;
        }