Skip to content

Commit 258acf1

Browse files
committed
fixing tests
1 parent 3440b80 commit 258acf1

6 files changed

Lines changed: 52 additions & 4 deletions

File tree

.github/workflows/release-electron.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,49 @@ permissions:
1010
contents: write # Required to create releases and upload assets
1111

1212
jobs:
13+
run-tests:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
24+
- name: Setup Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.11'
28+
29+
- name: Install frontend dependencies
30+
run: |
31+
cd benchmesh-serial-service/frontend
32+
npm ci
33+
34+
- name: Run frontend tests
35+
run: |
36+
cd benchmesh-serial-service/frontend
37+
npm run test -- --run
38+
39+
- name: Build frontend
40+
run: |
41+
cd benchmesh-serial-service/frontend
42+
npm run build
43+
44+
- name: Install backend dependencies
45+
run: |
46+
cd benchmesh-serial-service
47+
pip install -r requirements.txt
48+
49+
- name: Run backend tests
50+
run: |
51+
cd benchmesh-serial-service
52+
python -m pytest -v
53+
1354
create-release:
55+
needs: run-tests
1456
runs-on: ubuntu-latest
1557
outputs:
1658
upload_url: ${{ steps.create_release.outputs.upload_url }}

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
cd benchmesh-serial-service/frontend
2929
npm run lint || echo "Linting not configured"
3030
31+
- name: Run frontend tests
32+
run: |
33+
cd benchmesh-serial-service/frontend
34+
npm run test -- --run
35+
3136
- name: Build frontend
3237
run: |
3338
cd benchmesh-serial-service/frontend

benchmesh-serial-service/frontend/package-lock.json

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

benchmesh-serial-service/frontend/src/ui/classes/ELL/GenericELL.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useMeasurement } from '../../MeasurementContext'
44
// Generic Electronic Load component
55
// - Settings: Mode dropdown (like DMM) populated from /instruments/ELL/{device_id}
66
// - Readings: U/I/P displays (like PSU) with measurement checkboxes
7-
export function GenericELL({ channelPath }: { channelPath?: string }) {
7+
export function GenericELL({ channelPath, registry }: { channelPath?: string, registry?: any }) {
88
const apiBase = `${window.location.protocol}//${window.location.hostname}:57666`
99
const { registerSource } = useMeasurement()
1010

benchmesh-serial-service/frontend/src/ui/classes/PSU/GenericPSU.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useMeasurement } from '../../MeasurementContext'
55
// PSU face with two columns: Settings (editable V/A) and Readings (readonly V/A/P)
66
// - Settings: V and A stacked vertically. 5-digit display limit for both V and A (digits only; '.' not counted)
77
// - Readings: mirrors V and A and derives P = V*A, all readonly but styled identically
8-
export function GenericPSU({ channelPath }: { channelPath?: string }) {
8+
export function GenericPSU({ channelPath, registry }: { channelPath?: string, registry?: any }) {
99
const apiBase = `${window.location.protocol}//${window.location.hostname}:57666`
1010
const { registerSource } = useMeasurement()
1111

benchmesh-serial-service/frontend/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"strict": true,
1414
"types": ["vite/client"]
1515
},
16-
"include": ["src"]
16+
"include": ["src"],
17+
"exclude": ["src/**/*.test.tsx", "src/**/__tests__"]
1718
}

0 commit comments

Comments
 (0)