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()); } }