{"_id":"cypress-realworld-app","name":"cypress-realworld-app","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"cypress-realworld-app","version":"1.0.0","description":"A payment application to demonstrate **real-world** usage of Cypress testing methods, patterns, and workflows. For a full reference of our documentation, go to https://docs.cypress.io","repository":{"type":"git","url":"git+https://github.com/cypress-io/cypress-realworld-app.git"},"author":{"name":"Cypress-io"},"license":"MIT","bugs":{"url":"https://github.com/cypress-io/cypress-realworld-app/issues"},"dependencies":{"@auth0/auth0-react":"2.2.4","@babel/core":"7.23.9","@babel/plugin-syntax-flow":"^7.14.5","@babel/plugin-transform-react-jsx":"^7.14.9","@emotion/react":"^11.11.4","@emotion/styled":"^11.11.0","@graphql-tools/graphql-file-loader":"7.5.17","@graphql-tools/load":"7.8.14","@matheusluizn/react-google-login":"^5.1.6","@mui/icons-material":"^5.15.12","@mui/lab":"^5.0.0-alpha.167","@mui/material":"^5.15.12","@okta/jwt-verifier":"^3.0.1","@okta/okta-auth-js":"^7.3.0","@okta/okta-react":"^6.7.0","@types/detect-port":"^1.3.2","@xstate/react":"3.2.2","aws-amplify":"^6.0.16","axios":"0.28.1","clsx":"1.2.1","date-fns":"2.30.0","detect-port":"^1.5.1","dinero.js":"1.9.1","formik":"2.4.6","history":"4.10.1","postinstall-postinstall":"^2.1.0","react":"18.2.0","react-dom":"18.2.0","react-infinite-calendar":"2.3.1","react-number-format":"4.9.4","react-router":"5.3.4","react-router-dom":"5.3.4","react-virtualized":"9.22.5","shortid":"2.2.16","uuid":"8.3.2","webpack":"5","xstate":"4.38.3","yup":"0.32.11"},"devDependencies":{"@babel/plugin-proposal-private-property-in-object":"7.21.11","@cypress/code-coverage":"^3.10.0-dev.1","@cypress/instrument-cra":"1.4.0","@cypress/vite-dev-server":"^5.0.7","@faker-js/faker":"6.1.2","@percy/cli":"^1.27.4","@percy/cypress":"3.1.2","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.0.0","@types/bcryptjs":"2.4.2","@types/bluebird":"3.5.36","@types/connect-flash":"0.0.37","@types/connect-history-api-fallback":"1.3.5","@types/cors":"2.8.12","@types/dinero.js":"1.9.0","@types/express":"4.17.21","@types/express-paginate":"1.0.4","@types/express-serve-static-core":"4.17.2","@types/express-session":"1.18.0","@types/http-proxy-middleware":"0.19.3","@types/json-server":"0.14.4","@types/jsonwebtoken":"8.5.8","@types/jwt-decode":"2.2.1","@types/lodash":"4.14.181","@types/lowdb":"1.0.11","@types/morgan":"1.9.3","@types/node":"^20.11.25","@types/passport":"1.0.16","@types/react":"^18.2.14","@types/react-dom":"^18.2.6","@types/react-infinite-calendar":"2.3.6","@types/react-router":"5.1.18","@types/react-router-dom":"5.3.3","@types/react-virtualized":"9.21.21","@types/shortid":"0.0.29","@types/uuid":"8.3.4","@types/validator":"13.7.2","@types/webpack-env":"1.16.4","@types/yup":"0.29.13","@vitejs/plugin-react":"^4.0.2","bcryptjs":"2.4.3","concurrently":"7.1.0","connect-history-api-fallback":"1.6.0","cors":"2.8.5","cross-env":"7.0.3","cypress":"^13.7.1","dotenv":"16.0.0","eslint":"^8.44.0","eslint-config-prettier":"8.10.0","eslint-config-react-app":"^7.0.1","eslint-plugin-cypress":"3.5.0","eslint-plugin-prettier":"^5.0.0","express":"4.20.0","express-jwt":"6.1.2","express-paginate":"1.0.2","express-session":"1.18.0","express-validator":"6.15.0","fuse.js":"6.5.3","graphql":"16.8.1","graphql-http":"^1.22.0","graphql-playground-middleware-express":"^1.7.23","graphql-tools":"8.2.7","http-proxy-middleware":"0.19.1","husky":"7.0.4","istanbul-lib-coverage":"3.2.2","jsdom":"^22.1.0","json":"11.0.0","jwks-rsa":"2.0.5","lowdb":"1.0.0","morgan":"1.10.0","ncp":"2.0.0","nodemon":"2.0.22","npm":"^9.8.0","nyc":"15.1.0","passport":"0.5.0","passport-local":"1.0.0","patch-package":"^7.0.0","prettier":"^3.0.0","start-server-and-test":"1.14.0","ts-node":"10.9.2","typescript":"4.9.5","vite":"^4.4.2","vite-plugin-eslint":"^1.8.1","vite-plugin-istanbul":"^4.1.0","vitest":"^0.33.0"},"scripts":{"dev":"cross-env NODE_ENV=development concurrently yarn:start:react yarn:start:api:watch","dev:coverage":"cross-env NODE_ENV=development CYPRESS_COVERAGE=true concurrently yarn:start:react yarn:start:api:watch","dev:auth0":"cross-env VITE_AUTH0=true NODE_ENV=development concurrently yarn:start:react yarn:start:api:watch","dev:okta":"cross-env VITE_OKTA=true NODE_ENV=development concurrently yarn:start:react yarn:start:api:watch","dev:cognito":"cross-env VITE_AWS_COGNITO=true NODE_ENV=development concurrently yarn:start:react yarn:start:api:watch","dev:google":"cross-env VITE_GOOGLE=true NODE_ENV=development concurrently yarn:start:react yarn:start:api:watch","predev:cognito":"yarn build:aws-exports-es5","predev:cognito:ci":"yarn copy:mock:awsexports && yarn copy:mock:awsexportses5","copy:mock:awsexports":"ncp scripts/mock-aws-exports.js src/aws-exports.js","copy:mock:awsexportses5":"ncp scripts/mock-aws-exports-es5.js aws-exports-es5.js","build:aws-exports-es5":"cross-env tsc --skipLibCheck --allowJs --lib 'es5' --module 'commonjs' --target 'es5' --moduleResolution 'node' --outDir . src/aws-exports.js; mv aws-exports.js aws-exports-es5.js","start":"cross-env NODE_ENV=development concurrently yarn:start:react yarn:start:api","start:ci":"cross-env NODE_ENV=test concurrently yarn:start:react:proxy-server yarn:start:api","prestart:ci":"yarn predev:cognito:ci","start:react":"vite","start:empty":"cross-env NODE_ENV=development EMPTY_SEED=true concurrently yarn:start:react yarn:start:api:watch","lint":"eslint && prettier --check \"**/**.{ts,js,tsx}\" \"*.{json,md,yml}\"","list:dev:users":"cat data/database.json | json -a users | json -a id username","types":"tsc --noEmit","precypress:open":"yarn predev:cognito:ci","cypress:open":"cypress open","cypress:open:mobile":"cypress open --config '{\"e2e\":{\"viewportWidth\":375,\"viewportHeight\":667}}'","cypress:run":"cypress run","cypress:run:component":"cypress run --component","cypress:run:mobile":"cypress run --config '{\"e2e\":{\"viewportWidth\":375,\"viewportHeight\":667}}'","test":"yarn cypress:open","test:headless":"yarn cypress:run","test:api":"yarn cypress:run --spec 'cypress/tests/api/*'","test:unit":"vitest","test:unit:ci":"vitest --run","test:component:ci":"yarn cypress:run:component","start:api":"yarn tsnode --files backend/app.ts","start:api:watch":"nodemon --exec yarn tsnode --watch 'backend' backend/app.ts","start:react:proxy-server":"yarn tsnode scripts/testServer.ts","prettier":"prettier --write \"**/**.{ts,js,tsx}\" \"*.{json,md,yml}\"","tsnode":"nyc --silent ts-node -P tsconfig.tsnode.json","tsnode:not-instrumented":"ts-node -P tsconfig.tsnode.json","db:seed":"yarn tsnode scripts/generateSeedData","predb:seed:dev":"yarn predev:cognito:ci","db:seed:dev":"ncp ./data/database-seed.json ./data/database.json","db:seed:empty":"ncp ./data/empty-seed.json ./data/database.json","postdb:seed":"yarn db:seed:dev","prestart":"yarn db:seed:dev","predev":"yarn db:seed:dev","prestart:empty":"yarn db:seed:empty","prebuild":"yarn types","prebuild:ci":"yarn predev:cognito:ci","build:ci":"cross-env CYPRESS_COVERAGE=true vite build","build":"vite build","codesandbox:start:api":"yarn tsnode:not-instrumented --files backend/app.ts","codesandbox:start":"NODE_ENV=development TSC_COMPILE_ON_ERROR=true concurrently \"vite\" yarn:start:api:codesandbox","postinstall":"husky install && patch-package"},"engines":{"node":"^18.0.0 || >=20.0.0"},"eslintConfig":{"env":{"cypress/globals":true},"extends":["react-app","plugin:prettier/recommended","plugin:cypress/recommended"],"plugins":["cypress","prettier"],"rules":{"no-unused-expressions":0}},"husky":{"hooks":{"pre-push":"yarn types"}},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"percy":{"version":1,"snapshot":{"widths":[1280]}},"nyc":{"exclude":["src/models/*.ts"],"reporter":["html","json"]},"packageManager":"yarn@1.22.22","gitHead":"8d7d56c167b4f5ab78ef8e16f1f31de657c09ebb","homepage":"https://github.com/cypress-io/cypress-realworld-app#readme","_id":"cypress-realworld-app@1.0.0","_nodeVersion":"20.3.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-3y+lL5WW81lGiIHwv/x3NAqyVWwbVejALoWUYpGca65aZrrpZQE58lOIoh5mf7C686/k85IvqWz7bWNtUjth3Q==","shasum":"5085e5ac3a238487007ffd6778261aaf87aa7441","tarball":"https://registry.npmjs.org/cypress-realworld-app/-/cypress-realworld-app-1.0.0.tgz","fileCount":221,"unpackedSize":6879193,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIENYonAZ2p1G7VcNgQhvSCK6Q8+deiOhm2D6l/NkEUEkAiBxSKyQ2kZQ0Q4gPXtNtZR3gICJTGVf156xfaJulecvTw=="}]},"_npmUser":{"name":"slavakharchenko","email":"slava.charodey@gmail.com"},"directories":{},"maintainers":[{"name":"slavakharchenko","email":"slava.charodey@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cypress-realworld-app_1.0.0_1728032525409_0.07249369011363016"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-04T09:02:05.408Z","1.0.0":"2024-10-04T09:02:05.642Z","modified":"2024-10-04T09:02:05.979Z"},"maintainers":[{"name":"slavakharchenko","email":"slava.charodey@gmail.com"}],"description":"A payment application to demonstrate **real-world** usage of Cypress testing methods, patterns, and workflows. For a full reference of our documentation, go to https://docs.cypress.io","homepage":"https://github.com/cypress-io/cypress-realworld-app#readme","repository":{"type":"git","url":"git+https://github.com/cypress-io/cypress-realworld-app.git"},"author":{"name":"Cypress-io"},"bugs":{"url":"https://github.com/cypress-io/cypress-realworld-app/issues"},"license":"MIT","readme":"<p align=\"center\">\n  <!-- We use two SVGs here so that this displays correctly\n    on Github. This might not look right in other Markdown previewers. -->\n  <img alt=\"Cypress Real World App Logo\" src=\"./src/svgs/rwa-logo-light.svg#gh-dark-mode-only\" />\n  <img alt=\"Cypress Real World App Logo\" src=\"./src/svgs/rwa-logo.svg#gh-light-mode-only\" />\n</p>\n\n<p align=\"center\">\n  <a href=\"https://cypress.io\">\n    <img width=\"140\" alt=\"Cypress Logo\" src=\"./src/svgs/built-by-cypress.svg\" />\n    </a>\n</p>\n\n<p align=\"center\">\n   <a href=\"https://cloud.cypress.io/projects/7s5okt/runs\">\n    <img src=\"https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/detailed/7s5okt/develop&style=flat&logo=cypress\" />\n  </a>\n\n  <a href=\"https://codecov.io/gh/cypress-io/cypress-realworld-app\">\n    <img src=\"https://codecov.io/gh/cypress-io/cypress-realworld-app/branch/develop/graph/badge.svg\" />\n  </a>\n\n  <a href=\"https://percy.io/cypress-io/cypress-realworld-app\">\n    <img src=\"https://percy.io/static/images/percy-badge.svg\" />\n  </a>\n\n   <a href=\"#contributors-\">\n    <img src=\"https://img.shields.io/badge/all_contributors-6-green.svg?style=flat\" />\n  </a>\n</p>\n\n<p align=\"center\">\nA payment application to demonstrate <strong>real-world</strong> usage of <a href=\"https://cypress.io\">Cypress</a> testing methods, patterns, and workflows.\n</p>\n\n<p align=\"center\">\n  <img style='width: 70%' alt=\"Cypress Real World App\" src=\"./public/img/rwa-readme-screenshot.png\" />\n</p>\n\n> 💬 **Note from maintainers**\n>\n> This application is purely for demonstration and educational purposes. Its setup and configuration resemble typical real-world applications, but it's not a full-fledged production system. Use this app to learn, experiment, tinker, and practice application testing with Cypress.\n>\n> Happy Testing!\n\n---\n\n## Features\n\n🛠 Built with [React][reactjs], [XState][xstate], [Express][express], [lowdb][lowdb], [Material-UI][material-ui] and [TypeScript][typescript]\n⚡️ Zero database dependencies\n🚀 Full-stack [Express][express]/[React][reactjs] application with real-world features and tests\n👮‍♂️ Local Authentication\n🔥 Database Seeding with End-to-end Tests\n💻 CI/CD + [Cypress Cloud][cypresscloud]\n\n## Getting Started\n\nThe Cypress Real-World App (RWA) is a full-stack Express/React application backed by a local JSON database ([lowdb]).\n\nThe app is bundled with [example data](./data/database.json) (`data/database.json`) that contains everything you need to start using the app and run tests out-of-the-box.\n\n> 🚩 **Note**\n>\n> You can login to the app with any of the [example app users](./data/database.json#L2). The default password for all users is `s3cret`.\n> Example users can be seen by running `yarn list:dev:users`.\n\n### Prerequisites\n\nThis project requires [Node.js](https://nodejs.org/en/) to be installed on your machine. Refer to the [.node-version](./.node-version) file for the exact version.\n\n[Yarn Classic](https://classic.yarnpkg.com/) is also required. Once you have [Node.js](https://nodejs.org/en/) installed, execute the following to install the npm module [yarn](https://www.npmjs.com/package/yarn) (Classic - version 1) globally.\n\n```shell\nnpm install yarn@latest -g\n```\n\nIf you have Node.js' experimental [Corepack](https://nodejs.org/dist/latest/docs/api/corepack.html) feature enabled, then you should skip the step `npm install yarn@latest -g` to install Yarn Classic globally. The RWA project is locally configured for `Corepack` to use Yarn Classic (version 1).\n\n#### Yarn Modern\n\n**This project is not compatible with [Yarn Modern](https://yarnpkg.com/) (version 2 and later).**\n\n### Installation\n\nTo clone the repo to your local system and install dependencies, execute the following commands:\n\n```shell\ngit clone https://github.com/cypress-io/cypress-realworld-app\ncd cypress-realworld-app\nyarn\n```\n\n#### Mac users with M-series chips will need to prepend `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true`.\n\n```shell\nPUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true yarn install\n```\n\n### Run the app\n\n```shell\nyarn dev\n```\n\n> 🚩 **Note**\n>\n> The app will run on port `3000` (frontend) and `3001` (API backend) by default. Please make sure there are no other applications or services running on both ports.\n> If you want to change the default ports, you can do so by modifying `PORT` and `VITE_BACKEND_PORT` variables in `.env` file.\n> However, make sure the modified port numbers in `.env` are not committed into Git since the CI environments still expect the application to run on the default ports.\n\n### Start Cypress\n\n```shell\nyarn cypress:open\n```\n\n> 🚩 **Note**\n>\n> If you have changed the default ports, then you need to update Cypress configuration file (`cypress.config.ts`) locally.\n> There are three properties that you need to update in `cypress.config.ts`: `e2e.baseUrl`, `env.apiUrl`, and `env.url`.\n> The port number in `e2e.baseUrl` corresponds to `PORT` variable in `.env` file. Similarly, the port number in `env.apiUrl` and `env.url` correspond to `VITE_BACKEND_PORT`.\n> For example, if you have changed `PORT` to `13000` and `VITE_BACKEND_PORT` to `13001` in `.env` file, then your `cypress.config.ts` should look similar to the following snippet:\n>\n> ```js\n> {\n>   env: {\n>     apiUrl: \"http://localhost:13001\",\n>     codeCoverage: {\n>       url: \"http://localhost:13001/__coverage__\"\n>     },\n>   },\n>   e2e: {\n>     baseUrl: \"http://localhost:13000\"\n>   }\n> }\n> ```\n>\n> Avoid committing the modified `cypress.config.ts` into Git since the CI environments still expect the application to be run on default ports.\n\n## Tests\n\n| Type      | Location                                 |\n| --------- | ---------------------------------------- |\n| api       | [cypress/tests/api](./cypress/tests/api) |\n| ui        | [cypress/tests/ui](./cypress/tests/ui)   |\n| component | [src/(next to component)](./src)         |\n| unit      | [`src/__tests__`](./src/__tests__)       |\n\n## Database\n\n- The local JSON database is located in [data/database.json](./data/database.json) and is managed with [lowdb].\n\n- The database is [reseeded](./data/database-seed.json) each time the application is started (via `yarn dev`). Database seeding is done in between each [Cypress End-to-End test](./cypress/tests).\n\n- Updates via the React frontend are sent to the [Express][express] server and handled by a set of [database utilities](backend/database.ts)\n\n- Generate a new database using `yarn db:seed`.\n\n- An [empty database seed](./data/empty-seed.json) is provided along with a script (`yarn start:empty`) to view the application without data.\n\n## Additional NPM Scripts\n\n| Script         | Description                                                                                                                                                                       |\n| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| dev            | Starts backend in watch mode and frontend                                                                                                                                         |\n| dev:coverage   | Starts backend in watch mode and frontend with instrumented code coverage enabled                                                                                                 |\n| dev:auth0      | Starts backend in watch mode and frontend; [Uses Auth0 for Authentication](#auth0) > [Read Guide](http://on.cypress.io/auth0)                                                     |\n| dev:okta       | Starts backend in watch mode and frontend; [Uses Okta for Authentication](#okta) > [Read Guide](http://on.cypress.io/okta)                                                        |\n| dev:cognito    | Starts backend in watch mode and frontend; [Uses Cognito for Authentication](#amazon-cognito) > [Read Guide](http://on.cypress.io/amazon-cognito)                                 |\n| dev:google     | Starts backend in watch mode and frontend; [Uses Google for Authentication](#google) > [Read Guide](https://docs.cypress.io/guides/testing-strategies/google-authentication.html) |\n| start          | Starts backend and frontend                                                                                                                                                       |\n| types          | Validates types                                                                                                                                                                   |\n| db:seed        | Generates fresh database seeds for json files in /data                                                                                                                            |\n| start:empty    | Starts backend, frontend and Cypress with empty database seed                                                                                                                     |\n| tsnode         | Customized ts-node command to get around react-scripts restrictions                                                                                                               |\n| list:dev:users | Provides id and username for users in the dev database                                                                                                                            |\n\nFor a complete list of scripts see [package.json](./package.json)\n\n## Code Coverage Report\n\nThe Cypress Real-World App uses the [@cypress/code-coverage](https://github.com/cypress-io/code-coverage) plugin to generate code coverage reports for the app frontend and backend.\n\nTo generate a code coverage report:\n\n1. Start the development server with coverage enabled by running `yarn dev:coverage`.\n2. Run `yarn cypress:run --env coverage=true` and wait for the test run to complete.\n3. Once the test run is complete, you can view the report at `coverage/index.html`.\n\n## 3rd Party Authentication Providers\n\nSupport for 3rd party authentication is available in the application to demonstrate the concepts on logging in with a 3rd party provider.\n\nThe app contains different entry points for each provider. There is a separate **index** file for each provider, and to use one, you must replace the current **index.tsx** file with the desired one. The following providers are supported:\n\n- [Auth0](#auth0) (index.auth0.tsx)\n- [Okta](#okta) (index.okta.tsx)\n- [Amazon Cognito](#amazon-cognito) (index.cognito.tsx)\n- [Google](#google) (index.google.tsx)\n\n### Auth0\n\nThe [Auth0](https://auth0.com/) tests have been rewritten to take advantage of our [`cy.session`](https://docs.cypress.io/api/commands/session) and [`cy.origin`](https://docs.cypress.io/api/commands/origin) commands.\n\nPrerequisites include an Auth0 account and a Tenant configured for use with a SPA. Environment variables from Auth0 are to be placed in the [.env](./.env). For more details see [Auth0 Application Setup](http://on.cypress.io/auth0#Auth0-Application-Setup) and [Setting Auth0 app credentials in Cypress](http://on.cypress.io/auth0#Setting-Auth0-app-credentials-in-Cypress).\n\nTo start the application with Auth0, replace the current **src/index.tsx** file with the **src/index.auth0.tsx** file and start the application with `yarn dev:auth0` and run Cypress with `yarn cypress:open`.\n\nThe only passing spec on this branch will be the [auth0 spec](./cypress/tests/ui-auth-providers/auth0.spec.ts); all others will fail. Please note that your test user will need to authorize your Auth0 app before the tests will pass.\n\n### Okta\n\nA [guide has been written with detail around adapting the RWA](http://on.cypress.io/okta) to use [Okta][okta] and to explain the programmatic command used for Cypress tests.\n\nPrerequisites include an [Okta][okta] account and [application configured for use with a SPA][oktacreateapp]. Environment variables from [Okta][okta] are to be placed in the [.env](./.env).\n\nTo start the application with Okta, replace the current **src/index.tsx** file with the **src/index.okta.tsx** file and start the application with `yarn dev:okta` and run Cypress with `yarn cypress:open`.\n\nThe **only passing spec on this branch** will be the [okta spec](./cypress/tests/ui-auth-providers/okta.spec.ts); all others will fail.\n\n### Amazon Cognito\n\nA [guide has been written with detail around adapting the RWA](http://on.cypress.io/amazon-cognito) to use [Amazon Cognito][cognito] as the authentication solution and to explain the programmatic command used for Cypress tests.\n\nPrerequisites include an [Amazon Cognito][cognito] account. Environment variables from [Amazon Cognito][cognito] are provided by the [AWS Amplify CLI][awsamplify].\n\n- A user pool is required (identity pool is not used here)\n  - The user pool must have a hosted UI domain configured, which must:\n    - allow callback and sign-out URLs of `http://localhost:3000/`,\n    - allow implicit grant Oauth grant type,\n    - allow these OpenID Connect scopes:\n      - aws.cognito.signin.user.admin\n      - email\n      - openid\n  - The user pool must have an app client configured, with:\n    - enabled auth flow `ALLOW_USER_PASSWORD_AUTH`, only for programmatic login flavor of test.\n    - The `cy.origin()` flavor of test only requires auth flow `ALLOW_USER_SRP_AUTH`, and does not require `ALLOW_USER_PASSWORD_AUTH`.\n  - The user pool must have a user corresponding to the `AWS_COGNITO` env vars mentioned below, and the user's Confirmation Status must be `Confirmed`. If it is `Force Reset Password`, then use a browser to log in once at `http://localhost:3000` while `yarn dev:cognito` is running to reset their password.\n\nThe test knobs are in a few places:\n\n- The `.env` file has `VITE_AUTH_TOKEN_NAME` and vars beginning `AWS_COGNITO`. Be careful not to commit any secrets.\n- Both `scripts/mock-aws-exports.js` and `scripts/mock-aws-exports-es5.js` must have the same data; only their export statements differ. These files can be edited manually or exported from the amplify CLI.\n- `cypress.config.ts` has `cognito_programmatic_login` to control flavor of the test.\n\nTo start the application with Cognito, replace the current **src/index.tsx** file with the **src/index.cognito.tsx** file and start the application with `yarn dev:cognito` and run Cypress with `yarn cypress:open`. `yarn dev` may need to have been run once first.\n\nThe **only passing spec on this branch** will be the [cognito spec](./cypress/tests/ui-auth-providers/cognito.spec.ts); all others will fail.\n\n### Google\n\nA [guide has been written with detail around adapting the RWA](https://docs.cypress.io/guides/testing-strategies/google-authentication.html) to use [Google][google] as the authentication solution and to explain the programmatic command used for Cypress tests.\n\nPrerequisites include an [Google][google] account. Environment variables from [Google][google] are to be placed in the [.env](./.env).\n\nTo start the application with Google, replace the current **src/index.tsx** file with the **src/index.google.tsx** file and start the application with `yarn dev:google` and run Cypress with `yarn cypress:open`.\n\nThe **only passing spec** when run with `yarn dev:google` will be the [google spec](./cypress/tests/ui-auth-providers/google.spec.ts); all others will fail.\n\n## License\n\n[![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/master/LICENSE)\n\nThis project is licensed under the terms of the [MIT license](/LICENSE).\n\n[reactjs]: https://reactjs.org\n[xstate]: https://xstate.js.org\n[express]: https://expressjs.com\n[lowdb]: https://github.com/typicode/lowdb\n[typescript]: https://typescriptlang.org\n[cypresscloud]: https://cloud.cypress.io/projects/7s5okt/runs\n[material-ui]: https://material-ui.com\n[okta]: https://okta.com\n[auth0]: https://auth0.com\n[oktacreateapp]: https://developer.okta.com/docs/guides/sign-into-spa/react/create-okta-application/\n[cognito]: https://aws.amazon.com/cognito\n[awsamplify]: https://amplify.aws\n[google]: https://google.com\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"http://www.kevinold.com\"><img src=\"https://avatars0.githubusercontent.com/u/21967?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Kevin Old</b></sub></a></td>\n    <td align=\"center\"><a href=\"https://twitter.com/amirrustam\"><img src=\"https://avatars0.githubusercontent.com/u/334337?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Amir Rustamzadeh</b></sub></a></td>\n    <td align=\"center\"><a href=\"https://twitter.com/be_mann\"><img src=\"https://avatars2.githubusercontent.com/u/1268976?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Brian Mann</b></sub></a></td>\n    <td align=\"center\"><a href=\"https://glebbahmutov.com/\"><img src=\"https://avatars1.githubusercontent.com/u/2212006?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Gleb Bahmutov</b></sub></a></td>\n    <td align=\"center\"><a href=\"http://www.bencodezen.io\"><img src=\"https://avatars0.githubusercontent.com/u/4836334?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Ben Hong</b></sub></a></td>\n    <td align=\"center\"><a href=\"https://github.com/davidkpiano\"><img src=\"https://avatars2.githubusercontent.com/u/1093738?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>David Khourshid</b></sub></a></td>\n  </tr>\n</table>\n\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!!\n","readmeFilename":"README.md"}