Skip to content

feat: offer Serbia instead of Croatia in both sample apps - #2

Merged
whatsaaaa merged 4 commits into
mainfrom
fm/sample-serbia-country
Nov 12, 2026
Merged

whatsaaaa merged 4 commits into
mainfrom
fm/sample-serbia-country

Conversation

@whatsaaaa

Copy link
Copy Markdown
Owner

Intent

Also, you did croatia as the country in demo react app, can you please update that to Serbia, I am Serbian.

Context for that statement: the demo React app is react-checkout in this repository. Its checkout form has a country choice that offers Austria, Croatia and Germany.

Later, after being told that both demos (react-checkout and vue-event-registration) have the Croatia option and that both were being changed:

Yes replace Croatia with Serbia

Later, asked whether the sample people and company names used in both demos' test data (Croatian-looking names such as Jana Kovač, Ana Horvat, Ivo Horvat, Mia Novak, Kovač d.o.o. and Horvat d.o.o., with their example.com email addresses) should also change:

Swap it with common Serbian names

What Changed

  • The country choice in react-checkout and vue-event-registration now offers Serbia (RS) in place of Croatia (HR): the form definitions, the country union types, and the English and German labels in react-checkout/shared/i18n.ts (Serbia / Serbien) are all updated.
  • Croatia-specific copy now refers to Serbia: the checkout lead reads "shipped from Belgrade" (Belgrad in German), and the phone format hint in the Vue registration form uses +381 61 234 5678 as its example.
  • Unit and e2e test data in both apps is updated to match: Belgrade addresses (Knez Mihailova 1, 11000), an RS VAT ID, and Serbian sample people and companies (Jelena Jovanović, Marko Petrović, Nikola Petrović, Milica Nikolić, Jovanović d.o.o., Petrović d.o.o.) with matching example.com emails.

Risk Assessment

✅ Low: A consistent data-only swap of HR/Croatia to RS/Serbia across option values, both locales' label keys, TypeScript unions and test fixtures, with no leftover Croatian references and new sample values (zip 11000, VAT ID RS123456789, phone +381...) that satisfy the existing validation patterns.

Testing

Installed dependencies for both demos, then ran each demo's existing Playwright end-to-end suite against its production build (react-checkout 12 passed, vue-event-registration 8 passed, desktop and mobile). I then started both production apps locally and drove them in Chromium with a throwaway script: read the country dropdown options in English and German, placed a Serbia order, posted HR and RS straight to the checkout API, triggered the phone validation message, and completed a business registration billed to Serbia, capturing seven screenshots. Croatia is gone from both dropdowns, the server rejects HR with a 422, and no Croatian names, Zagreb or +385 references remain in the repo. Servers were stopped and build outputs removed from the worktree.

  • Live validation: ✅ go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
react-checkout (local production build): the Country dropdown offers Austria, Serbia, Germany and no Croatia; choosing Serbia and placing the order shows a confirmation with country RS ✅ pass live manual-drive.json (reactCountryOptionsEn = Choose..., Austria, Serbia, Germany; reactConfirmedOrder.shipping.country = RS); react-checkout-en-serbia.png; react-checkout-confirmed.png; react-e2e.log te…
react-checkout (local production build): switching to Deutsch shows Serbien in the Land dropdown and the header reads 'verschickt aus Belgrad'; the English header reads 'shipped from Belgrade' ✅ pass live manual-drive.json (reactCountryOptionsDe = Bitte wählen..., Österreich, Serbien, Deutschland; reactLeadDe; reactLeadEn); react-checkout-de-serbien.png
Adversarial, react-checkout API (local server): posting an order with country HR straight to /api/orders is rejected, while the same order with RS is accepted ✅ pass live manual-drive.json (apiHR.status = 422 with issue on shipping.country 'Expected ("AT" | "RS" | "DE") but received "HR"'; apiRS.status = 201)
vue-event-registration (local production build): the invoice step's Country dropdown offers Austria, Serbia, Germany, Slovenia and no Croatia; a business registration billed to Serbia shows Serbia on… ✅ pass live manual-drive.json (vueCountryOptions; vueSummaryHasSerbia = true; vueRegisteredPageText billingAddress.country = RS); vue-invoice-serbia.png; vue-confirm-summary.png; vue-registered.png; vue-e2e.log t…
vue-event-registration (local production build): typing an invalid phone number shows the hint with a Serbian example, 'Use digits and spaces, like +381 61 234 5678' ✅ pass live manual-drive.json (vuePhoneMessage); vue-phone-example.png
Both demos' end-to-end suites fill the forms with common Serbian sample names (Jelena Jovanović, Marko Petrović, Nikola Petrović, Milica Nikolić, Petrović d.o.o.) and Belgrade addresses, and pass agai… ✅ pass live react-e2e.log (12 passed); vue-e2e.log (8 passed); git grep for the old Croatian names, Zagreb, HR and +385 returned no matches

react-checkout, English: Serbia selected, shipped from Belgrade

react-checkout, German: Serbien, verschickt aus Belgrad

react-checkout: order confirmation with country RS

vue-event-registration: invoice step with Serbia selected

vue-event-registration: Confirm step showing Serbia

vue-event-registration: phone hint with +381 example

vue-event-registration: registered page with submitted output

Evidence: Values read from the running apps (dropdown options, confirmed order, API responses)
{
  "reactLeadEn": "Paper goods, shipped from Belgrade.",
  "reactCountryOptionsEn": [
    "Choose...",
    "Austria",
    "Serbia",
    "Germany"
  ],
  "reactLeadDe": "Papierwaren, verschickt aus Belgrad.",
  "reactCountryOptionsDe": [
    "Bitte wählen...",
    "Österreich",
    "Serbien",
    "Deutschland"
  ],
  "reactCountryValueAfterSwitch": "1",
  "reactConfirmedOrder": {
    "email": "jelena@example.com",
    "lines": [
      {
        "product": "mug",
        "quantity": 2
      }
    ],
    "delivery": "standard",
    "shipping": {
      "fullName": "Jelena Jovanović",
      "street": "Knez Mihailova 1",
      "zip": "11000",
      "city": "Belgrade",
      "country": "RS"
    },
    "paymentMethod": "card",
    "acceptTerms": true
  },
  "apiHR": {
    "status": 422,
    "body": {
      "code": "invalid_order",
      "message": "We could not take your order. Please check the marked fields.",
      "issues": [
        {
          "path": [
            "shipping",
            "country"
          ],
          "message": "Invalid type: Expected (\"AT\" | \"RS\" | \"DE\") but received \"HR\""
        }
      ]
    }
  },
  "apiRS": {
    "status": 201,
    "body": {
      "orderId": "HC-00002",
      "order": {
        "email": "jelena@example.com",
        "lines": [
          {
            "product": "mug",
            "quantity": 1
          }
        ],
        "delivery": "standard",
        "shipping": {
          "fullName": "Jelena Jovanović",
          "street": "Knez Mihailova 1",
          "zip": "11000",
          "city": "Belgrade",
          "country": "RS"
        },
        "paymentMethod": "card",
        "acceptTerms": true
      },
      "total": 1890
    }
  },
  "vuePhoneMessage": "Use digits and spaces, like +381 61 234 5678",
  "vueCountryOptions": [
    "Choose...",
    "Austria",
    "Serbia",
    "Germany",
    "Slovenia"
  ],
  "vueSummaryHasSerbia": true,
  "vueRegisteredPageText": "Harbour Conf 2027\n\nMay 10 to 12, 2027. Register in a few steps.\n\nYou're registered\n\nThank you, Marko. Your ticket is on its way to marko@example.com.\n\nThis is what the form submitted:\n\n{\n  \"firstName\": \"Marko\",\n  \"lastName\": \"Petrović\",\n  \"email\": \"marko@example.com\",\n  \"phone\": \"+381 61 234 5678\",\n  \"ticketType\": \"business\",\n  \"arrival\": \"2027-05-10\",\n  \"departure\": \"2027-05-11\",\n  \"sessions\": [\n    \"keynote\"\n  ],\n  \"needsAssistance\": false,\n  \"guests\": [],\n  \"company\": {\n    \"name\": \"Petrović d.o.o.\",\n    \"vatId\": \"RS123456789\"\n  },\n  \"billingAddress\": {\n    \"street\": \"Knez Mihailova 1\",\n    \"city\": \"Belgrade\",\n    \"zip\": \"11000\",\n    \"country\": \"RS\"\n  },\n  \"acceptTerms\": true,\n  \"newsletter\": false\n}\nRegister someone else"
}
Evidence: Country dropdown options and API guard, read from the running apps
react-checkout EN: Choose..., Austria, Serbia, Germany
react-checkout DE: Bitte wählen..., Österreich, Serbien, Deutschland
vue-event-registration: Choose..., Austria, Serbia, Germany, Slovenia
POST /api/orders country=HR -> 422 shipping.country: Expected ("AT" | "RS" | "DE") but received "HR"
POST /api/orders country=RS -> 201
vue phone hint: Use digits and spaces, like +381 61 234 5678
Evidence: react-checkout Playwright run
[WebServer] $ tsc -b && vite build
[WebServer] $ tsx server/index.ts dist

Running 12 tests using 4 workers

  ✓   3 [desktop] › e2e/checkout.spec.ts:90:1 › stops an invalid order in the browser, before it reaches the server (3.6s)
  ✓   1 [desktop] › e2e/checkout.spec.ts:129:1 › shows the fields a condition asks for, and drops what it hides (4.1s)
  ✓   4 [desktop] › e2e/checkout.spec.ts:41:1 › places an order that the server validates and prices again (4.3s)
  ✓   2 [desktop] › e2e/checkout.spec.ts:156:1 › shows the server rejecting an order that got past the browser (4.6s)
  ✓   6 [desktop] › e2e/checkout.spec.ts:260:1 › the server rejects invalid data sent straight to its API (960ms)
  ✓   5 [desktop] › e2e/checkout.spec.ts:202:1 › speaks German in the browser and on the server, and keeps the input (2.6s)
  ✓   8 [mobile] › e2e/checkout.spec.ts:90:1 › stops an invalid order in the browser, before it reaches the server (2.5s)
  ✓   7 [mobile] › e2e/checkout.spec.ts:41:1 › places an order that the server validates and prices again (3.6s)
  ✓   9 [mobile] › e2e/checkout.spec.ts:129:1 › shows the fields a condition asks for, and drops what it hides (3.0s)
  ✓  12 [mobile] › e2e/checkout.spec.ts:260:1 › the server rejects invalid data sent straight to its API (795ms)
  ✓  10 [mobile] › e2e/checkout.spec.ts:156:1 › shows the server rejecting an order that got past the browser (2.6s)
  ✓  11 [mobile] › e2e/checkout.spec.ts:202:1 › speaks German in the browser and on the server, and keeps the input (2.9s)

  12 passed (31.2s)
Evidence: vue-event-registration Playwright run
[WebServer] $ vue-tsc -b && vite build

Running 8 tests using 4 workers

  ✓  4 [desktop] › e2e/registration.spec.ts:285:1 › moves with Enter and with the step indicator (3.9s)
  ✓  3 [desktop] › e2e/registration.spec.ts:254:1 › clears what a condition hides (4.1s)
  ✓  2 [desktop] › e2e/registration.spec.ts:42:1 › registers a business attendee with guests, step by step (5.4s)
  ✓  1 [desktop] › e2e/registration.spec.ts:166:1 › keeps the user on a step until its fields are valid (5.5s)
  ✓  5 [mobile] › e2e/registration.spec.ts:42:1 › registers a business attendee with guests, step by step (5.0s)
  ✓  8 [mobile] › e2e/registration.spec.ts:285:1 › moves with Enter and with the step indicator (2.5s)
  ✓  6 [mobile] › e2e/registration.spec.ts:166:1 › keeps the user on a step until its fields are valid (4.9s)
  ✓  7 [mobile] › e2e/registration.spec.ts:254:1 › clears what a condition hides (3.3s)

  8 passed (25.8s)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ℹ️ react-checkout/shared/i18n.ts:22 - Besides the requested country option and sample names, the change also updates two pieces of user-visible copy that the intent does not name literally: the checkout lead 'shipped from Zagreb' -> 'Belgrade' (react-checkout/shared/i18n.ts:22 and :112 for German) and the phone example '+385 91 234 5678' -> '+381 61 234 5678' (vue-event-registration/src/registration/definition.json:39). Both are consistent with the stated goal of making the demos Serbian and are covered by the updated tests, so no action is needed.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
react-checkout (local production build): the Country dropdown offers Austria, Serbia, Germany and no Croatia; choosing Serbia and placing the order shows a confirmation with country RS ✅ pass live manual-drive.json (reactCountryOptionsEn = Choose..., Austria, Serbia, Germany; reactConfirmedOrder.shipping.country = RS); react-checkout-en-serbia.png; react-checkout-confirmed.png; react-e2e.log te…
react-checkout (local production build): switching to Deutsch shows Serbien in the Land dropdown and the header reads 'verschickt aus Belgrad'; the English header reads 'shipped from Belgrade' ✅ pass live manual-drive.json (reactCountryOptionsDe = Bitte wählen..., Österreich, Serbien, Deutschland; reactLeadDe; reactLeadEn); react-checkout-de-serbien.png
Adversarial, react-checkout API (local server): posting an order with country HR straight to /api/orders is rejected, while the same order with RS is accepted ✅ pass live manual-drive.json (apiHR.status = 422 with issue on shipping.country 'Expected ("AT" | "RS" | "DE") but received "HR"'; apiRS.status = 201)
vue-event-registration (local production build): the invoice step's Country dropdown offers Austria, Serbia, Germany, Slovenia and no Croatia; a business registration billed to Serbia shows Serbia on… ✅ pass live manual-drive.json (vueCountryOptions; vueSummaryHasSerbia = true; vueRegisteredPageText billingAddress.country = RS); vue-invoice-serbia.png; vue-confirm-summary.png; vue-registered.png; vue-e2e.log t…
vue-event-registration (local production build): typing an invalid phone number shows the hint with a Serbian example, 'Use digits and spaces, like +381 61 234 5678' ✅ pass live manual-drive.json (vuePhoneMessage); vue-phone-example.png
Both demos' end-to-end suites fill the forms with common Serbian sample names (Jelena Jovanović, Marko Petrović, Nikola Petrović, Milica Nikolić, Petrović d.o.o.) and Belgrade addresses, and pass agai… ✅ pass live react-e2e.log (12 passed); vue-e2e.log (8 passed); git grep for the old Croatian names, Zagreb, HR and +385 returned no matches
  • pnpm install --frozen-lockfile in react-checkout and vue-event-registration
  • pnpm exec playwright test in react-checkout (12 passed, exit 0)
  • pnpm exec playwright test in vue-event-registration (8 passed, exit 0)
  • PORT=4274 pnpm start (react-checkout production build) and pnpm exec vite preview --port 4273 --strictPort (vue-event-registration production build), driven by node drive.cjs in Chromium: country options, Serbia order, German locale, phone message, business registration, screenshots
  • POST /api/orders on the running react-checkout server with shipping.country set to HR (422) and RS (201)
  • git grep -i -E "croat|kroat|zagreb|'HR'|horvat|kovač|novak|\+385" over the repo: no matches
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@whatsaaaa
whatsaaaa merged commit 5e36b1f into main Nov 12, 2026
2 checks passed
@whatsaaaa
whatsaaaa deleted the fm/sample-serbia-country branch November 12, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant