Skip to content

Commit 518448e

Browse files
committed
tests Agregar test suites para asegurar estabilidad y facilitar refactorizaciones #18
1 parent c3753ea commit 518448e

File tree

4,253 files changed

+557560
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,253 files changed

+557560
-1
lines changed

.github/workflows/tests.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.x'
23+
24+
- name: Install Python dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
29+
- name: Run backend tests
30+
run: pytest tests/backend
31+
32+
- name: Set up Node.js
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: '16'
36+
37+
- name: Install Node.js dependencies
38+
run: |
39+
npm ci
40+
41+
- name: Run frontend tests
42+
run: npm test
43+
44+
- name: Install Playwright Browsers
45+
run: npx playwright install

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,7 @@ fabric.properties
228228
.idea/httpRequests
229229

230230
# Android studio 3.1+ serialized cache file
231-
.idea/caches/build_file_checksums.ser
231+
.idea/caches/build_file_checksums.ser
232+
233+
# Test-related files
234+
playwright-report/

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,26 @@ The application will be available at `http://127.0.0.1:5000`
7171
7272
![Price Histogram](media/chocolate_histogram.png)
7373

74+
## Running Tests
75+
76+
### Backend Tests
77+
To run backend tests, use the following command:
78+
```
79+
pytest tests/backend
80+
```
81+
82+
### Frontend Tests
83+
To run frontend tests, use the following command:
84+
```
85+
npm test
86+
```
87+
88+
### End-to-End Tests
89+
To run E2E tests, use the following command:
90+
```
91+
npx playwright test
92+
```
93+
7494
## Technologies Used
7595

7696
- **Flask**: Web framework for Python.

node_modules/.bin/acorn

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/browserslist

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/create-jest

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/escodegen

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/esgenerate

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/esparse

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/esvalidate

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)