Skip to content

Commit

Permalink
Feature/183558 (#991)
Browse files Browse the repository at this point in the history
* Project status reason backend

* Frontend reasons page WIP

* Edit status reason and display in project overview

* Added API test

* Updated cypress tests, fixed referrer functionality

* Fixed bug with selecting cancelled/withdrawn reason

* Added section break

* Fixed project status reason not mapping to NotSet if a reason isn't selected. Updated Cypress test that was missed off in initial Project Status Reason work
  • Loading branch information
jack-nimbleapproach authored Jan 16, 2025
1 parent 8356c6f commit ecf5d4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import summaryPage from "cypress/pages/task-summary-base";
import taskListPage from "cypress/pages/taskListPage";
import validationComponent from "cypress/pages/validationComponent";
import projectStatusPage from "../../../pages/project-status/projectStatusPage";
import projectStatusCancelledPage from "cypress/pages/project-status/projectStatusCancelledPage";

describe("Testing project overview", () => {
let project: ProjectDetailsRequest;
Expand Down Expand Up @@ -36,6 +37,8 @@ describe("Testing project overview", () => {

projectStatusPage
.selectCancelled()
.clickSaveAndContinue()
projectStatusCancelledPage
.addCancelledYear("1", "1", "2000")
.clickSaveAndContinue()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ public async Task<IActionResult> OnPost()
ProjectStatus = ProjectStatusType.Cancelled,

CancelledDate = CancelledYear,
ProjectCancelledReason = (ProjectCancelledReasonType)Enum.Parse(typeof(ProjectCancelledReasonType), ProjectCancelledReason),

ProjectCancelledReason = (ProjectCancelledReasonType)Enum.Parse(typeof(ProjectCancelledReasonType), ProjectCancelledReason ?? "NotSet"),

ProjectCancelledDueToNationalReviewOfPipelineProjects = ProjectCancelledAsAResultOfNationalPipelineReview,
CommentaryForCancellation = Notes,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ public async Task<IActionResult> OnPost()
CommentaryForCancellation = null,

WithdrawnDate = WithdrawnYear,
ProjectWithdrawnReason = (ProjectWithdrawnReasonType)Enum.Parse(typeof(ProjectWithdrawnReasonType), ProjectWithdrawnReason),

ProjectWithdrawnReason = (ProjectWithdrawnReasonType)Enum.Parse(typeof(ProjectWithdrawnReasonType), ProjectWithdrawnReason ?? "NotSet"),

ProjectWithdrawnDueToNationalReviewOfPipelineProjects = ProjectWithdrawnAsAResultOfNationalPipelineReview,
CommentaryForWithdrawal = Notes,

Expand Down

0 comments on commit ecf5d4e

Please sign in to comment.