Skip to content

Commit

Permalink
add: finished code
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchelSt committed Aug 21, 2021
0 parents commit 750c881
Show file tree
Hide file tree
Showing 173 changed files with 81,121 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [{
"login": "kevinold",
"name": "Kevin Old",
"avatar_url": "https://avatars0.githubusercontent.com/u/21967?v=4",
"profile": "http://www.kevinold.com",
"contributions": []
},
{
"login": "amirrustam",
"name": "Amir Rustamzadeh",
"avatar_url": "https://avatars0.githubusercontent.com/u/334337?v=4",
"profile": "https://twitter.com/amirrustam",
"contributions": []
},
{
"login": "brian-mann",
"name": "Brian Mann",
"avatar_url": "https://avatars2.githubusercontent.com/u/1268976?v=4",
"profile": "https://cypress.io",
"contributions": []
},
{
"login": "bahmutov",
"name": "Gleb Bahmutov",
"avatar_url": "https://avatars1.githubusercontent.com/u/2212006?v=4",
"profile": "https://glebbahmutov.com/",
"contributions": []
},
{
"login": "bencodezen",
"name": "Ben Hong",
"avatar_url": "https://avatars0.githubusercontent.com/u/4836334?v=4",
"profile": "http://www.bencodezen.io",
"contributions": []
},
{
"login": "davidkpiano",
"name": "David Khourshid",
"avatar_url": "https://avatars2.githubusercontent.com/u/1093738?v=4",
"profile": "https://github.com/davidkpiano",
"contributions": []
}
],
"contributorsPerLine": 7,
"projectName": "cypress-realworld-app",
"projectOwner": "cypress-io",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true
}
1 change: 1 addition & 0 deletions .dccache

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
SEED_USERBASE_SIZE=5
SEED_CONTACTS_PER_USER=3
SEED_PAYMENTS_PER_USER=15
SEED_REQUESTS_PER_USER=10
SEED_BANK_ACCOUNTS_PER_USER=1
SEED_LIKES_PER_USER=2
SEED_COMMENTS_PER_USER=2
SEED_NOTIFICATIONS_PER_USER=5
SEED_BANK_TRANSFERS_PER_USER=5
SEED_DEFAULT_USER_PASSWORD=s3cret
PAGINATION_PAGE_SIZE=10

# Ports used by React (frontend) and Express (backend)
REACT_APP_PORT=3000
REACT_APP_BACKEND_PORT=3001

# Uncomment when testing with any of the Auth providers below
#REACT_APP_AUTH_TOKEN_NAME="authAccessToken"

# Auth0 Configuration to be added to .env when running "yarn dev:auth0"
#AUTH0_USERNAME="[email protected]"
#AUTH0_PASSWORD="s3cret1234$"
#AUTH0_CLIENT_SECRET="your-auth0-client-secret"
#REACT_APP_AUTH0_DOMAIN="your-auth0-domain.auth0.com"
#REACT_APP_AUTH0_CLIENTID="1234567890"
#REACT_APP_AUTH0_AUDIENCE="https://your-auth0-domain.auth0.com/api/v2/"
#REACT_APP_AUTH0_SCOPE="openid email profile"
#AUTH0_MGMT_API_TOKEN="YOUR-MANAGEMENT-API-TOKEN"


# Okta Configuration to be added to .env when running "yarn dev:okta"
#OKTA_USERNAME="[email protected]"
#OKTA_PASSWORD="s3cret1234$"
#REACT_APP_OKTA_DOMAIN="dev-your-domain-id.okta.com"
#REACT_APP_OKTA_CLIENTID="your-client-id"

# AWS Cognito #Okta Configuration to be added to .env when running "yarn dev:cognito"
# Additional config taken from aws-exports.js
#AWS_COGNITO_USERNAME="[email protected]"
#AWS_COGNITO_PASSWORD="s3cret1234$"
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.idea

npm-debug.log*
yarn-debug.log*
yarn-error.log*

cypress/videos
cypress/screenshots
.nyc_output

# Ignore env local files - https://create-react-app.dev/docs/adding-custom-environment-variables/#what-other-env-files-can-be-used
.env*.local

#amplify
amplify/\#current-cloud-backend
amplify/.config/local-*
amplify/mock-data
amplify/team-provider-info.json
amplify/backend/amplify-meta.json
amplify/backend/awscloudformation
build/
dist/
node_modules/
aws-exports.js
aws-exports-es5.js
awsconfiguration.json
amplifyconfiguration.json
amplify-build-config.json
amplify-gradle-config.json
amplifytools.xcconfig
74 changes: 74 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Install Cypress, then run all tests (in parallel)
stages:
- build
- test

# Set environment variables for folders in "cache" job settings for npm modules and Cypress binary
variables:
npm_config_cache: "$CI_PROJECT_DIR/.npm"
CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress"

# Cache using branch name
# https://gitlab.com/help/ci/caching/index.md
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .cache/*
- cache/Cypress
- node_modules
- build

# Install NPM dependencies and Cypress
install:
image: cypress/browsers:node14.17.0-chrome88-ff89
stage: build

script:
- yarn install --frozen-lockfile
# check Cypress binary path and cached versions
- npx cypress cache path
- npx cypress cache list
- yarn types
- yarn lint
- yarn test:unit:ci
- yarn build:ci

api-tests:
image: cypress/browsers:node14.17.0-chrome88-ff89
stage: test
parallel: 5
script:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser chrome --group "API" --spec "cypress/tests/api/*"

ui-chrome:
image: cypress/browsers:node14.17.0-chrome88-ff89
stage: test
parallel: 5
script:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser chrome --group "UI - Chrome" --spec "cypress/tests/ui/*"

ui-chrome-mobile:
image: cypress/browsers:node14.17.0-chrome88-ff89
stage: test
parallel: 5
script:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser chrome --group "UI - Chrome - Mobile" --spec "cypress/tests/ui/*" --config "viewportWidth=375,viewportHeight=667"

ui-firefox:
image: cypress/browsers:node14.17.0-chrome88-ff89
stage: test
parallel: 5
script:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser firefox --group "UI - Firefox" --spec "cypress/tests/ui/*"

ui-firefox-mobile:
image: cypress/browsers:node14.17.0-chrome88-ff89
stage: test
parallel: 5
script:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser firefox --group "UI - Firefox - Mobile" --spec "cypress/tests/ui/*" --config "viewportWidth=375,viewportHeight=667"
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.17.5
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.17.5
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore cache directory for GitLab builds
/cache

data
build
coverage
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"printWidth": 100,
"endOfLine": "auto"
}
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug CRA Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts",
"args": ["test", "--runInBand", "--no-cache", "--env=jsdom"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
network-timeout 500000
52 changes: 52 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributor Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [[email protected]](mailto:[email protected]). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

MIT License

Copyright (c) 2020 Cypress.io

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Thanks to team Cypress for this real world demo app ❤️

<a href="https://github.com/cypress-io/cypress-realworld-app">Original repo</a>
17 changes: 17 additions & 0 deletions amplify/.config/project-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"projectName": "cypressrealworldapp",
"version": "3.0",
"frontend": "javascript",
"javascript": {
"framework": "react",
"config": {
"SourceDir": "src",
"DistributionDir": "build",
"BuildCommand": "npm run-script build",
"StartCommand": "yarn dev:cognito"
}
},
"providers": [
"awscloudformation"
]
}
Loading

0 comments on commit 750c881

Please sign in to comment.