cypress-io / cypress-realworld-app Goto Github PK
View Code? Open in Web Editor NEWA payment application to demonstrate real-world usage of Cypress testing methods, patterns, and workflows.
Home Page: https://docs.cypress.io
License: MIT License
A payment application to demonstrate real-world usage of Cypress testing methods, patterns, and workflows.
Home Page: https://docs.cypress.io
License: MIT License
Assess existing resources and tests implemented during RWA build. Compile a list of test cases and concepts to be covered in the RWA for MVP.
Compelling test cases. Determine if accomplished in RWA tests or should be.
Covered in some form in RWA tests
Data Model
HTTP API
GET /users
GET /users/:user_id (permission: account owner)
GET /users/profile/:username (public info, authentication not required)
GET /users/search
POST /users
PATCH /users/:user_id
Please enable renovate bot for this repo
Various refactors to frontend to:
Cleanup variable names
Restructure components to containers
SignUp Component
SignIn Component
Layout Component
Transaction Detail page add the ability to
??? Transaction Item, if sender
Cancel Request
Tests
A user can filter transactions within the main feed by a specified date range via a date range picker UI.
More details about the date picker design standard here.
Get current rwa-react loose ends finalized and copy project as initial commit into pay-app.
Data Model
HTTP API
GET /transactions - scoped user, auth-required
GET /transactions/contacts - scoped user, auth-required
GET /transactions/public - auth-required
POST /transactions - scoped-user
PATCH /transactions/:transaction_id - scoped-user
Components
Side Navigation
Notification Indicator
Routing
Add test data endpoints /testData/:entity
to serve entity portion of data from database.test.json
Select Bank Account
Instant Transaction with Fee
No Fee Transaction
Tests
Like Transaction functionality
Implement pagination via infinite scroll for Transaction Lists for testing scenarios
Implement forgot password functionality
We selected lowdb because of it's easy to install footprint and base of json-server.
The configuration for running Jest tests has been adjusted to run them synchronously (via --runInBand
) due to failures when the unit test are run concurrently.
To date, the Cypress API tests have not had an issue.
Our primary goals for a database are:
Given this information, we may need to look to one of the following solutions (or others) to ensure tests can be run asynchronously.
After onboarding user lists do not have items; add "Empty State" UI instructing user to create their first:
Components
User List
Search People
Tests
Data Model
Dev Checklist
HTTP API
Backend
Test/Dev Data
Components
Top Tabs (Public, Friends, Personal)
Transaction Feeds (switch based on route)
Tests
Craft README with instructions / details for onboarding developers.
Minor cleanup to move the contents of routes into database methods:
Data Model
HTTP API
Components
Routes
State
Components
Notifications List (Main View)
Tests
Additional Ideas:
Data Model
Data
HTTP API
Dev Checklist
Data Model
Dev Checklist
Data Model
Dev Checklist
Data Model
HTTP API for all Notification data
[{
type: "payment" | "like" | "comment"
id: payment_notification_id | like_notification_id | comment_notification_id
}]
Create Transaction functionality
Data Model
HTTP API
Data Model
HTTP API
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These problems occurred while renovating this repository. View logs.
These updates are awaiting their schedule. Click on a checkbox to get an update now.
axios
, formik
)eslint
, eslint-plugin-cypress
, prettier
)@babel/core
, @babel/plugin-syntax-flow
)react
, react-dom
)@testing-library/jest-dom
, @testing-library/react
)These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
@faker-js/faker
, concurrently
, dotenv
, fuse.js
, jwks-rsa
, start-server-and-test
)@okta/jwt-verifier
, @okta/okta-auth-js
, @okta/okta-react
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@types/bcryptjs
, @types/bluebird
, @types/connect-flash
, @types/cors
, @types/detect-port
, @types/dinero.js
, @types/json-server
, @types/jsonwebtoken
, @types/lowdb
, @types/morgan
, @types/react-infinite-calendar
, @types/react-router
, @types/react-virtualized
, @types/shortid
)@cypress/code-coverage
, @percy/cli
, @testing-library/jest-dom
, @testing-library/react
, @types/connect-history-api-fallback
, @types/lodash
, @types/node
, @types/react
, @types/react-dom
, @types/validator
, @types/webpack-env
, @types/yup
, @vitejs/plugin-react
, cypress
, http-proxy-middleware
, npm
, vite
, vitest
)@faker-js/faker
, concurrently
, fuse.js
, husky
, jwks-rsa
, lowdb
, start-server-and-test
, uuid
, yup
)@types/http-proxy-middleware
, @types/jsonwebtoken
, @types/jwt-decode
, @types/uuid
)eslint
, eslint-config-prettier
, eslint-plugin-cypress
)express-jwt
, express-validator
, nodemon
)@graphql-tools/graphql-file-loader
, @graphql-tools/load
)@xstate/react
, xstate
)axios
, clsx
, date-fns
)history
, react-router
, react-router-dom
)These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
@material-ui/core
, @material-ui/icons
).circleci/config.yml
cypress 3.3.1
.github/workflows/add_issue_to_triage_board.yml
.github/workflows/main.yml
actions/checkout v4
cypress-io/github-action v6
actions/upload-artifact v4
actions/checkout v4
actions/download-artifact v4
cypress-io/github-action v6
actions/checkout v4
actions/download-artifact v4
cypress-io/github-action v6
actions/checkout v4
actions/download-artifact v4
cypress-io/github-action v6
actions/checkout v4
actions/download-artifact v4
cypress-io/github-action v6
.github/workflows/merge-develop-into-flake-demo.yml
actions/checkout v4
actions/github-script v7
.github/workflows/triage_new_comment_workflow.yml
.node-version
node 20.12.0
package.json
@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
@graphql-tools/graphql-file-loader 7.5.17
@graphql-tools/load 7.8.14
@material-ui/core 4.12.4
@material-ui/icons 4.11.3
@material-ui/lab 4.0.0-alpha.61
@matheusluizn/react-google-login ^5.1.6
@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.0
clsx 1.2.1
date-fns 2.30.0
detect-port ^1.5.1
dinero.js 1.9.1
formik 2.4.5
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
@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 2.15.1
eslint-plugin-prettier ^5.0.0
express 4.19.2
express-graphql 0.12.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-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
node ^18.0.0 || >=20.0.0
yarn 1.22.19
.nvmrc
node 20.12.0
Define and implement new user onboarding flow
Use https://fusejs.io/ to implement fuzzy search across username, first name, last name.
From #1
Components
Settings Form
Edit Profile
Tests
Starting the app for normal usage with pre-existing activity
yarn start
yarn db:seed:dev
Starting the app for normal usage with no activity (empty state)
yarn start:empty
yarn db:seed:empty
Starting the app for development
yarn dev
yarn start:dev
yarn db:seed:dev
Start the app just for testing
yarn test
yarn test:headless
yarn test:ci
yarn test:api
yarn test:unit
Full backend HTTP API:
Transaction Comment functionality
Create Comment form for Transaction
Tests
This master issue contains a list of Renovate updates and their statuses.
These updates are awaiting their schedule. Click on a checkbox to ignore the schedule.
@babel/cli
, @babel/plugin-transform-typescript
, @babel/preset-env
, @hapi/joi
, @material-ui/core
, @types/bcrypt
, @types/connect-flash
, @types/dotenv
, @types/express-session
, @types/express-validator
, @types/faker
, @types/hapi__joi
, @types/json-server
, @types/lodash
, @types/lowdb
, @types/morgan
, @types/passport
, @types/shortid
, @types/supertest
, @types/uuid
, @types/validator
, bcrypt
, connect-flash
, dotenv
, express-session
, express-validator
, faker
, libphonenumber-js
, nodemon
, passport
, passport-local
, shortid
, supertest
, ts-node
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@babel/cli
, @babel/plugin-transform-typescript
, @babel/preset-env
)Setup Passport Local Auth against User API
Per discussion, adding delays for all or various endpoint responses can aid in demonstrating how Cypress works.
The following snipped can be added to the Express JS app (app.ts
) to delay ALL route responses by 2 second:
// simulate delay response
app.use((req, res, next) => {
setTimeout(() => next(), 2000);
});
This middleware snippet can be added per route:
(req, res, next) => setTimeout(() => next(), 5000),
For instance:
//GET /transactions/public - auth-required
router.get(
"/public",
(req, res, next) => setTimeout(() => next(), 5000),
ensureAuthenticated,
validateMiddleware(isTransactionPublicQSValidator),
(req, res) => {
let transactions = !isEmpty(req.query)
? getPublicTransactionsByQuery(req.user?.id!, req.query)
: getPublicTransactionsDefaultSort(req.user?.id!);
res.status(200);
res.json({ transactions });
}
);
Components
Routing /user/:userId
User Public Profile Details
User Public Transactions Feed (visible to viewer)
Tests
Update UI to be Responsive and add Viewport testing scenarios.
From #1
Update all snake_case
variables to camelCase
Initial spec was for snake_case
API params, etc.
Per conversation with @amirrustam we'd like to move to camelCase
.
New Bank Account Button
Create Bank Account Form
Bank Accounts List
Delete Bank Account
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.