This is example of using Cypress for End to End UI Testing and was created using Create React App. This project includes a Github Workflow that deploys to a static S3 Site and runs the test against it.
To start the development server run the following command
npm startThe application will be available at http://localhost:3000
To run the Cypress tests, run the following command.
npm run cypress:runTo open the Cypress run
npm run cypress:openFirst create the S3 Bucket.
aws cloudformation update-stack --stack-name cypress-example --template-body file://aws/cloudformation.ymlnpm run build
aws s3 sync build s3://cypress-exampleexport CYPRESS_BASE_URL=http://cypress-example.s3-website-us-east-1.amazonaws.com
npm run cypress:run