Demo App that displays and provides edition for a user list.
Try the demo
- AppSync for gql API + DynamoDB for data source
- Apollo Client for gql client and data caching
- Next.js for FE bundling
- Jest + Testing Library for unit tests
- Playwright for functional and visual regression tests
Install dependencies
npm installInstall Amplify CLI tool
npm install -g @aws-amplify/cliInitialize and configure amplify
amplify init
amplify pushRun locally
npm run devNavigate to app http://localhost:3000/
We have two projects ran by jest: unit and functional. The former runs on the default jest jsdom env, while the latter runs on playwright. Check out jest.config.js file.
To run tests, first build the project:
npm run buildThen
npm testIf ran with iTerm, failing functional tests will output an inline screenshot. A jest-screenshot-report folder will be generated with and image compare tool in case any visual regression test fails.
To run just one project, let's say unit tests only:
npm test -- --selectProjects unitTo achieve deterministic tests, functional tests run against an MSW mocked backend. Check src/mockServer.ts
DEBUG=true npm testDEBUG env variable will open the browser for functional tests.
Things I would like to add with more time
- Focus trap for the modal
- Server side rendering