@@ -828,7 +828,8 @@ Add tracking for:
828828
829829### User Scenarios
830830
831- ** ID Search Mode:**
831+ #### ID Search Mode
832+
8328331 . ** Single Animal Search (Direct ID)**
833834 - Navigate to Animal History page
834835 - Verify default state: ID Search mode active with empty textarea
@@ -897,7 +898,8 @@ Add tracking for:
897898 - Verify resolution finds ID regardless of stored casing
898899 - Enter same ID in uppercase, verify same result
899900
900- ** All Records Mode:**
901+ ### All Records Mode
902+
90190310 . ** View All Animals**
902904 - Click "All Records" button
903905 - Verify ID input textarea is cleared and hidden
@@ -911,7 +913,8 @@ Add tracking for:
911913 - Verify All Records mode is active
912914 - Verify all animals shown
913915
914- ** Alive at Center Mode:**
916+ ### Alive at Center Mode
917+
91591812 . ** View Alive Animals (Supported Report)**
916919 - Navigate to report with ` supportsNonIdFilters = true `
917920 - Verify "Alive at Center" button is enabled
@@ -938,7 +941,8 @@ Add tracking for:
938941 - Verify "Alive at Center" button becomes enabled again
939942 - Verify alive-only filter reapplies
940943
941- ** URL Params Mode (Read-Only):**
944+ ### URL Params Mode (Read-Only)
945+
94294615 . ** Shared Link with Subjects**
943947 - Perform ID search for 3 animals, get results
944948 - Generate shareable URL with ` readOnly=true ` parameter
@@ -974,7 +978,8 @@ Add tracking for:
974978 - Verify subjects pre-populated in textarea (editable)
975979 - Verify filter toggle buttons visible
976980
977- ** Filter Mode Switching:**
981+ ### Filter Mode Switching
982+
97898319 . ** ID Search → All Records**
979984 - Enter 5 animal IDs, click "Update Report"
980985 - Verify reports show 5 animals
@@ -1010,7 +1015,8 @@ Add tracking for:
10101015 - Verify returns to All Records mode
10111016 - Verify state and URL hash sync correctly
10121017
1013- ** Cross-Report Consistency:**
1018+ ### Cross-Report Consistency
1019+
1014102024 . ** Data Consistency Across Report Types**
10151021 - Search for 3 animals
10161022 - Navigate through all report tabs (Demographics, Weight, Housing, etc.)
@@ -1026,39 +1032,45 @@ Add tracking for:
10261032
10271033### Error Cases
10281034
1029- ** ID Resolution Errors:**
1035+ #### ID Resolution Errors
1036+
10301037* All IDs invalid/not found - verify "Not Found" section only, no reports data
10311038* Network error during resolution - verify error message displayed, user can retry
10321039* Timeout during long-running alias query (e.g., 100 IDs) - verify timeout error with retry option
10331040* Permission denied to demographics/alias tables - verify appropriate error message
10341041* Malformed IDs with special characters (e.g., "###", "*** ") - verify treated as literal ID string, appears in "Not Found" section
10351042* IDs with SQL injection patterns (e.g., "'; DROP TABLE--") - verify treated as literal string, no security issue
10361043
1037- ** Validation Errors:**
1044+ #### Validation Errors
1045+
10381046* Empty ID input - verify validation message: "Please enter at least one animal ID"
10391047* Whitespace-only input - verify treated as empty, validation error shown
10401048* 101+ IDs entered - verify limit error and disabled button
10411049
1042- ** Report Loading Errors:**
1050+ #### Report Loading Errors
1051+
10431052* Report query fails - verify error message in report panel, other tabs still accessible
10441053* No data for selected animals - verify "No data found" message
10451054* Report doesn't support filter mode - verify appropriate message or disabled state
10461055
1047- ** URL/Navigation Errors:**
1056+ #### URL/Navigation Errors
1057+
10481058* URL with ` readOnly=true ` but no subjects - verify defaults to All Records mode or shows error
10491059* Malformed URL hash - verify defaults to ID Search mode with no subjects
10501060* URL with conflicting parameters (e.g., ` readOnly=true ` AND ` filterType=all ` ) - verify ` readOnly ` takes priority, switches to urlParams mode
10511061* URL hash exceeds browser limit (~ 2000 chars with many subjects) - verify graceful degradation or error
10521062* Browser back/forward with filter changes - verify state maintained correctly
10531063
1054- ** Permission Errors:**
1064+ #### Permission Errors
1065+
10551066* User lacks folder read permission - verify redirect to permission denied page
10561067* User lacks dataset permissions - verify reports show "permission denied" for those datasets
10571068* Shared URL accessed by user without permissions - verify appropriate error message
10581069
10591070### Accessibility Scenarios
10601071
1061- ** Keyboard Navigation:**
1072+ #### Keyboard Navigation
1073+
1062107426 . ** Keyboard-Only Operation**
10631075 - Navigate Animal History page using only keyboard (Tab, Enter, Space)
10641076 - Verify all filter buttons accessible via Tab
@@ -1067,7 +1079,8 @@ Add tracking for:
10671079 - Verify focus indicators clearly visible
10681080 - Verify logical tab order through interface
10691081
1070- ** Screen Reader Compatibility:**
1082+ #### Screen Reader Compatibility
1083+
1071108427 . ** Screen Reader Accessibility**
10721085 - Use screen reader (NVDA/JAWS) to navigate page
10731086 - Verify filter mode changes announced
@@ -1097,13 +1110,15 @@ Add tracking for:
10971110
10981111### Cross-Browser Testing
10991112
1100- ** Browser Coverage:**
1113+ #### Browser Coverage
1114+
11011115* Chrome (primary) - All scenarios
11021116* Firefox - Core scenarios (ID Search, All Records, Alive at Center, URL Params)
11031117* Safari (Mac) - Core scenarios
11041118* Edge - Core scenarios
11051119
1106- ** Mobile Browsers (if supported):**
1120+ #### Mobile Browsers (if supported)
1121+
11071122* Chrome Mobile (Android) - ID Search and URL Params scenarios
11081123* Safari Mobile (iOS) - ID Search and URL Params scenarios
11091124
@@ -1209,9 +1224,9 @@ Add tracking for:
12091224
12101225Location: ` server/modules/ehrModules/ehr_app/test/src/org/labkey/test/tests/ehr_app/EHR_AppTest.java `
12111226
1212- ** New Test Methods: **
1227+ #### New Test Methods
12131228
1214- ** ID Search Mode Tests: **
1229+ #### ID Search Mode Tests
12151230
121612311 . ** ` testAnimalHistorySearchById_SingleDirect() ` **
12171232 - Navigate to Animal History page in EHR_App
@@ -1263,7 +1278,7 @@ Location: `server/modules/ehrModules/ehr_app/test/src/org/labkey/test/tests/ehr_
12631278 - Click "Update Report"
12641279 - Assert same result
12651280
1266- ** All Records Mode Tests: **
1281+ #### All Records Mode Tests
12671282
126812837 . ** ` testAnimalHistorySearchById_AllRecords() ` **
12691284 - Navigate to Animal History
@@ -1279,7 +1294,7 @@ Location: `server/modules/ehrModules/ehr_app/test/src/org/labkey/test/tests/ehr_
12791294 - Assert All Records mode active
12801295 - Assert reports show all animals
12811296
1282- ** Alive at Center Mode Tests: **
1297+ #### Alive at Center Mode Tests
12831298
128412999 . ** ` testAnimalHistorySearchById_AliveAtCenter() ` **
12851300 - Navigate to report supporting non-ID filters (verify in test setup)
@@ -1301,7 +1316,7 @@ Location: `server/modules/ehrModules/ehr_app/test/src/org/labkey/test/tests/ehr_
13011316 - Assert button becomes enabled again
13021317 - Assert alive filter reapplies
13031318
1304- ** URL Params Mode Tests: **
1319+ #### URL Params Mode Tests
13051320
1306132111 . ** ` testAnimalHistorySearchById_UrlParamsReadOnly() ` **
13071322 - Build URL with 2-3 test animal IDs and ` readOnly=true ` parameter
@@ -1319,7 +1334,7 @@ Location: `server/modules/ehrModules/ehr_app/test/src/org/labkey/test/tests/ehr_
13191334 - Assert subjects pre-populated in textarea
13201335 - Assert URL no longer contains ` readOnly=true `
13211336
1322- ** Filter Mode Switching Tests: **
1337+ #### Filter Mode Switching Tests
13231338
1324133913 . ** ` testAnimalHistorySearchById_SwitchModes() ` **
13251340 - Start with ID search for 3 animals
@@ -1340,7 +1355,7 @@ Location: `server/modules/ehrModules/ehr_app/test/src/org/labkey/test/tests/ehr_
13401355 - Verify state maintained correctly through all transitions
13411356 - Verify URL hash updates at each step
13421357
1343- ** Performance Tests: **
1358+ #### Performance Tests
13441359
1345136015 . ** ` testAnimalHistorySearchById_LargeDataset() ` **
13461361 - Note: Requires test environment with sufficient animal data
@@ -1352,7 +1367,7 @@ Location: `server/modules/ehrModules/ehr_app/test/src/org/labkey/test/tests/ehr_
13521367 - Switch to different report tab
13531368 - Verify: Tab switching completes promptly
13541369
1355- ** Accessibility Tests: **
1370+ #### Accessibility Tests
13561371
1357137216 . ** ` testAnimalHistorySearchById_KeyboardNavigation() ` **
13581373 - Navigate to Animal History page
@@ -1365,14 +1380,14 @@ Location: `server/modules/ehrModules/ehr_app/test/src/org/labkey/test/tests/ehr_
13651380 - Tab to filter mode buttons and activate with keyboard
13661381 - Verify filter modes switch correctly via keyboard
13671382
1368- ** Test Constants to Add: **
1383+ #### Test Constants to Add
13691384
13701385``` java
13711386// Add to EHR_AppTest class constants section
13721387private static final String DEAD_ANIMAL_ID = " <specific_dead_animal_id>" ; // TODO: Set based on test data
13731388```
13741389
1375- ** Helper Methods to Add: **
1390+ #### Helper Methods to Add
13761391
13771392``` java
13781393private void navigateToAnimalHistorySearchById()
@@ -1530,7 +1545,7 @@ private String buildUrlWithParams(String filterType, String[] subjects, boolean
15301545}
15311546```
15321547
1533- ** Test Data Setup: **
1548+ #### Test Data Setup
15341549
15351550** IMPORTANT:** Before running these tests, implement the stub methods below. Alternatively, mark tests requiring this data as ` @Ignore ` until data setup is complete.
15361551
@@ -1615,7 +1630,8 @@ private void ensureStatusVariety()
16151630}
16161631```
16171632
1618- ** Test Data Requirements:**
1633+ #### Test Data Requirements
1634+
16191635- Minimum 5-10 test animal IDs (use existing ` MORE_ANIMAL_IDS ` array)
16201636- For 100 ID limit test: Either generate 100 test IDs programmatically or use realistic count (e.g., 20-50) and adjust test expectations
16211637- At least 3 animals with aliases (tattoos, chips) for alias resolution testing - configured by ` setupAliasTestData() `
0 commit comments