Пример #1
0
        public void a13_Complete_General_Course_with_surveys_16744()
        {
            CommonSection.Logout();
            LoginPage.LoginAs("").WithPassword("").Login();
            #region Survey with Required Status Yes

            CommonSection.CreateGeneralCourse(GeneralCourseTitle + "_TC16744");
            _test.Log(Status.Info, "A new Genaral Course Created");
            Assert.IsTrue(ContentDetailsPage.isSurveyAccordiandisplayed());
            _test.Log(Status.Info, "Verify Survey accordian display on RHS side");
            ContentDetailsPage.Accordians.ClickManage_Survey();
            _test.Log(Status.Info, "Click Survey Manage button");

            SurveysPage.ClickAssignSurveysnew();
            _test.Log(Status.Info, "Click on Assign Surveys Button");

            SurveysPage.AddSurveyModal.AddSurveystoContent("Before Course Start");
            _test.Log(Status.Info, "Search Survey and add one survey to content");

            SurveysPage.resultgrid.RequiredforFirstSurvey("Yes");
            _test.Log(Status.Pass, "Verify Required field is Yes");
            SurveysPage.CheckIn();
            _test.Log(Status.Pass, "Click on Check-In");
            CommonSection.Logout();
            _test.Log(Status.Pass, "Logout From SiteAdmin Account");

            LoginPage.LoginAs("srlearner101").WithPassword("").Login();
            _test.Log(Status.Info, "Login From Learner Account");
            CommonSection.SearchCatalog(GeneralCourseTitle + "_TC16744");
            _test.Log(Status.Info, "Search Created Course");
            SearchResultsPage.ClickCourseTitle(GeneralCourseTitle + "_TC16744");
            _test.Log(Status.Info, "Click Course Title");
            AdminContentDetailsPage.ClickOpenNewAttemptbutton.CompleteContent();
            _test.Log(Status.Info, "Click on Genaral Course title");

            //_test.Log(Status.Info, "Click on open item and Close the window");
            //Assert.IsTrue(Driver.comparePartialString("You must complete any associated surveys before you can obtain and view a certificate.", ContentDetailsPage.getAssociatedMessage()));
            //_test.Log(Status.Pass, "Verify Displayed Message");
            Assert.IsFalse(ContentDetailsPage.IsViewCertificateButtondisplay());
            _test.Log(Status.Pass, "Verify View Certificate Button is displayed");

            ContentDetailsPage.SurveyPortlet.ClickonattachedSurvey("Before Course Start");
            _test.Log(Status.Info, "Click Attached Survey");
            ContentDetailsPage.SurveyPortlet.CompleteSurvey("Before Course Start");
            _test.Log(Status.Info, "Complete Survey");
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isViewCertificationButtonDisplay());
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isReviewLinkDisplay());
            Assert.IsTrue(ContentDetailsPage.ContentBanner.isRetakeLinkDisplay());
            ContentDetailsPage.ContentBanner.clickViewCertificateButton();
            Assert.IsTrue(ContentDetailsPage.isCertificateDisplayed());
            _test.Log(Status.Pass, "Verify certificate Page is displayed");
            Driver.focusParentWindow();

            #endregion
        }
        public void P20_1_a13_SCORM_Banner_Actions_Survey_57926()
        {
            #region Survey with Required Status Yes
            CommonSection.Logout();
            LoginPage.LoginAs("").WithPassword("").Login();
            CommonSection.CreteNewScorm(scormtitle + "TC57926");
            _test.Log(Status.Info, "A new SCROM Course Created");
            Assert.IsTrue(ContentDetailsPage.isSurveyAccordiandisplayed());
            _test.Log(Status.Info, "Verify Survey accordian display on RHS side");
            ContentDetailsPage.Accordians.ClickManage_Survey();
            _test.Log(Status.Info, "Click Survey Manage button");

            SurveysPage.ClickAssignSurveysnew();
            _test.Log(Status.Info, "Click on Assign Surveys Button");
            Assert.IsTrue(SurveysPage.AddSurveyModal.IsSearchfieldsDisplayed());
            _test.Log(Status.Pass, "Verify Search, Result grid, Add button on Add survey Modal");
            SurveysPage.AddSurveyModal.AddSurveystoContent("Before Course Start");
            _test.Log(Status.Info, "Search Survey and add one survey to content");

            SurveysPage.CheckIn();
            _test.Log(Status.Pass, "Click on Check-In");
            #endregion

            CommonSection.Logout();
            _test.Log(Status.Pass, "Logout From SiteAdmin Account");
            LoginPage.LoginAs("srlearner103").WithPassword("").Login();
            _test.Log(Status.Info, "Login From Learner Account");
            CommonSection.SearchCatalog(scormtitle + "TC57926");
            _test.Log(Status.Info, "Search Created Course");
            SearchResultsPage.ClickCourseTitle(scormtitle + "TC57926");
            _test.Log(Status.Info, "Click Course Title");
            ContentDetailsPage.Click_Enroll();
            _test.Log(Status.Info, "Click on Enroll Button");
            //Assert.IsTrue(Driver.comparePartialString("You are now enrolled.", ContentDetailsPage.getEnrollmentSuccessMessage()));
            // _test.Log(Status.Info, "Verify Succcess Message");
            ContentDetailsPage.OpenItemScorm();
            _test.Log(Status.Info, "Click on open item ");
            Driver.Instance.selectWindow("Meridian Global");
            ContentDetailsPage.SCROM.CompleteSCROMCourse();
            _test.Log(Status.Pass, "Complete the Scrom page");
            Assert.IsFalse(ContentDetailsPage.ContentBanner.isViewCertificationButtonDisplay());
            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();
            _test.Log(Status.Info, "Complete Survey");
            Assert.True(ContentDetailsPage.IsViewCertificateButtondisplay());
            _test.Log(Status.Pass, "Verify View Certificate Button is displayed");

            TC57930_3 = true;
        }
Пример #3
0
        public void tc_55367_Require_Survey_for_getting_a_certificate_Progress_Bundle()
        {
            #region Survey with Required status Yes
            CommonSection.Logout();
            _test.Log(Status.Pass, "Logout with Site Admin Account");
            LoginPage.LoginAs("").WithPassword("").Login();
            _test.Log(Status.Info, "login with siteadmin Account");
            CommonSection.CreateGeneralCourse(generalcoursetitle + "TC55367");
            DocumentPage.ClickButton_CheckIn();

            CommonSection.CreateLink.Bundle();
            _test.Log(Status.Info, "Click create>Bundle");
            CreatebundlePage.CreateBundle("Progress Bundle", bunbdleTitle + "TC55367", "Bundle Price");
            _test.Log(Status.Info, "Create a new Content Bundle");
            BundlesPage.addContentIntoBundle(generalcoursetitle + "TC55367");
            _test.Log(Status.Info, "Adding Paid General Course into Bundle");

            Assert.IsTrue(ContentDetailsPage.isSurveyAccordiandisplayed());
            _test.Log(Status.Info, "Verify Survey accordian display on RHS side");
            ContentDetailsPage.Accordians.ClickManage_Survey();
            _test.Log(Status.Info, "Click Survey Manage button");
            Assert.IsTrue(SurveysPage.IsSurveyPageCompenetsarepresent("btn_AssignSurverbtn", "resultgrid"));
            _test.Log(Status.Info, "Verify Survey page has Assign Surveys button and result grid has no record");
            SurveysPage.ClickAssignSurveysnew();
            _test.Log(Status.Info, "Click on Assign Surveys Button");
            Assert.IsTrue(SurveysPage.AddSurveyModal.IsSearchfieldsDisplayed());
            _test.Log(Status.Pass, "Verify Search, Result grid, Add button on Add survey Modal");
            SurveysPage.AddSurveyModal.AddSurveystoContent("Before Course Start");
            _test.Log(Status.Info, "Search Survey and add one survey to content with availability as When learner enrolls");

            //SurveysPage.Click_backbutton();
            ContentDetailsPage.ClickCheckInbutton();

            _test.Log(Status.Pass, "Click on Check-In");
            CommonSection.Logout();
            _test.Log(Status.Pass, "Logout From SiteAdmin Account");
            LoginPage.LoginAs("srlearner105").WithPassword("").Login();
            _test.Log(Status.Info, "Login From Learner Account");
            CommonSection.SearchCatalog(bunbdleTitle + "TC55367");
            _test.Log(Status.Info, "Search Created Course");
            SearchResultsPage.ClickCourseTitle(bunbdleTitle + "TC55367");
            _test.Log(Status.Info, "Click Course Title");
            ContentDetailsPage.ContentBanner.Click_Startbutton();
            ContentDetailsPage.Click_OverviewTab();
            Assert.IsTrue(ContentDetailsPage.SurveyPortlet.IsSurveysAvailable("Before Course Start"));
            //  ---------------------------------------------------------

            ContentDetailsPage.Click_ContentTab();
            ContentDetailsPage.ContentTab.RequiredContent.ClickContentEnroll(generalcoursetitle + "TC55367");
            ContentDetailsPage.ContentTab.RequiredContent.ClickContentStart(generalcoursetitle + "TC55367");
            ContentDetailsPage.ContentTab.RequiredContent.CompleteBundleContent();
            Assert.IsFalse(ContentDetailsPage.ContentBanner.isViewCertificationButtonDisplay());
            _test.Log(Status.Pass, "Verify View Certificate Button is displayed");
            ContentDetailsPage.Click_OverviewTab();
            ContentDetailsPage.SurveyPortlet.ClickonattachedSurvey("Before Course Start");
            _test.Log(Status.Info, "Click Attached Survey");
            ContentDetailsPage.SurveyPortlet.CompleteSurvey("Before Course Start");
            _test.Log(Status.Info, "Complete Survey");
            ContentDetailsPage.Click_OverviewTab();
            Assert.True(ContentDetailsPage.ContentBanner.isViewCertificationButtonDisplay());
            _test.Log(Status.Pass, "Verify View Certificate Button is displayed");
            ContentDetailsPage.ContentBanner.clickViewCertificateButton();
            _test.Log(Status.Pass, "Click View Certificate");
            Assert.IsTrue(ContentDetailsPage.isCertificateDisplayed());
            _test.Log(Status.Pass, "Verify certificate Page is displayed");
            Driver.focusParentWindow();
            #endregion

            #region Survey with Required status NO
            CommonSection.Logout();
            LoginPage.LoginAs("").WithPassword("").Login();
            _test.Log(Status.Info, "Login with site admin Account");

            CommonSection.CreateGeneralCourse(generalcoursetitle + "TC55367_1");
            DocumentPage.ClickButton_CheckIn();

            CommonSection.CreateLink.Bundle();
            _test.Log(Status.Info, "Click create>Bundle");
            CreatebundlePage.CreateBundle("Progress Bundle", bunbdleTitle + "TC55367_1", "Bundle Price");
            _test.Log(Status.Info, "Create a new Content Bundle");
            BundlesPage.addContentIntoBundle(generalcoursetitle + "TC55367_1");
            _test.Log(Status.Info, "Adding Paid General Course into Bundle");

            Assert.IsTrue(ContentDetailsPage.isSurveyAccordiandisplayed());
            _test.Log(Status.Info, "Verify Survey accordian display on RHS side");
            ContentDetailsPage.Accordians.ClickManage_Survey();
            _test.Log(Status.Info, "Click Survey Manage button");
            Assert.IsTrue(SurveysPage.IsSurveyPageCompenetsarepresent("btn_AssignSurverbtn", "resultgrid"));
            _test.Log(Status.Info, "Verify Survey page has Assign Surveys button and result grid has no record");
            SurveysPage.ClickAssignSurveysnew();
            _test.Log(Status.Info, "Click on Assign Surveys Button");
            Assert.IsTrue(SurveysPage.AddSurveyModal.IsSearchfieldsDisplayed());
            _test.Log(Status.Pass, "Verify Search, Result grid, Add button on Add survey Modal");
            SurveysPage.AddSurveyModal.AddSurveystoContent("Before Course Start");
            _test.Log(Status.Info, "Search Survey and add one survey to content");
            // AddedsurveyTitle = SurveysPage.AddedSurveysTtile();
            _test.Log(Status.Pass, "Verify Survey Added to Content");
            SurveysPage.resultgrid.RequiredforFirstSurvey("No");
            _test.Log(Status.Pass, "Verify Required field is Yes");
            SurveysPage.CheckIn();
            _test.Log(Status.Pass, "Click on Check-In");

            CommonSection.Logout();
            _test.Log(Status.Pass, "Logout From SiteAdmin Account");
            LoginPage.LoginAs("srlearner105").WithPassword("").Login();
            _test.Log(Status.Info, "Login From Learner Account");
            CommonSection.SearchCatalog(bunbdleTitle + "TC55367_1");
            _test.Log(Status.Info, "Search Created Course");
            SearchResultsPage.ClickCourseTitle(bunbdleTitle + "TC55367_1");
            _test.Log(Status.Info, "Click Course Title");
            ContentDetailsPage.ContentBanner.Click_Startbutton();
            ContentDetailsPage.Click_OverviewTab();
            Assert.IsTrue(ContentDetailsPage.SurveyPortlet.IsSurveysAvailable("Before Course Start"));
            _test.Log(Status.Pass, "Verify Survey is Displayed");
            ContentDetailsPage.Click_ContentTab();
            ContentDetailsPage.ContentTab.RequiredContent.ClickContentEnroll(generalcoursetitle + "_TC55367");
            ContentDetailsPage.ContentTab.RequiredContent.ClickContentStart(generalcoursetitle + "_TC55367");
            ContentDetailsPage.ContentTab.RequiredContent.CompleteBundleContent();
            _test.Log(Status.Info, "Click on Open Item");
            ContentDetailsPage.Click_OverviewTab();
            Assert.IsTrue(ContentDetailsPage.SurveyPortlet.IsSurveysAvailable("Before Course Start"));
            _test.Log(Status.Info, "Verify Survey is Displayed");

            Assert.IsTrue(ContentDetailsPage.ContentBanner.isViewCertificationButtonDisplay());
            _test.Log(Status.Pass, "Verify View Certificate Button is displayed");
            //ContentDetailsPage.ClickViewCertificate();
            //_test.Log(Status.Pass, "Click View Certificate");
            //Assert.IsTrue(ContentDetailsPage.isCertificateDisplayed());
            //_test.Log(Status.Pass, "Verify certificate Page is displayed");
            //Driver.focusParentWindow();

            #endregion
        }