Skip to content

Commit ca765d6

Browse files
committed
add new scenario
1 parent 38abc76 commit ca765d6

File tree

16 files changed

+1561
-141
lines changed

16 files changed

+1561
-141
lines changed

.github/workflows/cypress.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: 🚀 Cypress API Tests
2+
3+
on:
4+
push:
5+
branches: [ main, master, develop ]
6+
pull_request:
7+
branches: [ main, master ]
8+
schedule:
9+
# Run tests daily at 6 AM UTC
10+
- cron: '0 6 * * *'
11+
12+
jobs:
13+
cypress-run:
14+
name: 🧪 Run API Tests
15+
runs-on: ubuntu-20.04
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
# Run tests on multiple Node.js versions
21+
node-version: [16.x, 18.x]
22+
23+
steps:
24+
- name: 📥 Checkout Repository
25+
uses: actions/checkout@v3
26+
27+
- name: 🔧 Setup Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: 'npm'
32+
33+
- name: 📦 Install Dependencies
34+
run: npm ci
35+
36+
- name: 🧪 Run Main API Tests
37+
run: npm run test:simple
38+
continue-on-error: false
39+
40+
- name: 🏷️ Run Brands API Tests
41+
run: npm run test:brands
42+
continue-on-error: true
43+
44+
- name: 📦 Run Products API Tests
45+
run: npm run test:products
46+
continue-on-error: true
47+
48+
- name: 🔄 Run Integration Tests
49+
run: npm run test:complete
50+
continue-on-error: true
51+
52+
- name: 📊 Upload Cypress Screenshots
53+
uses: actions/upload-artifact@v3
54+
if: failure()
55+
with:
56+
name: cypress-screenshots-${{ matrix.node-version }}
57+
path: cypress/screenshots
58+
retention-days: 30
59+
60+
- name: 📹 Upload Cypress Videos
61+
uses: actions/upload-artifact@v3
62+
if: always()
63+
with:
64+
name: cypress-videos-${{ matrix.node-version }}
65+
path: cypress/videos
66+
retention-days: 30

.gitignore

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,64 @@
1-
node_modules
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Cypress
8+
cypress/screenshots/
9+
cypress/videos/
10+
cypress/downloads/
11+
cypress/logs/
12+
13+
# Test results
14+
test-results/
15+
junit.xml
16+
mochawesome-report/
17+
18+
# Environment variables
19+
.env
20+
.env.local
21+
.env.development.local
22+
.env.test.local
23+
.env.production.local
24+
25+
# IDE files
26+
.vscode/
27+
.idea/
28+
*.swp
29+
*.swo
30+
*~
31+
32+
# OS generated files
33+
.DS_Store
34+
.DS_Store?
35+
._*
36+
.Spotlight-V100
37+
.Trashes
38+
ehthumbs.db
39+
Thumbs.db
40+
41+
# Logs
42+
*.log
243
temp/
3-
*.log
44+
45+
# Runtime data
46+
pids
47+
*.pid
48+
*.seed
49+
*.pid.lock
50+
51+
# Coverage directory used by tools like istanbul
52+
coverage/
53+
54+
# nyc test coverage
55+
.nyc_output
56+
57+
# Dependency directories
58+
jspm_packages/
59+
60+
# Optional npm cache directory
61+
.npm
62+
63+
# Optional REPL history
64+
.node_repl_history

0 commit comments

Comments
 (0)