Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
9dcd46a
chore: update readme root folder name and add notes to gitignore
Davi-SB Nov 14, 2025
b82c3f7
fix: update package files to run easily on Windows
Davi-SB Nov 14, 2025
fbd6fd5
feat: add bulk enrollment endpoint with multer and xlsx
Davi-SB Nov 15, 2025
08cb370
feat: add bulk enrollment UI with file upload and result pages
Davi-SB Nov 15, 2025
ac90822
chore: update root package.json and test data
Davi-SB Nov 15, 2025
e276514
feat: add bulk enrollment UI with file upload and result pages
Davi-SB Nov 15, 2025
f618dbd
feat: add Report class for generating class reports
HeitorMelo Nov 16, 2025
51bdd79
feat: add backend route for reports
HeitorMelo Nov 16, 2025
1509494
feat: add Report and EvaluationPerformance interfaces
HeitorMelo Nov 16, 2025
362ca2e
feat: integrate Classes page with report endpoint
HeitorMelo Nov 16, 2025
6f68270
Merge branch 'main' into report-filters
GabrielVMayerhofer Nov 21, 2025
4056947
Merge branch 'main' into feat/class-report
HeitorMelo Nov 24, 2025
38bd03e
test: add *first* test for student import with Cypress and Cucumber
Davi-SB Nov 26, 2025
f0226c0
Merge branch 'feat/class-report' of https://github.com/HeitorMelo/tea…
GabrielVMayerhofer Nov 26, 2025
4018c26
test: add 2nd and 3rd scenario test for importStudentsToClass feature
Davi-SB Nov 27, 2025
edc6d45
fix: make server counts rejected students right
Davi-SB Nov 27, 2025
0ca9933
test: add all remaining scenarios and tests for import students to cl…
Davi-SB Nov 27, 2025
0eae30a
feat: add report filters on student list
GabrielVMayerhofer Nov 27, 2025
b9f07f6
refactor: restore app-data.json original version
Davi-SB Nov 28, 2025
b175cf4
test: add service scenarios and step definitions
Davi-SB Nov 28, 2025
bc5d115
feat: class-comparisson mostly working with new reportData interface
DaviDubeux Dec 7, 2025
cde36c3
Refactor: Reducing duplicate dependencies, and improved modularity
EduardoMab Dec 7, 2025
277e8a0
Merge branch 'main' into feat/class-report
HeitorMelo Dec 8, 2025
77ad639
fix(Report): update student status logic and add failedByAbsence count
HeitorMelo Dec 8, 2025
1e67da3
feat(Report): allow null/missing grade values in report interface and…
HeitorMelo Dec 8, 2025
9090fd5
fix(app-data.json, EspecificacaoDoCalculoDaMedia.ts): update grading …
HeitorMelo Dec 8, 2025
892d447
fix: button for selecting maximum number of classes working
DaviDubeux Dec 8, 2025
b06ab8a
refactor(ClassReport): extract client ClassReport into separate compo…
HeitorMelo Dec 8, 2025
11388df
fix(Report): Prevent displaying final grade for students with pending…
HeitorMelo Dec 8, 2025
b35de4b
fix(ClassReport): student results section with styled table and statu…
HeitorMelo Dec 8, 2025
696d2aa
fix(Report): exclude students with pending grades from class average …
HeitorMelo Dec 8, 2025
dc04949
fix(Report): add missing toJSON interface method
HeitorMelo Dec 8, 2025
98edd0b
fix(app-data): undo unwanted changes
HeitorMelo Dec 8, 2025
4f55c80
fix(Classes): import EspecificacaoDoCalculoDaMedia type for better ty…
HeitorMelo Dec 8, 2025
10f2c39
Merge remote-tracking branch 'upstream/feat/class-report' into feat/c…
DaviDubeux Dec 9, 2025
9246442
feat(dependencies): add recharts package for data visualization
HeitorMelo Dec 9, 2025
bea6e90
feat(text-utils): add wrapText function for multi-line text wrapping
HeitorMelo Dec 9, 2025
9d78e87
feat(charts): add StatusPieChart and EvaluationBarChart components wi…
HeitorMelo Dec 9, 2025
ef6d07e
fix(charts): adjust chart alignment and fix visibility of empty-state…
HeitorMelo Dec 9, 2025
7fb0d8c
Merge pull request #4 from HeitorMelo/feat/class-report
HeitorMelo Dec 9, 2025
5f96167
fix: updated renamed variable reportData
DaviDubeux Dec 9, 2025
b729a99
fix(ClassReport): update status class name formatting to replace all …
HeitorMelo Dec 9, 2025
fd7a125
Merge pull request #6 from HeitorMelo/fix/report-status-name-formatting
HeitorMelo Dec 9, 2025
3dbd03a
refactor: Created file ClassComparisson.tsx for better modularity
DaviDubeux Dec 9, 2025
3ed1f1a
Merge pull request #7 from HeitorMelo/feat/report-charts
HeitorMelo Dec 9, 2025
e8169b9
refactor: made class addition and removal appear in all comparisson v…
DaviDubeux Dec 9, 2025
4c9881f
tests: add report filters server and GUI tests
GabrielVMayerhofer Dec 9, 2025
f044a78
Cypress funcionando
EduardoMab Dec 9, 2025
b3c5240
merge wth report filters feature
GabrielVMayerhofer Dec 9, 2025
ba13238
feat: Testes de unidade adicionados
EduardoMab Dec 9, 2025
cdedb61
Terminados os testes
EduardoMab Dec 9, 2025
92d551b
All tests done
EduardoMab Dec 9, 2025
b86c424
fix merging mistakes
GabrielVMayerhofer Dec 10, 2025
a045d83
Merge pull request #8 from GabrielVMayerhofer/main
HeitorMelo Dec 10, 2025
0422572
fix: handle undefined percent in custom label rendering
HeitorMelo Dec 10, 2025
e803757
Merge pull request #10 from HeitorMelo/fix/pie-chart-label
HeitorMelo Dec 10, 2025
25c4195
feat(tests): add cucumber integration, service, and unit tests for da…
HeitorMelo Dec 10, 2025
dddfcbd
feat(tests): add E2E tests for pie and bar chart data verification
HeitorMelo Dec 10, 2025
1caa810
Refactor: integration and service tests for data persistence and repo…
HeitorMelo Dec 10, 2025
32d62a6
Refactor: code structure for improved readability and maintainability
HeitorMelo Dec 10, 2025
47a72cd
feat(tests): enhance E2E and integration tests for improved data vali…
HeitorMelo Dec 10, 2025
bad6b15
refactor: remove unnecessary app-data modifications
HeitorMelo Dec 10, 2025
92899b7
Merge upstream/main: integrate reports feature with bulk import
Davi-SB Dec 10, 2025
247edec
docs: add local documentation files to .gitignore
Davi-SB Dec 10, 2025
af8f101
feat(tests): implement cleanup logic in After hooks for better debugging
HeitorMelo Dec 10, 2025
9b84ecc
docs: folder name on readme
Davi-SB Dec 10, 2025
61a7bcc
fix: address code review feedback
Davi-SB Dec 10, 2025
10f5ad3
chore: remove draft files
Davi-SB Dec 10, 2025
9a676cb
Merge branch 'main' of https://github.com/Davi-SB/Teaching-Assistant-…
Davi-SB Dec 10, 2025
36957d5
fix: restore server/client scripts and upload_dir configuration
Davi-SB Dec 11, 2025
ada87bb
Merge pull request #11 from Davi-SB/main
HeitorMelo Dec 11, 2025
69b757a
Merge pull request #12 from HeitorMelo/feat/report-tests
HeitorMelo Dec 11, 2025
890d73b
refactor: improved test documentation and fixed 'comparisson' typos
DaviDubeux Dec 12, 2025
357780a
refactor: updated test documentation in the server folder
DaviDubeux Dec 12, 2025
5c72081
refactor: moved classComparison functions to ClassComparison.tsx file
DaviDubeux Dec 14, 2025
05d8e13
fix: deprecated cucumber tests working again
DaviDubeux Dec 14, 2025
7f793e3
Merged upstream main onto branch /feat/class-report
DaviDubeux Dec 15, 2025
5c5846d
fix: all features and tests working
DaviDubeux Dec 15, 2025
a32a8db
Merge pull request #9 from EduardoMab/feat/class-report
HeitorMelo Dec 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions .cypress-cucumber-preprocessorrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"stepDefinitions": [
"cypress/e2e/stepDefinitions/**/*.js"
],
"messages": {
"enabled": false
}
}
55 changes: 51 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,60 @@
# Dependencies
node_modules/
package-lock.json

# Build outputs
server/dist/
client/build/

# Cucumber test reports
# TypeScript
*.tsbuildinfo

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

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Environment
.env
.env.local

# Test files
test-*.csv
test-*.xlsx
test-*.js

# Cypress
cypress/videos/
cypress/screenshots/
cypress/downloads/

# Cucumber test reports (client-side)
client/reports/
cucumber-report.*

# jest coverage directory
# Jest coverage directory
coverage/

# multer folder
tmp_data/
# Multer temporary folder
tmp_data/

# Notes
notes/

# Extra (local documentation files)
commit_log.txt
demo.csv
diff_log.txt
FEATURE_SUMMARY.md
107 changes: 107 additions & 0 deletions CYPRESS_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Cypress + Cucumber Setup Guide

## Installation Steps

### 1. Install Dependencies

Run the following command from the project root:

```bash
npm install
```

This will install Cypress 15.7.0 and the Cucumber preprocessor along with all required dependencies.

### 2. Verify Installation

Check that Cypress was installed successfully:

```bash
npx cypress --version
```

You should see output similar to:
```
Cypress package version: 15.7.0
Cypress binary version: 15.7.0
```

### 3. Project Structure

The following structure has been created:

```
cypress/
├── e2e/
│ ├── features/ # Gherkin .feature files go here
│ │ └── placeholder.feature
│ └── stepDefinitions/ # Step definition .js files go here
│ └── placeholder.js
├── fixtures/ # Test data files (CSV, JSON, etc.)
├── support/
│ ├── commands.js # Custom Cypress commands
│ └── e2e.js # Global configuration
└── README.md

Root files:
├── cypress.config.js # Main Cypress configuration
└── .cypress-cucumber-preprocessorrc.json # Cucumber preprocessor config
```

### 4. Running Tests

Make sure both server and client are running before executing tests:

**Terminal 1 - Start Server:**
```bash
cd server
npm run dev
```

**Terminal 2 - Start Client:**
```bash
cd client
npm start
```

**Terminal 3 - Run Cypress Tests:**

Interactive mode (Test Runner UI):
```bash
npm run cypress:open
```

Headless mode (CI/CD):
```bash
npm run cypress:run
```

### 5. Next Steps

The structure is now ready. You can:
- Add actual `.feature` files in `cypress/e2e/features/`
- Implement step definitions in `cypress/e2e/stepDefinitions/`
- Add test fixtures (upload files, etc.) in `cypress/fixtures/`

### Configuration Details

**cypress.config.js:**
- Base URL: `http://localhost:3004` (React client)
- Spec pattern: `cypress/e2e/features/**/*.feature`
- Cucumber preprocessor integration with Browserify

**.cypress-cucumber-preprocessorrc.json:**
- Step definitions path: `cypress/e2e/stepDefinitions/**/*.js`
- Uses require() syntax as per Cucumber preprocessor standards

**Custom Commands (cypress/support/commands.js):**
- `cy.cleanupTestData()` - Delete test data via API
- `cy.createTestClass()` - Create a class via API
- `cy.createTestStudent()` - Create a student via API

### Important Notes

1. **Syntax:** Always use `const { Given, When, Then } = require("@badeball/cypress-cucumber-preprocessor");`
2. **Language:** Code in English, with explanatory comments
3. **Self-contained tests:** Create and cleanup data within each test
4. **API endpoints:** Server runs on port 3001, Client on port 3004
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,57 @@ The server provides a REST API:

The application uses ports 3005 and 3004 to avoid conflicts with other applications that might be using ports 3000-3003.

## Running Cucumber Tests

### Method 1: Using the Test Runner Script (Recommended)

```bash
# From the client directory
./run-cucumber-tests.sh
```

This script will:
- Check if both server and client are running
- Run all Cucumber tests
- Generate HTML and JSON reports

### Method 2: Manual Execution

```bash
# From the client directory
npm run test -- --watchAll
```

### Details

Testing with cucumber is further detailed in the /client/CUCUMBER_TESTING.md file.

## Running Cypress Tests

### Option 1: Interactive Mode (Cypress Test Runner)

Open the Cypress Test Runner UI:
```bash
npx cypress run open
```

1. Select "E2E Testing"
2. Choose your browser
3. Click on `classComparison.feature`
4. Watch the test run in real-time

### Option 2: Headless Mode (CI/CD)

Run all tests in headless mode:
```bash
npx cypress run
```

Or run a specific feature, e.g.:
```bash
npx cypress run --spec "cypress/e2e/features/classComparison.feature"
```

## License

ISC
9 changes: 1 addition & 8 deletions client/CUCUMBER_TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@ This script will:

```bash
# From the client directory
npm run test:cucumber
```

### Method 3: Watch Mode (for development)

```bash
# From the client directory
npm run test:cucumber:watch
npm run test -- --watchAll
```

## 🧪 Test Structure
Expand Down
5 changes: 2 additions & 3 deletions client/cucumber.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
default: {
requireModule: ['ts-node/register'],
require: [
'ts-node/register',
'src/step-definitions/**/*.ts'
],
format: [
Expand All @@ -12,7 +12,6 @@ module.exports = {
formatOptions: {
snippetInterface: 'async-await'
},
paths: ['src/features/**/*.feature'],
requireModule: ['ts-node/register']
paths: ['src/features/**/*.feature']
}
};
Loading