Skip to content

Commit 1389c3b

Browse files
committed
Merge branch 'wip-gpccmp-behavioural-tests' of github.com:beda-software/smart-forms into wip-gpccmp-behavioural-tests
2 parents 8cb24ac + 7e64a22 commit 1389c3b

43 files changed

Lines changed: 1596 additions & 94 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Vitest GP CCMP Behaviour Tests
2+
3+
on: [workflow_dispatch, push, pull_request, workflow_call]
4+
5+
jobs:
6+
vitest-gpccmp-tests:
7+
name: Vitest Questionnaire Behaviour Tests - GP CCMP
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 20
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Use Node.js 20.x
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 20
16+
cache: npm
17+
- name: Install dependencies
18+
run: npm ci
19+
20+
- name: Build workspace packages (monorepo dependencies)
21+
run: |
22+
npm run build -w packages/sdc-assemble
23+
npm run build -w packages/sdc-populate
24+
npm run build -w packages/sdc-template-extract
25+
npm run build -w packages/smart-forms-renderer
26+
27+
- name: Typecheck
28+
run: npm run typecheck -w forms/gpccmp
29+
30+
- name: Run vitest tests
31+
run: npm run test -w forms/gpccmp

‎.gitignore‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ changelog_guide.md
66
.DS_STORE
77

88
# GitHub copilot instructions
9-
.github/copilot-instructions.md
9+
.github/copilot-instructions.md
10+
11+
.scratch

‎.prettierignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ storybook-static
88
*.js
99
*.config.*
1010
*.html
11+
12+
# Assembled questionnaire snapshots are artifacts, not source — see questionnaire/PROVENANCE.md
13+
forms/*/questionnaire/*.json

‎apps/smart-forms-app/Dockerfile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dockerfile
22

33
# Step 1: Use a Node.js image to build the app
4-
FROM --platform=$BUILDPLATFORM node:18 AS builder
4+
FROM --platform=$BUILDPLATFORM node:20 AS builder
55

66
# Set working directory inside the container
77
WORKDIR /app
@@ -21,6 +21,7 @@ COPY packages/sdc-assemble/package*.json ./packages/sdc-assemble/
2121
COPY packages/sdc-populate/package*.json ./packages/sdc-populate/
2222
COPY packages/sdc-template-extract/package*.json ./packages/sdc-template-extract/
2323
COPY packages/smart-forms-renderer/package*.json ./packages/smart-forms-renderer/
24+
COPY packages/questionnaire-test-toolkit/package*.json ./packages/questionnaire-test-toolkit/
2425
COPY apps/smart-forms-app/package*.json ./apps/smart-forms-app/
2526

2627
# Install all workspace dependencies from the root
@@ -31,6 +32,7 @@ COPY packages/sdc-assemble/ ./packages/sdc-assemble/
3132
COPY packages/sdc-populate/ ./packages/sdc-populate/
3233
COPY packages/sdc-template-extract/ ./packages/sdc-template-extract/
3334
COPY packages/smart-forms-renderer/ ./packages/smart-forms-renderer/
35+
COPY packages/questionnaire-test-toolkit/ ./packages/questionnaire-test-toolkit/
3436
COPY apps/smart-forms-app/ ./apps/smart-forms-app/
3537

3638
# Build packages in dependency order (mirrors deploy_app.yml)

‎apps/smart-forms-app/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"zustand": "^5.0.14"
7474
},
7575
"devDependencies": {
76+
"@aehrc/questionnaire-test-toolkit": "^0.1.0",
7677
"@jest/globals": "^30.3.0",
7778
"@playwright/test": "^1.60.0",
7879
"@sentry/cli": "^2.57.0",

‎apps/smart-forms-app/src/test/aboriginalFormCalculation.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
inputDecimal,
1010
getVisibleTab,
1111
checkRadioOption
12-
} from './testUtils.ts';
12+
} from '@aehrc/questionnaire-test-toolkit';
1313
import { AboriginalForm } from './aboriginalFormUtils.tsx';
1414

1515
vi.mock('fhirclient', () => ({

‎apps/smart-forms-app/src/test/aboriginalFormCompletedFor0To1Years.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
inputDecimal,
1515
getVisibleTab,
1616
inputDateTime
17-
} from './testUtils.ts';
17+
} from '@aehrc/questionnaire-test-toolkit';
1818
import { AboriginalForm } from './aboriginalFormUtils.tsx';
1919

2020
vi.mock('fhirclient', () => ({

‎apps/smart-forms-app/src/test/aboriginalFormCompletedFor12To6Years.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
inputDecimal,
1515
getVisibleTab,
1616
inputDateTime
17-
} from './testUtils.ts';
17+
} from '@aehrc/questionnaire-test-toolkit';
1818
import { AboriginalForm } from './aboriginalFormUtils.tsx';
1919

2020
vi.mock('fhirclient', () => ({

‎apps/smart-forms-app/src/test/aboriginalFormCompletedFor24To13Years.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
inputDecimal,
1515
getVisibleTab,
1616
inputDateTime
17-
} from './testUtils.ts';
17+
} from '@aehrc/questionnaire-test-toolkit';
1818
import { AboriginalForm } from './aboriginalFormUtils.tsx';
1919

2020
vi.mock('fhirclient', () => ({

‎apps/smart-forms-app/src/test/aboriginalFormCompletedFor49To25Years.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
inputDecimal,
1515
getVisibleTab,
1616
inputDateTime
17-
} from './testUtils.ts';
17+
} from '@aehrc/questionnaire-test-toolkit';
1818
import { AboriginalForm } from './aboriginalFormUtils.tsx';
1919

2020
vi.mock('fhirclient', () => ({

0 commit comments

Comments
 (0)