Checks saved-email normalization and editing rules during immigration visits.
Subsystem: GUI, controls, inventory and player interaction
Fixture/harness: immigrationemailtests
Setup: The standalone ImmigrationEmailTests harness owns the inputs, local helpers and assertion sink used by the case files below.
Build/entry point: Tests/ImmigrationEmailTests.vcxproj; declared configurations: Debug|Win32.
ImmigrationEmailTests.cpp
Source: Tests/ImmigrationEmailTests.cpp
Entry-point checks
Fixture: Immigration Email tests
Case symbol: main
Source: Tests/ImmigrationEmailTests.cpp:13
- Test
- Entry-point checks: annual revisit unlocks saved email; ordinary missing-field visit keeps saved email locked; unchanged email needs no provider call.
Source check messages (including original failure wording)
-
saved address normalized
-
annual revisit unlocks saved email
-
ordinary missing-field visit keeps saved email locked
-
unchanged email needs no provider call
-
case and whitespace only preserve approval
-
editing immediately invalidates approval
-
changed address requests a token
-
one check per unchanged pending value
-
legacy uncorrelated approval ignored
-
negative token ignored
-
fractional token ignored
-
NaN token ignored
-
infinite token ignored
-
away and back uses a fresh request token
-
stale success cannot approve current text
-
stale failure cannot reject current text
-
matching outage handled
-
outage prevents save
-
outage can be retried without changing address
-
matching success approves
-
duplicate reply cannot revoke approval
-
approved changed address may be submitted
-
pending save locks email
-
pending save prevents duplicate save or validation
-
pending save freezes submitted value
-
late preflight cannot cancel save
-
zero-token validation cannot acknowledge save
-
final duplicate rejection restores form state
-
failed save unlocks email
-
failed save preserves original server baseline
-
response timeout has exact boundary
-
missing reply becomes retryable outage
-
late success after timeout ignored
-
timeout retry gets new token
-
final save outage restores retry state
-
server acknowledgement finishes save
-
successful save advances original address
-
new saved address no longer needs validation
-
new account or missing email stays editable
-
blank address never passes or sends
-
form reset does not reuse old request IDs
-
earlier form response ignored
-
unrepresentable wire input cannot submit
-
rejected input drops pending approval