public void GivenAutohoredCourseIsAlreayApprovedInTheCourseSpaceIfNotThenApproveTheAuthoredCourseInCourseSpace()
 {
     try
     {
         //Purpose: Steps To Create Test Data
         string isCourseAlreadyApproved = DatabaseTools.GetCourseApproveStatus(Enumerations.CourseType.MySpanishLabMasterCourse);
         if (isCourseAlreadyApproved == null || isCourseAlreadyApproved.Equals("False") || isCourseAlreadyApproved.Equals(""))
         {
             string getCopiedCourse = DatabaseTools.GetCourse(Enumerations.CourseType.MySpanishLabMasterCourse);
             GenericTestStep.StepToBrowsedUrlForPegasusUser("HED CS Admin");
             GenericTestStep.StepToLoggedIntoTheCourseSpaceAsHedCSAdmin();
             GenericTestStep.StepToItShouldBeOnPage("Course Enrollment");
             GenericTestStep.StepToNavigateToTheTab("Publishing");
             GenericTestStep.StepToSwitchToTheTab("Manage Products");
             GenericTestStep.StepToItShouldShowTheManageProductsPage();
             GenericTestStep.StepToSelectTheCourseToApprove("MySpanishLab Master Course");
             GenericTestStep.StepToClickedOnTheApproveCourseLink("Approve");
             GenericTestStep.StepToItShouldDisplaySuccessfulMessage("Published course marked as Approved.");
             DatabaseTools.UpdateCourseApproveStatusTrue(getCopiedCourse);
         }
     }
     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());
     }
 }
 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 GivenCourseAssociationToProgramTypeProductIsAlreadyCreatedIfNotThenCreateAssociation()
 {
     try
     {
         string productName = DatabaseTools.GetProduct(Enumerations.ProductInstance.HedCoreProgram);
         string isMasterCourseAlreadyAssociatedToProduct = DatabaseTools.GetProductMaterCourseAssociatedStatus(productName);
         if (isMasterCourseAlreadyAssociatedToProduct == null || isMasterCourseAlreadyAssociatedToProduct.Equals("False") || isMasterCourseAlreadyAssociatedToProduct.Equals(""))
         {
             GenericTestStep.StepToBrowsedUrlForPegasusUser("HED CS Admin");
             GenericTestStep.StepToLoggedIntoTheCourseSpaceAsHedCSAdmin();
             GenericTestStep.StepToItShouldShowTheManageProductsPage();
             GenericTestStep.StepToSelectCourseInManageProductsPage("MySpanishLab Master Course");
             GenericTestStep.StepToSelectTheProductInTheRightFrame("HedCoreProgram");
             GenericTestStep.StepToAssociateTheCourseToProduct();
             GenericTestStep.StepToItShouldDisplaySuccessfulMessage("Approved courses programmed successfully.");
             DatabaseTools.UpdateProductMaterCourseAssociatedStatus(productName);
             GenericTestStep.StepToIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
         }
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         Assert.Fail(e.ToString());
     }
 }
        public void GivenWsUserIsAlreadyEnrolledInTheTestingCourseCopyIfNotThenEnrollTheUserInTestingCourseCopy()
        {
            string isWsUserAlreadyEnrolled = DatabaseTools.GetEnrolledUser(Enumerations.UserType.HedWsInstructor);

            if (isWsUserAlreadyEnrolled == null || isWsUserAlreadyEnrolled.Equals("False") || isWsUserAlreadyEnrolled.Equals(""))
            {
                GenericTestStep.StepToEnrolUserInTestingCopyCourse();
                GenericTestStep.StepToItShouldDisplaySuccessfulMessage("Instructors enrolled successfully.");
            }
        }
コード例 #6
0
 public static void ThenItShouldDisplaySuccessfulMessage(string successMsg)
 {
     try
     {
         GenericTestStep.StepToItShouldDisplaySuccessfulMessage(successMsg);
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
     }
 }
        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 GivenProgramTypeProductIsAlreadyCreatedIfNotThenCreateANewProgramTypeProduct()
 {
     try
     {
         string isProductAlreadyCreated = DatabaseTools.GetProduct(Enumerations.ProductInstance.HedCoreProgram);
         if (isProductAlreadyCreated == null || isProductAlreadyCreated.Equals("False") || isProductAlreadyCreated.Equals(""))
         {
             GenericTestStep.StepToBrowsedUrlForPegasusUser("HED CS Admin");
             GenericTestStep.StepToLoggedIntoTheCourseSpaceAsCSAdmin();
             GenericTestStep.StepToItShouldShowTheManageProductsPage();
             GenericTestStep.StepToClickTheCreateNewProductLink();
             GenericTestStep.StepToCreateHedGeneralTypeProduct("HedCoreProgram");
             GenericTestStep.StepToItShouldDisplaySuccessfulMessage("New product created successfully.");
         }
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         Assert.Fail(e.ToString());
     }
 }