A country selector changes more than a label. It can change the available regions, required fields and validation messages. A form that works when opened with one country may fail after a user switches countries halfway through entering an address.

Write the transition contract first

For each field, specify whether a country change preserves, clears or asks the user to review the value. Street text should not disappear without a deliberate product decision. A selected region must not silently retain a value that belongs only to the previous country. There is no single correct preservation policy for every application; the test needs an explicit expected result.

Exercise a complete journey

  1. Select a country and enter a street, region and postcode.
  2. Submit with one required value missing to show an error.
  3. Switch to a destination with different configured requirements.
  4. Check labels, options, required markers and error messages.
  5. Submit, reload and inspect the saved country and fields.
  6. Switch back and verify the documented preservation policy.

Use your supported-destination configuration to choose the pair. This avoids assuming that every country needs the same region or postcode inputs.

Inspect the submitted payload

A hidden input may still carry its old value. Compare the visible form with the network request: the saved record should not combine the new country with a stale region identifier. If a field becomes optional, verify both an empty value and a retained value according to your contract.

Test delayed responses

If region options arrive asynchronously, switch countries twice before the first request completes. The late response must not replace the options for the currently selected destination. Repeat under a throttled connection and check that loading indicators and the submit button recover when a request fails.

Make the failure reproducible

Record the starting country, destination, field values and exact sequence of actions. Keep a minimal fixture for each failed transition rather than relying on a new random address on every run. Use the international address generator to prepare synthetic baseline records, then add the transition steps to your regression suite.

The country field guides help distinguish local address conventions from the requirements chosen by your application.