generated from NHSDigital/nhs-notify-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
CCM-7465: implement backend api PT.2 #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
583b521
CCM-7465: implement backend api and update automated tests
bhansell1 d99ed4f
CCM-7465: update automated tests to check for logout link
bhansell1 9cb6154
CCM-7465: add the auth pages when in CI for automated tests
bhansell1 8ce2733
CCM-7465: don't build the backend
bhansell1 0c9b889
CCM-7465: don't deploy backend resources
bhansell1 6b8eeb2
CCM-7465: don't deploy backend resources
bhansell1 73544b6
CCM-7465: don't deploy backend resources
bhansell1 6be7690
CCM-7465: don't deploy backend resources
bhansell1 223bc6a
CCM-7465: don't deploy backend resources
bhansell1 c4c5cf3
CCM-7465: don't deploy backend resources
bhansell1 861937c
CCM-7465: add protected routes
bhansell1 cab3b5b
CCM-7465: add middleware
bhansell1 428cb83
CCM-7465: temporarily redirect back home
bhansell1 bbedfe9
CCM-7465: temporarily redirect back home
bhansell1 620f193
CCM-7465: set env vars required for amplify and next app
bhansell1 04cf3e6
CCM-7465: disable route protection
bhansell1 7cb6bb9
CCM-7465: change from bash to JS version of creating amplify outputs
bhansell1 3fb681c
CCM-7465: create a .env file for the CI tests
bhansell1 340e3ad
CCM-7465: clean up unused files
bhansell1 5b57282
Merge branch 'feature/CCM-7465_use-jwt-sub' of https://github.com/NHS…
bhansell1 5362455
CCM-7465: re-add protected routes
bhansell1 86eb40f
CCM-7465: add stdout logs to paywright for debugging
bhansell1 050dfe2
CCM-7465: add a 2 minute timeout for webserver load while debugging
bhansell1 49927ff
CCM-7465: remove authorization caching. Which is causing tests to fail
bhansell1 4c5abd4
CCM-7465: set retries to 3 to see if a retry helps with the tests.
bhansell1 61bd097
CCM-7465: fix automated test by creating a new page when asserting ba…
bhansell1 e3f8699
CCM-7465: update docs with tips. Fix linting and unit tests
bhansell1 1a83326
CCM-7465: pull meta from amplify_outputs in automated tests
bhansell1 bb724ad
CCM-7465: re-add redirect location when not signed in
bhansell1 5a5ec5a
CCM-7465: update token check in form-actions
bhansell1 c80a321
Merge branch 'main' of https://github.com/NHSDigital/nhs-notify-web-t…
bhansell1 b9424c8
CCM-7465: update artifacts upload to v4
bhansell1 2d61411
CCM-7465: force manage templates to be SSR'd
bhansell1 41b7cf4
CCM-7465: update common tests to assert logout link
bhansell1 78b44ae
Fix accessibility tests
chris-elliott-nhsd cfc1835
Fix deleted check
chris-elliott-nhsd ff5853e
CCM-7465: update ttl on api. Turn off automated tests debugging
bhansell1 ad03634
Merge branch 'feature/CCM-7465_use_backend-api' of https://github.com…
bhansell1 c4cae3d
CCM-7465: revert new'ing up page in common tests
bhansell1 ab3edef
empty
bhansell1 f627f0d
CCM-7465: change ubuntu version to 22.04 which has TF installed
bhansell1 8a4d509
CCM-7465: update timeouts to 30 seconds and 10 seconds for expect. Cr…
bhansell1 93c3969
CCM-7465: fix linting
bhansell1 892e12a
CCM-7465: revert change to create a new page.
bhansell1 f81c1dd
CCM-7465: update comment about forcing dynamically rendered page
bhansell1 cbf9d1c
CCM-7465: update logout link to redirect back to ~templates
bhansell1 3cea9ad
Merge branch 'main' of https://github.com/NHSDigital/nhs-notify-web-t…
bhansell1 1416e7c
CCM-7465: revert ci changes
bhansell1 16fba04
Merge branch 'main' into feature/CCM-7465_backend-api
bhansell1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,3 +82,4 @@ sandbox_cognito_auth_token.json | |
|
|
||
| frontend/public/testing | ||
| .vscode/launch.json | ||
| auth.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Includes auth pages when building web frontend in production mode. | ||
| INCLUDE_AUTH_PAGES='' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1 @@ | ||
| import { defineBackend } from '@aws-amplify/backend'; | ||
| import { PolicyStatement, Effect } from 'aws-cdk-lib/aws-iam'; | ||
| import { auth } from './auth/resource'; | ||
| import { data } from './data/resource'; | ||
| import { sendEmail } from './functions/send-email/resource'; | ||
|
|
||
| const backend = defineBackend({ | ||
| auth, | ||
| data, | ||
| sendEmail, | ||
| }); | ||
|
|
||
| const sendEmailLambda = backend.sendEmail.resources.lambda; | ||
|
|
||
| const attachPolicy = new PolicyStatement({ | ||
| sid: 'AmplifySendEmail', | ||
| effect: Effect.ALLOW, | ||
| actions: ['ses:SendRawEmail'], | ||
| resources: [`arn:aws:ses:eu-west-2:${process.env.ACCOUNT_ID}:identity/*`], | ||
| }); | ||
|
|
||
| sendEmailLambda.addToRolePolicy(attachPolicy); | ||
|
|
||
| backend.data.resources.cfnResources.amplifyDynamoDbTables.TemplateStorage.timeToLiveAttribute = | ||
| { | ||
| attributeName: 'ttl', | ||
| enabled: true, | ||
| }; | ||
| /* eslint-disable unicorn/no-empty-file */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.