Skip to content

Commit

Permalink
MLPAB-1335 Remove "who is the lpa for" page (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawx authored Sep 19, 2023
1 parent 13dc463 commit d15e9e4
Show file tree
Hide file tree
Showing 21 changed files with 14 additions and 340 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/go-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ jobs:
- name: Run tests and generate coverage report
run: |
mkdir -p ./coverage/cmd ./coverage/internal
go test -cover ./internal/... -args -test.gocoverdir="$PWD/coverage/cmd"
go test -cover ./internal/... -args -test.gocoverdir="$PWD/coverage/internal"
go tool covdata textfmt -i=./coverage/internal,./coverage/cmd -o ./coverage/coverage_combined.out
make go-test
- name: Publish pacts
run: |
Expand All @@ -75,4 +72,4 @@ jobs:
uses: codecov/codecov-action@v3
with:
flags: unittests
files: ./coverage/coverage_combined.out
files: ./coverage.out
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ help: ##@other Show this help.
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)

go-test: ##@testing Runs full go test suite
find . -name go.mod -execdir go test ./... -race -covermode=atomic -coverprofile=coverage.out \;
go test ./... -race -covermode=atomic -coverprofile=coverage.out

go-generate: ##@testing Runs go generate
find . -name go.mod -execdir go generate ./... \;
go generate ./...

coverage: ##@testing Produces coverage report and launches browser line based coverage explorer. To test a specific internal package pass in the package name e.g. make coverage package=page
ifdef package
Expand Down
24 changes: 0 additions & 24 deletions cypress/e2e/donor/who-is-the-lpa-for.cy.js

This file was deleted.

8 changes: 4 additions & 4 deletions cypress/e2e/donor/your-address.cy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {AddressFormAssertions} from "../../support/e2e";
import { AddressFormAssertions } from "../../support/e2e";

describe('Donor address', () => {
beforeEach(() => {
Expand All @@ -7,17 +7,17 @@ describe('Donor address', () => {

it('address can be looked up', () => {
AddressFormAssertions.assertCanAddAddressFromSelect()
cy.url().should('contain', '/who-is-the-lpa-for');
cy.url().should('contain', '/lpa-type');
});

it('address can be entered manually if not found', () => {
AddressFormAssertions.assertCanAddAddressManually('I can’t find my address in the list')
cy.url().should('contain', '/who-is-the-lpa-for');
cy.url().should('contain', '/lpa-type');
});

it('address can be entered manually on invalid postcode', () => {
AddressFormAssertions.assertCanAddAddressManually('Enter address manually', true)
cy.url().should('contain', '/who-is-the-lpa-for');
cy.url().should('contain', '/lpa-type');
});

it('errors when empty postcode', () => {
Expand Down
2 changes: 0 additions & 2 deletions internal/page/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ type Lpa struct {
AttorneyDecisions actor.AttorneyDecisions
// The certificate provider named in the LPA
CertificateProvider actor.CertificateProvider
// Who the LPA is being drafted for (set, but not used)
WhoFor string
// Type of LPA being drafted
Type LpaType
// ApplicationReason is why the application is being made
Expand Down
2 changes: 0 additions & 2 deletions internal/page/donor/certificate_provider_address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ func TestPostCertificateProviderAddressManualFromStore(t *testing.T) {
FirstNames: "John",
Address: testAddress,
},
WhoFor: "me",
}).
Return(nil)

Expand All @@ -208,7 +207,6 @@ func TestPostCertificateProviderAddressManualFromStore(t *testing.T) {
FirstNames: "John",
Address: place.Address{Line1: "abc"},
},
WhoFor: "me",
})
resp := w.Result()

Expand Down
2 changes: 0 additions & 2 deletions internal/page/donor/choose_attorneys_address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ func TestPostChooseAttorneysAddressManualFromStore(t *testing.T) {
FirstNames: "John",
Address: testAddress,
}}},
WhoFor: "me",
}).
Return(nil)

Expand All @@ -306,7 +305,6 @@ func TestPostChooseAttorneysAddressManualFromStore(t *testing.T) {
FirstNames: "John",
Address: place.Address{Line1: "abc"},
}}},
WhoFor: "me",
})
resp := w.Result()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ func TestPostChooseReplacementAttorneysAddressManualFromStore(t *testing.T) {
FirstNames: "John",
Address: testAddress,
}}},
WhoFor: "me",
Tasks: page.Tasks{ChooseReplacementAttorneys: actor.TaskCompleted},
Tasks: page.Tasks{ChooseReplacementAttorneys: actor.TaskCompleted},
}).
Return(nil)

Expand All @@ -272,7 +271,6 @@ func TestPostChooseReplacementAttorneysAddressManualFromStore(t *testing.T) {
FirstNames: "John",
Address: place.Address{Line1: "abc"},
}}},
WhoFor: "me",
})
resp := w.Result()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ func TestPostEnterReplacementTrustCorporationAddressManualFromStore(t *testing.T
Name: "John",
Address: testAddress,
}},
WhoFor: "me",
}).
Return(nil)

Expand All @@ -184,7 +183,6 @@ func TestPostEnterReplacementTrustCorporationAddressManualFromStore(t *testing.T
Name: "John",
Address: place.Address{Line1: "abc"},
}},
WhoFor: "me",
})
resp := w.Result()

Expand Down
2 changes: 0 additions & 2 deletions internal/page/donor/enter_trust_corporation_address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ func TestPostEnterTrustCorporationAddressManualFromStore(t *testing.T) {
Name: "John",
Address: testAddress,
}},
WhoFor: "me",
}).
Return(nil)

Expand All @@ -184,7 +183,6 @@ func TestPostEnterTrustCorporationAddressManualFromStore(t *testing.T) {
Name: "John",
Address: place.Address{Line1: "abc"},
}},
WhoFor: "me",
})
resp := w.Result()

Expand Down
2 changes: 0 additions & 2 deletions internal/page/donor/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ func Register(
YourDetails(tmpls.Get("your_details.gohtml"), donorStore, sessionStore))
handleWithLpa(page.Paths.YourAddress, None,
YourAddress(logger, tmpls.Get("your_address.gohtml"), addressClient, donorStore))
handleWithLpa(page.Paths.WhoIsTheLpaFor, None,
WhoIsTheLpaFor(tmpls.Get("who_is_the_lpa_for.gohtml"), donorStore))
handleWithLpa(page.Paths.LpaType, None,
LpaType(tmpls.Get("lpa_type.gohtml"), donorStore))
handleWithLpa(page.Paths.ApplicationReason, None,
Expand Down
59 changes: 0 additions & 59 deletions internal/page/donor/who_is_the_lpa_for.go

This file was deleted.

Loading

0 comments on commit d15e9e4

Please sign in to comment.