Skip to content

Commit

Permalink
Merge pull request #17 from muratkeremozcan/test-ui-bck
Browse files Browse the repository at this point in the history
Test UI bck
  • Loading branch information
muratkeremozcan committed Sep 19, 2023
2 parents 7693b4a + 4edca50 commit ffd0d93
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 114 deletions.
Binary file modified .DS_Store
Binary file not shown.
21 changes: 12 additions & 9 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ jobs:
with:
browser: chrome
install: false
# record: true
# group: e2e-tests
# tag: branch-backend
record: true
group: e2e-tests
tag: branch-backend
working-directory: infrastructure
env:
CYPRESS_RECORD_KEY: ${{ secrets.API_CYPRESS_RECORD_KEY }}

# in case you cannot export env vars, use this
- name: Get S3 bucket website URL
Expand All @@ -104,13 +106,14 @@ jobs:
browser: chrome
install: false
config: baseUrl=${{ env.FrontendUrl }}
# record: true
# group: e2e-tests
# tag: branch-front-end
working-directory:
web
record: true
group: e2e-tests
tag: branch-front-end
working-directory: web
env:
CYPRESS_RECORD_KEY: ${{ secrets.UI_CYPRESS_RECORD_KEY }}

# Schema verification
# Schema verification
- name: verify the schema with Optic
run: |
cd infrastructure
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/dev-stage-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ jobs:
with:
browser: chrome
install: false
# record: true
# group: e2e-tests
# tag: branch-backend
record: true
group: e2e-tests
tag: branch-backend
working-directory: infrastructure
env:
CYPRESS_RECORD_KEY: ${{ secrets.API_CYPRESS_RECORD_KEY }}

# in case you cannot export env vars, use this
- name: Get website URL
Expand All @@ -113,7 +115,9 @@ jobs:
browser: chrome
install: false
config: baseUrl=${{ env.FrontendUrl }}
# record: true
# group: e2e-tests
# tag: branch-front-end
record: true
group: e2e-tests
tag: branch-front-end
working-directory: web
env:
CYPRESS_RECORD_KEY: ${{ secrets.UI_CYPRESS_RECORD_KEY }}
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ yarn build:branch
yarn cdk:branch deploy
yarn cdk:branch destroy
yarn cdk:synth-branch

# at infrastructure folder
yarn cy:open
# at web folder
yarn cy:open-branch
```

### Dev Environment
Expand All @@ -63,6 +68,11 @@ yarn build:dev
yarn cdk:dev deploy
yarn cdk:dev destroy
yarn cdk:synth

# at infrastructure folder
yarn cy:open
# at web folder
yarn cy:open
```

### Stage Environment
Expand All @@ -73,6 +83,11 @@ yarn build:stage
yarn cdk:stage deploy
yarn cdk:stage destroy
yarn cdk:synth-stage

# at infrastructure folder
yarn cy:open
# at web folder
yarn cy:open-stage
```

### Production Environment
Expand Down
1 change: 1 addition & 0 deletions infrastructure/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import tasks from './cypress/support/tasks'
require('dotenv').config()

export default defineConfig({
projectId: '98jgjt',
viewportWidth: 1380,
viewportHeight: 1080,
retries: {
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"aws-cdk": "2.34.0",
"cross-env": "7.0.3",
"cy-spok": "^1.6.2",
"cypress": "^12.17.4",
"cypress": "13.2.0",
"cypress-map": "^1.21.1",
"dotenv-cli": "^7.3.0",
"eslint": "8.20.0",
Expand Down
43 changes: 24 additions & 19 deletions infrastructure/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1732,10 +1732,10 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"

"@cypress/request@2.88.12":
version "2.88.12"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.12.tgz#ba4911431738494a85e93fb04498cb38bc55d590"
integrity sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==
"@cypress/request@^3.0.0":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960"
integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.8.0"
Expand All @@ -1750,7 +1750,7 @@
json-stringify-safe "~5.0.1"
mime-types "~2.1.19"
performance-now "^2.1.0"
qs "~6.10.3"
qs "6.10.4"
safe-buffer "^5.1.2"
tough-cookie "^4.1.3"
tunnel-agent "^0.6.0"
Expand Down Expand Up @@ -2777,7 +2777,7 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.6.tgz#0296e9a30b22d2a8fcaa48d3c45afe51474ca55b"
integrity sha512-fGmT/P7z7ecA6bv/ia5DlaWCH4YeZvAQMNpUhrJjtAhOhZfoxS1VLUgU2pdk63efSjQaOJWdXMuAJsws+8I6dg==

"@types/node@^16.18.39", "@types/node@^16.7.10":
"@types/node@^16.7.10":
version "16.18.46"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.46.tgz#9f2102d0ba74a318fcbe170cbff5463f119eab59"
integrity sha512-Mnq3O9Xz52exs3mlxMcQuA7/9VFe/dXcrgAyfjLkABIqxXKOgBRjyazTxUbjsxDa4BP7hhPliyjVTP9RDP14xg==
Expand All @@ -2787,6 +2787,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190"
integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==

"@types/node@^18.17.5":
version "18.17.17"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.17.tgz#53cc07ce582c9d7c5850702a3c2cb0af0d7b0ca1"
integrity sha512-cOxcXsQ2sxiwkykdJqvyFS+MLQPLvIdwh5l6gNg8qF6s+C7XSkEWOZjK+XhUZd+mYvHV/180g2cnCcIl4l06Pw==

"@types/prettier@2.6.0":
version "2.6.0"
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.0.tgz#efcbd41937f9ae7434c714ab698604822d890759"
Expand Down Expand Up @@ -4269,14 +4274,14 @@ cypress-map@^1.21.1:
dependencies:
string-format "^2.0.0"

cypress@^12.17.4:
version "12.17.4"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.4.tgz#b4dadf41673058493fa0d2362faa3da1f6ae2e6c"
integrity sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==
cypress@13.2.0:
version "13.2.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.2.0.tgz#10f73d06a0764764ffbb903a31e96e2118dcfc1d"
integrity sha512-AvDQxBydE771GTq0TR4ZUBvv9m9ffXuB/ueEtpDF/6gOcvFR96amgwSJP16Yhqw6VhmwqspT5nAGzoxxB+D89g==
dependencies:
"@cypress/request" "2.88.12"
"@cypress/request" "^3.0.0"
"@cypress/xvfb" "^1.2.4"
"@types/node" "^16.18.39"
"@types/node" "^18.17.5"
"@types/sinonjs__fake-timers" "8.1.1"
"@types/sizzle" "^2.3.2"
arch "^2.2.0"
Expand Down Expand Up @@ -8024,20 +8029,20 @@ qs@6.10.3:
dependencies:
side-channel "^1.0.4"

qs@6.10.4:
version "6.10.4"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.4.tgz#6a3003755add91c0ec9eacdc5f878b034e73f9e7"
integrity sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==
dependencies:
side-channel "^1.0.4"

qs@6.11.0:
version "6.11.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
dependencies:
side-channel "^1.0.4"

qs@~6.10.3:
version "6.10.5"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.5.tgz#974715920a80ff6a262264acd2c7e6c2a53282b4"
integrity sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ==
dependencies:
side-channel "^1.0.4"

querystring@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
Expand Down
1 change: 1 addition & 0 deletions web/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const apiUrl = `https://${backend_subdomain}.${domain_name}`
console.log({deployment, apiUrl})

export default defineConfig({
projectId: '6pohtd',
viewportWidth: 1380,
viewportHeight: 1080,
retries: {
Expand Down

0 comments on commit ffd0d93

Please sign in to comment.