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 GivenStudentisalreadypromotedtoTAifnotthenpromotethestudentasTa()
 {
     try
     {
         GenericTestStep.StepToBrowsedUrlForPegasusUser("CsSmsInstructor");
         GenericTestStep.StepToLoggedIntoTheCourseSpaceAsSMSInstructor();
         GenericTestStep.StepToIAmOnThePage("Global Home");
         GenericHelper.SelectWindow("Global Home");
         string courseName = DatabaseTools.GetCourse(Enumerations.CourseType.ProgramCourse).Trim();
         GenericHelper.WaitUntilElement(By.PartialLinkText(courseName));
         WebDriver.FindElement(By.PartialLinkText(courseName)).SendKeys("");
         WebDriver.FindElement(By.PartialLinkText(courseName)).Click();
         GenericTestStep.StepToIAmOnThePage("Program Administration");
         GenericHelper.SelectWindow("Program Administration");
         GenericTestStep.StepToNavigateToTheTab("Sections");
         // Will need to change this line as per the authored course
         GenericHelper.SelectWindow("Program Administration");
         string sectionName = DatabaseTools.GetSectionName(Enumerations.CourseType.ProgramCourse).Trim();
         _sectionSearch.ToSearchSection(sectionName);
         _sectionSearch.SelectSectionAfterSearch();
         GenericTestStep.StepToIAmOnThePage("Calendar");
         GenericHelper.SelectWindow("Calendar");
         GenericTestStep.StepToNavigateToTheTab("Enrollments");
         GenericTestStep.StepToIAmOnThePage("Roster");
         _rosterPage.ToGrantTAPrivilege();
         GenericTestStep.StepToIAmOnThePage("Roster");
         GenericTestStep.StepToIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         Assert.Fail(e.ToString());
     }
 }
 public void WhenIGrantthestudentasTa()
 {
     try
     {
         GenericTestStep.StepToLoggedIntoTheCourseSpaceAsSMSInstructor();
         GenericTestStep.StepToIAmOnThePage("Global Home");
         GenericHelper.SelectWindow("Global Home");
         string courseName = DatabaseTools.GetCourse(Enumerations.CourseType.InstructorCourse).Trim();
         GenericHelper.WaitUntilElement(By.PartialLinkText(courseName));
         WebDriver.FindElement(By.PartialLinkText(courseName)).SendKeys("");
         WebDriver.FindElement(By.PartialLinkText(courseName)).Click();
         GenericTestStep.StepToIAmOnThePage("Calendar");
         // Will need to change this line as per the authored course
         GenericHelper.SelectWindow("Calendar");
         GenericTestStep.StepToNavigateToTheTab("Enrollments");
         GenericTestStep.StepToIAmOnThePage("Roster");
         _rosterPage.ToGrantTAPrivilege();
         GenericTestStep.StepToIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         GenericStepDefinition.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
         Assert.Fail(string.Format("Exception of type {0} cau" + "ght: {1}", e.GetType(), e.Message));
     }
 }
Beispiel #4
0
 public static void ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication()
 {
     try
     {
         GenericTestStep.StepToIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         throw new Exception(e.ToString());
     }
 }
 public void WhenIgettheCourseIDofInstructorCourse()
 {
     try
     {
         GenericTestStep.StepToIAmOnThePage("Global Home");
         GenericTestStep.StepToEnrollStudentToInstructorCourse();
         GenericTestStep.StepToIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         Assert.Fail(e.ToString());
     }
 }
 public void WhenIenrollthestudenttotheCourse()
 {
     try
     {
         GenericTestStep.StepToLoggedIntoTheCourseSpaceAsSMSStudent();
         GenericTestStep.StepToIAmOnThePage("Global Home");
         GenericTestStep.StepToEnrollStudenttoCourseId();
         GenericTestStep.StepToIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         Assert.Fail(e.ToString());
     }
 }