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 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());
     }
 }
Beispiel #3
0
 public static void WhenIHaveLoggedIntoTheCourseSpaceAsHedCSAdmin()
 {
     try
     {
         GenericTestStep.StepToLoggedIntoTheCourseSpaceAsHedCSAdmin();
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         throw new Exception(e.ToString());
     }
 }
 public void GivenHEDGeneralTypeProductIsAlreadyCreatedIfNotThenCreateANewGeneralTypeProduct()
 {
     try
     {
         string isProductAlreadyCreated = DatabaseTools.GetProduct(Enumerations.ProductInstance.HedCoreGeneral);
         if (isProductAlreadyCreated == null || isProductAlreadyCreated.Equals("False") || isProductAlreadyCreated.Equals(""))
         {
             GenericTestStep.StepToBrowsedUrlForPegasusUser("HED CS Admin");
             GenericTestStep.StepToLoggedIntoTheCourseSpaceAsHedCSAdmin();
             GenericTestStep.StepToItShouldShowTheManageProductsPage();
             GenericTestStep.StepToClickTheCreateNewProductLink();
             GenericTestStep.StepToCreateHedGeneralTypeProduct("HedCoreGeneral");
             GenericTestStep.StepToItShouldDisplaySuccessfulMessage("New product created successfully.");
         }
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         Assert.Fail(e.ToString());
     }
 }