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());
     }
 }
Exemple #2
0
 public static void GivenIAmOnTheUserCreationPage()
 {
     try
     {
         GenericTestStep.StepToIAmOnTheUserCreationPage();
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         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();
            }
        }
 public void GivenUserAlreadyCreatedInTheWorkspaceIfNotThenCreateTheUserInWrokspace()
 {
     try
     {
         string isUserAlreadyCreated = DatabaseTools.GetUsername(Enumerations.UserType.HedWsInstructor);
         if (isUserAlreadyCreated == null || isUserAlreadyCreated.Equals("False") || isUserAlreadyCreated.Equals(""))
         {
             //Purpose: Steps To Create Test Data
             GenericTestStep.StepToBrowsedUrlForPegasusUser("HED WS Admin");
             GenericTestStep.StepToLoggedIntoTheWorkspaceAsHedWsAdmin();
             GenericTestStep.StepToItShouldBeOnPage("Course Enrollment");
             GenericTestStep.StepToIAmOnTheUserCreationPage();
             GenericTestStep.StepTocreatetheUser();
         }
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         Assert.Fail(e.ToString());
     }
 }