Skip to content

Commit

Permalink
SW-5471 fix link for change firm (#286)
Browse files Browse the repository at this point in the history
* SW-5471 fix change firm link

* missing >

* SW-5471 address go lint errors by swapping date format around in tests
  • Loading branch information
nickdavis2001 committed Mar 2, 2023
1 parent 107fdf0 commit 0c96716
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion cypress/e2e/pro-hub/change-firm.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ describe("Change Firm", () => {

describe("Changing a firm", () => {
beforeEach(() => {
cy.visit("/supervision/deputies/3/change-firm");
cy.visit("/supervision/deputies/3");
cy.get("#change-firm").click();
});

it("shows title for page", () => {
Expand Down
12 changes: 6 additions & 6 deletions internal/sirius/get_deputy_clients_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,8 @@ func TestReformatCompletedDateReturnsDateInCorrectFormat(t *testing.T) {
}

func TestGetOrderStatusReturnsOldestActiveOrder(t *testing.T) {
dateOne, _ := time.Parse("2006-02-01 00:00:00 +0000 UTC", "2014-12-01 00:00:00 +0000 UTC")
dateTwo, _ := time.Parse("2006-02-01 00:00:00 +0000 UTC", "2017-12-01 00:00:00 +0000 UTC")
dateOne, _ := time.Parse("2006-01-02 00:00:00 +0000 UTC", "2014-01-12 00:00:00 +0000 UTC")
dateTwo, _ := time.Parse("2006-01-02 00:00:00 +0000 UTC", "2017-01-12 00:00:00 +0000 UTC")

orderData := Orders{
Order{OrderStatus: "Active", SupervisionLevel: "General", OrderDate: dateOne},
Expand All @@ -629,8 +629,8 @@ func TestGetOrderStatusReturnsOldestActiveOrder(t *testing.T) {
assert.Equal(t, expectedResponse, result)
}
func TestGetOrderStatusReturnsOldestNonActiveOrder(t *testing.T) {
dateOne, _ := time.Parse("2006-02-01 00:00:00 +0000 UTC", "2014-12-01 00:00:00 +0000 UTC")
dateTwo, _ := time.Parse("2006-02-01 00:00:00 +0000 UTC", "2017-12-01 00:00:00 +0000 UTC")
dateOne, _ := time.Parse("2006-01-02 00:00:00 +0000 UTC", "2014-01-12 00:00:00 +0000 UTC")
dateTwo, _ := time.Parse("2006-01-02 00:00:00 +0000 UTC", "2017-01-12 00:00:00 +0000 UTC")

orderData := Orders{
Order{OrderStatus: "Close", SupervisionLevel: "General", OrderDate: dateOne},
Expand All @@ -643,8 +643,8 @@ func TestGetOrderStatusReturnsOldestNonActiveOrder(t *testing.T) {
}

func TestGetMostRecentSupervisionLevel(t *testing.T) {
dateOne, _ := time.Parse("2006-02-01 00:00:00 +0000 UTC", "2014-12-01 00:00:00 +0000 UTC")
dateTwo, _ := time.Parse("2006-02-01 00:00:00 +0000 UTC", "2017-12-01 00:00:00 +0000 UTC")
dateOne, _ := time.Parse("2006-01-02 00:00:00 +0000 UTC", "2014-01-12 00:00:00 +0000 UTC")
dateTwo, _ := time.Parse("2006-01-02 00:00:00 +0000 UTC", "2017-01-12 00:00:00 +0000 UTC")

orderData := Orders{
Order{OrderStatus: "Close", SupervisionLevel: "Minimal", OrderDate: dateOne},
Expand Down
5 changes: 3 additions & 2 deletions web/template/manage-deputy-contact-details.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-one-half">
<p class="govuk-body govuk-!-margin-bottom-5">
<a href="">Change the deputy&apos;s firm</a> if
they&apos;ve moved to a different organisation
<a
href="{{ prefix (printf "/%d/change-firm" .DeputyDetails.ID) }}">Change the deputy&apos;s firm
</a> if they&apos;ve moved to a different organisation
</p>

<form
Expand Down

0 comments on commit 0c96716

Please sign in to comment.