public void GivenAuthoredCourseCopyIsAlreadyPublishedIfNotThenPublishTheAuthoredCourseCopy()
 {
     try
     {
         //Purpose: Steps To Create Test Data
         string isCourseAlreadyPublished = DatabaseTools.GetCoursePublishStatus(Enumerations.CourseType.MySpanishLabMasterCourse);
         if (isCourseAlreadyPublished == null || isCourseAlreadyPublished.Equals("False") || isCourseAlreadyPublished.Equals(""))
         {
             string getCopiedCourse = DatabaseTools.GetCourse(Enumerations.CourseType.MySpanishLabMasterCourse);
             if (getCopiedCourse == null)
             {
                 throw new ArgumentNullException("getCo" + "piedCourse is null");
             }
             GenericTestStep.StepToBrowsedUrlForPegasusUser("HED WS Admin");
             GenericTestStep.StepToLoggedIntoTheWorkspaceAsHedWsAdmin();
             GenericTestStep.StepToItShouldBeOnPage("Course Enrollment");
             GenericTestStep.StepToSelectTheCourse("MySpanishLab Authored Master Course");
             GenericTestStep.StepToClickOnTheCmenuOfCourse();
             GenericTestStep.StepToClickOnTheCourseCMenuOptionLink("Publish Master Course");
             GenericTestStep.StepToIShouldSeeTheNewPopup("Publishing Notes");
             GenericTestStep.StepToEnterThePublishingNotes();
             GenericTestStep.StepToClickOnThePublishButton();
             GenericTestStep.StepToItShouldDisplaySuccessfulMessage("Course published successfully.");
             DatabaseTools.UpdateCoursePublishStatusTrue(getCopiedCourse);
             GenericTestStep.StepToClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
         }
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         Assert.Fail(e.ToString());
     }
 }
 public void GivenAuthoredCourseCopyAlreadyCreatedIfNotThenCreateTheAuthoredCourseCopy()
 {
     try
     {
         string isCourseAlreadyCopied = DatabaseTools.GetCourse(Enumerations.CourseType.MySpanishLabMasterCourse);
         if (isCourseAlreadyCopied == null)
         {
             //Purpose: Steps To Create Test Data
             GenericTestStep.StepToBrowsedUrlForPegasusUser("HED WS Admin");
             GenericTestStep.StepToLoggedIntoTheWorkspaceAsHedWsAdmin();
             GenericTestStep.StepToItShouldBeOnPage("Course Enrollment");
             GenericTestStep.StepToIAmOnTheUserCreationPage();
             GenericTestStep.StepToSelectTheCourse("MySpanishLab AuthoredCourse");
             GenericTestStep.StepToClickOnTheCmenuOfCourse();
             GenericTestStep.StepToClickOnTheCourseCMenuOptionLink("Copy as Master Course");
             GenericTestStep.StepToIShouldSeeTheNewPopup("Copy as Master Course");
             GenericTestStep.StepToCopyTheCourseInSameWorkspace("Master");
             GenericTestStep.StepToItShouldDisplaySuccessfulMessage("Copied as master course.");
             GenericTestStep.StepToWaitForTheCourseOutFromAssignToCopyState();
         }
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         Assert.Fail(e.ToString());
     }
 }
Beispiel #3
0
 public static void ThenIShouldSeeTheNewPopup(string pageName)
 {
     try
     {
         GenericTestStep.StepToIShouldSeeTheNewPopup(pageName);
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         GenericTestStep.StepToClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
         throw new Exception(e.ToString());
     }
 }
        public void GivenGivenTestingCourseCopyAlreadyCreatedIfNotThenCreateTheTestingCourseCopy()
        {
            string isTestingCourseCopyAlreadyCreated = DatabaseTools.GetCourse(Enumerations.CourseType.TestingCourse);

            if (isTestingCourseCopyAlreadyCreated == null || isTestingCourseCopyAlreadyCreated.Equals("False") ||
                isTestingCourseCopyAlreadyCreated.Equals(""))
            {
                GenericTestStep.StepToBrowsedUrlForPegasusUser("HED WS Admin");
                GenericTestStep.StepToLoggedIntoTheWorkspaceAsHedWsAdmin();
                GenericTestStep.StepToIAmOnTheUserCreationPage();
                GenericTestStep.StepToSelectTheCourse("MySpanishLab AuthoredCourse");
                GenericTestStep.StepToClickOnTheCmenuOfCourse();
                GenericTestStep.StepToClickOnTheCourseCMenuOptionLink("Copy as Testing Course");
                GenericTestStep.StepToIShouldSeeTheNewPopup("Copy as Testing Course");
                GenericTestStep.StepToCopyTheCourseInSameWorkspace("Testing");
                GenericTestStep.StepToItShouldDisplaySuccessfulMessage("Copied as test course.");
                GenericTestStep.StepToWaitForTheTestingCourseOutFromAssignToCopyState();
            }
        }