Skip to content

Commit b091f39

Browse files
committed
some cleanup
1 parent a7554e2 commit b091f39

File tree

9 files changed

+46
-1922
lines changed

9 files changed

+46
-1922
lines changed

apps/intake/tests/CONFIG_AWARE_TESTING_ARCHITECTURE.md

Lines changed: 17 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,8 @@ Example for baseline config:
127127

128128
**Key Functions:**
129129
```typescript
130-
executeBookingScenario(page, scenario, config)
131-
Runs complete flow: homepagecategorypatient infolocationconfirm
132-
133-
testScenarioStep(page, scenario, config, step)
134-
Tests one step in isolation within scenario context
135-
Steps: 'service-category' | 'patient-info' | 'location' | 'time-slot' | 'paperwork'
130+
executeBookingScenario(page, scenario, locationName)
131+
Runs complete flow: homepagecategorypatient infolocationtime slotpaperworkconfirm
136132
```
137133

138134
## Test Organization
@@ -152,31 +148,13 @@ Validate that helpers correctly derive expectations from config without browser
152148

153149
**Test Structure:**
154150
```typescript
155-
1. Homepage Option Rendering (3 tests)
156-
- Baseline: all options visible
157-
- InPersonOnly: only in-person options
158-
- VirtualOnly: only virtual options
159-
160-
2. Complete Booking Flows (12 tests for baseline)
161-
- One test per scenario permutation
162-
- All run in parallel
163-
164-
3. Service Category Selection (4 tests)
165-
- One per homepage option
166-
- Tests multi-category vs single-category behavior
167-
168-
4. Patient Info Form (12 tests)
169-
- One per scenario
170-
- Validates visible/hidden fields per config
171-
172-
5. Location Selection (12 tests)
173-
- One per scenario
174-
175-
6. Time Slot Selection (6 tests)
176-
- Only for prebook scenarios
177-
178-
7. Cross-Config Validation (5 tests)
179-
- Validates scenario generation correctness
151+
Complete Booking Flows (dynamically generated)
152+
- One comprehensive test per scenario permutation
153+
- Covers full flow: homepageservice categorypatient infolocationtime slotpaperworkconfirmation
154+
- All tests run in parallel with isolated test resources
155+
- Scenarios include:
156+
- Capability configs: baseline flows (walk-in/prebook × in-person/virtual)
157+
- Concrete configs: instance-specific paperwork variations (occ-med, workers-comp)
180158
```
181159

182160
## How It Works: Flow Example
@@ -257,23 +235,9 @@ test('start-virtual-visit → urgent-care - complete flow', async ({ page }) =>
257235
```
258236

259237
### To add a new test step:
260-
1. Add step logic to `BookingTestFactory.ts`:
261-
```typescript
262-
case 'new-step':
263-
// Navigate to step and validate
264-
break;
265-
```
266-
267-
2. Generate tests for the step:
268-
```typescript
269-
test.describe('New step - per scenario', () => {
270-
for (const scenario of scenarios) {
271-
test(`${scenario.description} - new step`, async ({ page }) => {
272-
await testScenarioStep(page, scenario, config, 'new-step');
273-
});
274-
}
275-
});
276-
```
238+
1. Add step logic to `executeBookingScenario` in `BookingTestFactory.ts`
239+
2. Update the scenario flow to include the new step
240+
3. If needed, add helper functions to `BookingFlowHelpers.ts`
277241

278242
### To add a new page helper:
279243
1. Add to `BookingFlowHelpers.ts`:
@@ -362,17 +326,16 @@ CAPABILITY_TEST_CONFIGS = {
362326

363327
## Next Steps
364328

365-
### Immediate
329+
### Completed
366330
1. ✅ Add navigation logic to existing test stubs
367331
2. ✅ Verify all generated tests pass with actual app
368332
3. ✅ Add paperwork step to flow execution
333+
4. ✅ Add concrete config support (instance-specific paperwork variations)
334+
5. ✅ Test questionnaire deployment for concrete configs
335+
6. ✅ Parallel test execution with isolated test resources
369336

370337
### Future Enhancements
371-
1. Add paperwork capability configs (different field sets)
372-
2. Generate negative test scenarios (validation errors)
373-
3. Add location-specific variations
374-
4. Cross-browser test matrix
375-
5. Performance benchmarking per scenario
338+
1. Connect test flow output to EHR-side tests to validate the handoff between intake and EHR
376339

377340
## Evolution Log
378341

apps/intake/tests/PAGED_QUESTIONNAIRE_HELPER_DESIGN.md

Lines changed: 0 additions & 229 deletions
This file was deleted.

0 commit comments

Comments
 (0)