Skip to content

Commit

Permalink
Merge 5bb74f6 into 8e87ab8
Browse files Browse the repository at this point in the history
  • Loading branch information
acsauk authored May 13, 2024
2 parents 8e87ab8 + 5bb74f6 commit c7a94d7
Show file tree
Hide file tree
Showing 39 changed files with 1,900 additions and 1,047 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const {randomShareCode, TestEmail} = require("../../support/e2e");

describe('Choose not to be a certificate provider', () => {
describe('can enter reference number to not be a certificate provider', () => {
it('when LPA has been signed and witnessed', () => {
const shareCode = randomShareCode()
cy.visit(`/fixtures/certificate-provider?redirect=/certificate-provider-enter-reference-number-opt-out&withShareCode=${shareCode}&email=${TestEmail}&progress=signedByDonor`)

cy.checkA11yApp();

cy.get('#f-reference-number').type(shareCode);
cy.contains('Continue').click();

cy.url().should('contain', '/confirm-you-do-not-want-to-be-a-certificate-provider')
cy.checkA11yApp();

cy.contains('Property and affairs')

cy.contains('button', 'Confirm').click();

cy.url().should('contain', '/you-have-decided-not-to-be-a-certificate-provider')
cy.checkA11yApp();

cy.contains('We have contacted Sam Smith')
});

it('when LPA has not been signed and witnessed', () => {
const shareCode = randomShareCode()
cy.visit(`/fixtures/certificate-provider?redirect=/certificate-provider-enter-reference-number-opt-out&withShareCode=${shareCode}&email=${TestEmail}`)

cy.checkA11yApp();

cy.get('#f-reference-number').type(shareCode);
cy.contains('Continue').click();

cy.url().should('contain', '/confirm-you-do-not-want-to-be-a-certificate-provider')
cy.checkA11yApp();

cy.contains('Property and affairs')

cy.contains('button', 'Confirm').click();

cy.url().should('contain', '/you-have-decided-not-to-be-a-certificate-provider')
cy.checkA11yApp();

cy.contains('We have contacted Sam Smith')
});
})
})
18 changes: 18 additions & 0 deletions cypress/e2e/certificate-provider/provide-certificate.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@ describe('Provide the certificate', () => {
cy.url().should('contain', '/certificate-provided');
});

it('can choose not to provide the certificate', () => {
cy.checkA11yApp();

cy.contains('I cannot provide the certificate').click();

cy.url().should('contain', '/confirm-you-do-not-want-to-be-a-certificate-provider')
cy.checkA11yApp();

cy.contains('Property and affairs')

cy.contains('button', 'Confirm').click();

cy.url().should('contain', '/you-have-decided-not-to-be-a-certificate-provider')
cy.checkA11yApp();

cy.contains('We have contacted Sam Smith')
});

it("errors when not selected", () => {
cy.contains('button', 'Submit signature').click();

Expand Down
2 changes: 0 additions & 2 deletions docker/docker-compose.ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
app:
image: ${ECR_REGISTRY}/modernising-lpa/app:${TAG}
2 changes: 0 additions & 2 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
app:
build:
Expand Down
2 changes: 0 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
app:
build:
Expand Down
4 changes: 4 additions & 0 deletions docker/mock-lpa-store/lpa-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ switch (context.request.method) {
lpa.status = 'registered';
lpa.registrationDate = new Date(Date.now()).toISOString();
break;

case 'CERTIFICATE_PROVIDER_OPT_OUT':
lpa.status = 'cannot-register';
break;
}

lpaStore.save(pathParts[2], JSON.stringify(lpa));
Expand Down
25 changes: 0 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ require (
)

require (
cloud.google.com/go v0.112.0 // indirect
cloud.google.com/go/compute v1.24.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/storage v1.36.0 // indirect
github.com/aws/aws-sdk-go v1.51.21 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.12 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect
Expand All @@ -66,24 +60,15 @@ require (
github.com/aws/aws-sdk-go-v2/service/sso v1.20.6 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.7 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/brunoscheufler/aws-ecs-metadata-go v0.0.0-20220812150832-b6b31c6eeeaf // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/chigopher/pathlib v0.19.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.4 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
Expand All @@ -92,12 +77,10 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jinzhu/copier v0.4.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
Expand All @@ -112,27 +95,19 @@ require (
github.com/spf13/viper v1.18.2 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect
go.opentelemetry.io/otel/metric v1.26.0 // indirect
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/api v0.162.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/protobuf v1.33.0 // indirect
Expand Down
Loading

0 comments on commit c7a94d7

Please sign in to comment.