@@ -13,82 +13,82 @@ Feature: Post-Migration Legacy Data Retrieval
1313 Scenario : Retrieve location with both legacy dates via API
1414 Given a location exists with:
1515 | field | value |
16- | legacy_date_created | 2014 -04 -03 |
17- | legacy_site_date | 2002 -12 -10 |
16+ | nma_date_created | 2014 -04 -03 |
17+ | nma_site_date | 2002 -12 -10 |
1818 When I retrieve that location via the API
19- Then the response should include legacy_date_created as "2014-04-03"
20- And the response should include legacy_site_date as "2002-12-10"
19+ Then the response should include nma_date_created as "2014-04-03"
20+ And the response should include nma_site_date as "2002-12-10"
2121 And the time gap should be approximately 11.3 years
2222
2323 Scenario : Retrieve location with large time gap (54 years)
2424 Given a location exists with:
2525 | field | value |
26- | legacy_date_created | 2008 -05 -28 |
27- | legacy_site_date | 1954 -05 -01 |
26+ | nma_date_created | 2008 -05 -28 |
27+ | nma_site_date | 1954 -05 -01 |
2828 When I retrieve that location via the API
29- Then the response should include legacy_date_created as "2008-05-28"
30- And the response should include legacy_site_date as "1954-05-01"
29+ Then the response should include nma_date_created as "2008-05-28"
30+ And the response should include nma_site_date as "1954-05-01"
3131 And the time gap should be approximately 54 years
3232
3333 Scenario : List all locations includes legacy date fields
3434 Given 5 locations exist with various legacy dates
3535 When I GET /location to list all locations
36- Then each location should have a legacy_date_created field
37- And each location should have a legacy_site_date field
38- And some locations should have null legacy_site_date
36+ Then each location should have a nma_date_created field
37+ And each location should have a nma_site_date field
38+ And some locations should have null nma_site_date
3939
4040 Scenario : Filter locations by legacy site date range
41- Given locations exist with legacy_site_date ranging from 1950 to 2024
42- When I filter locations where legacy_site_date is between "2000-01-01" and "2010-12-31"
43- Then the response should only include locations with legacy_site_date in that decade
44- And locations with legacy_site_date before 2000 should not be included
45- And locations with legacy_site_date after 2010 should not be included
41+ Given locations exist with nma_site_date ranging from 1950 to 2024
42+ When I filter locations where nma_site_date is between "2000-01-01" and "2010-12-31"
43+ Then the response should only include locations with nma_site_date in that decade
44+ And locations with nma_site_date before 2000 should not be included
45+ And locations with nma_site_date after 2010 should not be included
4646
47- Scenario : Query location by legacy_date_created
48- Given 3 locations exist with legacy_date_created "2014-04-03"
49- And 2 locations exist with legacy_date_created "2017-12-06"
50- When I query for locations with legacy_date_created "2014-04-03"
47+ Scenario : Query location by nma_date_created
48+ Given 3 locations exist with nma_date_created "2014-04-03"
49+ And 2 locations exist with nma_date_created "2017-12-06"
50+ When I query for locations with nma_date_created "2014-04-03"
5151 Then the response should include exactly 3 locations
52- And all should have legacy_date_created "2014-04-03"
52+ And all should have nma_date_created "2014-04-03"
5353
5454 # Data Quality Validation
5555
5656 Scenario : Verify migration preserved expected percentage of legacy dates
5757 Given 100 locations were migrated
5858 And 9 of them had non-null SiteDate in AMPAPI
5959 When I query the migrated locations
60- Then 9% should have non-null legacy_site_date
61- And 100% should have non-null legacy_date_created
60+ Then 9% should have non-null nma_site_date
61+ And 100% should have non-null nma_date_created
6262
6363 # Audit Trail Verification
6464
6565 Scenario : Legacy dates preserved alongside audit timestamps
6666 Given a location was migrated with legacy dates
6767 When I retrieve that location
6868 Then it should have created_at (new system timestamp from migration)
69- And it should have legacy_date_created (original AMPAPI DateCreated)
70- And it should have legacy_site_date (original AMPAPI SiteDate)
69+ And it should have nma_date_created (original AMPAPI DateCreated)
70+ And it should have nma_site_date (original AMPAPI SiteDate)
7171 And all three timestamps should be independently queryable
7272 And created_at should be a recent timestamp
73- And legacy_date_created should be an older date
73+ And nma_date_created should be an older date
7474
7575 # Edge Cases
7676
7777 Scenario : Location where SiteDate is later than DateCreated (data anomaly)
7878 Given a location exists with:
7979 | field | value |
80- | legacy_date_created | 2010 -01 -15 |
81- | legacy_site_date | 2015 -06 -20 |
80+ | nma_date_created | 2010 -01 -15 |
81+ | nma_site_date | 2015 -06 -20 |
8282 When I retrieve that location
83- Then legacy_date_created should be "2010-01-15"
84- And legacy_site_date should be "2015-06-20"
83+ Then nma_date_created should be "2010-01-15"
84+ And nma_site_date should be "2015-06-20"
8585 And the system should accept this without error
8686
87- Scenario : Location with only legacy_date_created (no legacy_site_date )
87+ Scenario : Location with only nma_date_created (no nma_site_date )
8888 Given a location exists with:
8989 | field | value |
90- | legacy_date_created | 2014 -10 -17 |
91- | legacy_site_date | null |
90+ | nma_date_created | 2014 -10 -17 |
91+ | nma_site_date | null |
9292 When I retrieve that location
93- Then legacy_date_created should be "2014-10-17"
94- And legacy_site_date should be null
93+ Then nma_date_created should be "2014-10-17"
94+ And nma_site_date should be null
0 commit comments