Esempio n. 1
0
 public void Create_SCROM_Course_7251()
 {
     CommonSection.CreateLink.SCORM();
     _test.Log(Status.Info, "open scorm page");
     CreatePage.ClickBrowsebutton();
     _test.Log(Status.Info, "browse the content and click create button");
     //  //  CreatePage.UploadScormfile("\\fileserver\\maindrive\\product_team\\SCORM\\SCORM_1_2\\maritime_navigation_exam_only.zip");
     //  CreatePage.ClickCreatebutton();
     Assert.IsTrue(SummaryPage.Title == "Summary", "Expected = Summary, but actual was " + SummaryPage.Title);
     StringAssert.AreEqualIgnoringCase("The course was created.", SummaryPage.GetSuccessMessage(), "Error message is different");
     SummaryPage.UpdateTitle("Maritime Navigation - Exam only for Migration Test");
     //   SummaryPage.ClickSavebutton();
     StringAssert.AreEqualIgnoringCase("The changes were saved.", ContentDetailsPage.GetSuccessMessage(), "Error message is different");
     ContentDetailsPage.ClickCheckInbutton();
     _test.Log(Status.Info, "Checkin scorm course");
 }
        public void Upload_Launch_Course()
        {
            CommonSection.CreateLink.SCORM();
            _test.Log(Status.Info, "open scorm page");
            CreatePage.ClickBrowsebutton();
            _test.Log(Status.Info, "browse the content and click create button");
            //  //  CreatePage.UploadScormfile("\\fileserver\\maindrive\\product_team\\SCORM\\SCORM_1_2\\maritime_navigation_exam_only.zip");
            //  CreatePage.ClickCreatebutton();
            Assert.IsTrue(SummaryPage.Title == "Summary", "Expected = Summary, but actual was " + SummaryPage.Title);
            StringAssert.AreEqualIgnoringCase("The course was created.", SummaryPage.GetSuccessMessage(), "Error message is different");
            SummaryPage.UpdateTitle("Maritime Navigation - Exam only for Migration Test");
            //   SummaryPage.ClickSavebutton();
            StringAssert.AreEqualIgnoringCase("The changes were saved.", ContentDetailsPage.GetSuccessMessage(), "Error message is different");
            ContentDetailsPage.ClickCheckInbutton();
            _test.Log(Status.Info, "Checkin scorm course");
            CommonSection.CatalogSearchText("Maritime Navigation - Exam only for Migration Test");
            _test.Log(Status.Info, "search migration");
            Assert.IsTrue(SearchResultsPage.CheckSearchRecord("Maritime Navigation - Exam only for Migration Test") >= 1);
            SearchResultsPage.ClickCourseTitle("Maritime Navigation - Exam only for Migration Test");
            _test.Log(Status.Info, "opens searched content link");
            Assert.IsTrue(ContentDetailsPage.CheckCourseTitle("Maritime Navigation - Exam only for Migration Test"));
            ContentDetailsPage.ClickOpenItembutton();
            _test.Log(Status.Info, "Enrols and open the scorm course");
            Assert.IsTrue(CourseLaunchModalPage.Exist("Maritime Navigation - Exam only for Migration Test"));
            // CourseLaunchModalPage.ClickBrowserX();
            Assert.IsTrue(ContentDetailsPage.CheckResumeButton());

            CommonSection.Manage.Training();
            _test.Log(Status.Info, "open training page");
            TrainingPage.ManageContentPortlet.SearchForContent("Migration");
            _test.Log(Status.Info, "search for content migration");
            Assert.IsTrue(SearchResultsPage.CheckSearchRecord("Migration") >= 1);
            SearchResultsPage.ClickCourseTitle("Maritime Navigation - Exam only for Migration Test");
            _test.Log(Status.Info, "click the searjced title link");
            ContentDetailsPage.Summary.ClickViewButton();                                             //need towrite the code
            _test.Log(Status.Info, "CLick view button");
            Assert.IsTrue(SummaryPage.Title == "Maritime Navigation - Exam only for Migration Test"); //need towrite the code
            Assert.IsTrue(ContentDetailsPage.CheckCourseTitleOnClickingEditButton("Maritime Navigation - Exam only for Migration Test"));
            ContentDetailsPage.DeleteContent();
            _test.Log(Status.Info, "deleting the content");
            //  StringAssert.StartsWith("Success", ContentDetailsPage.GetRemovalSuccessMessage(), "Error message is different");
            CommonSection.Manage.Training();
            _test.Log(Status.Info, "open training page");
            TrainingPage.ManageContentPortlet.SearchForContent("Migration");
            _test.Log(Status.Info, "search for content migration");
            Assert.IsTrue(SearchResultsPage.CheckSearchRecord("Migration") == 0);
        }