Bite 32.1 — Tenant Administrator Journey History - RodrigoMattosoSilveira/EnterpriseRemoteSystems GitHub Wiki

Bite 32.1 — Tenant Administrator Journey History

Manual Promotion Test Suite

Branch: 893-bite-321-tenant-administrator-journey-history
Committed HEAD SHA: 6aca250a1315e347eb2c1e9319f89d2e090cdccc

Promotion rule

Promote Bite 32.1 only if all three tests below PASS.

Promotion is blocked by any of the following:

  • a Tenant Administrator cannot see the current and closed Journeys for a Person in the current Tenant;
  • a closed Journey cannot be opened from the Person page;
  • Journey history includes a Journey belonging to another Person;
  • the empty-history state displays another Person's Journeys;
  • Journey order is incorrect;
  • the feature is materially incomplete in either pt-BR or en-US;
  • raw I18N keys are displayed;
  • navigating to a historical Journey results in an error or incorrect Journey;
  • any unexpected 401, 403, 404, 500, or application error occurs during the supported UI flow.

0. Deterministic LOCAL prerequisites

These tests use the Brazilian demo fixture because it already contains the exact lifecycle needed for Bite 32.1:

  • Rafael Lima has one closed historical Journey;
  • Rafael Lima has one current Journey;
  • João Ferreira has only one current Journey;
  • Beatriz Nascimento has no Journey.

0.1 Confirm HEAD

From the repository root:

git rev-parse HEAD

Expected:

6aca250a1315e347eb2c1e9319f89d2e090cdccc

PASS: the SHA matches exactly.

BLOCK PROMOTION: stop if the SHA differs.


0.2 Reset the isolated Brazilian demo database

Stop any currently running LOCAL backend first.

Run:

make brazilian-demo-local-reset BRAZILIAN_DEMO_AS_OF=2026-09-18
make brazilian-demo-local-verify BRAZILIAN_DEMO_AS_OF=2026-09-18

Expected verification result includes successful Brazilian demo fixture verification.

This reset uses the isolated Brazilian demo database and does not require using your normal backend/data/app.db.


0.3 Start the LOCAL backend

In Terminal 1:

ERS_DATABASE_PATH=data/brazilian-demo.db make local-backend

Leave this terminal running.


0.4 Start the LOCAL frontend

In Terminal 2:

make local-frontend

Open the normal LOCAL ERS URL shown by the frontend.


0.5 Tenant Administrator identity

For all three tests, sign in as:

Role:     Tenant Administrator
Person:   Mariana Alves
Login:    [email protected]
Password: Demo-31.4-Brasil!

After sign-in, confirm the selected Tenant is:

Mineração Serra Dourada — DEMO

If another context is selected, use the Tenant/context selector and explicitly select:

Mineração Serra Dourada — DEMO

Do not continue until the displayed context is the Brazilian demo Tenant.


Test 01 — Portuguese: Tenant Administrator sees Rafael's current and closed Journeys

Purpose

Verify the principal Bite 32.1 behavior through the normal Tenant Administrator UI.

Identity and context

Sign in as:

Mariana Alves
[email protected]
Demo-31.4-Brasil!

Selected Tenant:

Mineração Serra Dourada — DEMO

Locale:

Português (Brasil)

Procedure

  1. In the application header, locate the language selector labeled Idioma.

  2. Select Português (Brasil).

  3. Confirm the main application navigation is displayed in Portuguese.

  4. Open Pessoas from the normal application navigation.

  5. Locate Rafael Lima.

  6. Open Rafael Lima by clicking the normal UI control for his Person record.

  7. Confirm the Person detail page identifies:

    • Rafael Lima
    • nickname Rafa
  8. Scroll down to the section titled:

    Histórico de Jornadas
    
  9. Confirm the explanatory text states that the section contains current and closed Journeys for this Person in the current Tenant.

  10. Count the Journey cards.

Expected count:

2
  1. Inspect the first/newest Journey.

Expected lifecycle state:

Atual

Expected dates:

Início: 30 de jul. de 2026
Fim projetado: 28 de out. de 2026
  1. Confirm the current Journey also displays:

    • Alocação de trabalho;
    • a nonblank work-assignment value;
    • Remuneração;
    • a nonblank compensation value;
    • a Journey ID;
    • Abrir Jornada.
  2. Record the current Journey ID:

Current Journey ID: ______________________________
  1. Inspect the second/older Journey.

Expected lifecycle state:

Encerrada

Expected dates:

Início: 10 de fev. de 2026
Encerrada: 10 de jun. de 2026
  1. Confirm the historical Journey also displays:

    • Alocação de trabalho;
    • a nonblank work-assignment value;
    • Remuneração;
    • a nonblank compensation value;
    • a Journey ID;
    • Abrir Jornada.
  2. Record the historical Journey ID:

Closed Journey ID: ______________________________
  1. Confirm the two recorded Journey IDs are different.
  2. Confirm the Atual Journey is shown before the Encerrada Journey.
  3. In the Atual Journey card, click Abrir Jornada.
  4. Confirm the application opens Rafael's current Journey detail.
  5. Confirm the Journey detail does not show Jornada encerrada.
  6. Confirm the Journey ID on the detail page matches the Current Journey ID recorded in step 13.
  7. Use the application's normal Voltar control or the browser Back button to return to Rafael's Person page.
  8. Return to Histórico de Jornadas.
  9. In the historical Encerrada Journey card, click Abrir Jornada.
  10. Confirm the historical Journey detail opens successfully.
  11. Confirm the page visibly shows:
Jornada encerrada
  1. Confirm the closure date corresponds to:
10 de jun. de 2026
  1. Confirm the Journey ID on the detail page matches the Closed Journey ID recorded in step 16.

Expected result

Rafael's Person page shows exactly:

1 current Journey
1 closed Journey

The current Journey appears first.

Each Journey links to its own correct detail page.

The closed Journey remains readable after closure.

PASS

PASS if all steps above complete successfully and the two Journey records are clearly distinct and correct.

BLOCK PROMOTION

Block promotion if:

  • only the current Journey is shown;
  • the closed Journey is missing;
  • more than two Journeys appear;
  • both links open the same Journey;
  • the closed Journey cannot be opened;
  • the historical Journey appears as current;
  • the current Journey appears as closed;
  • the order is oldest-first;
  • a raw translation key appears;
  • an application error occurs.

Test 02 — English I18N parity for Journey History

Purpose

Verify that Bite 32.1 is complete in the second supported ERS locale and that Journey dates follow the selected locale.

Identity and context

Remain signed in as:

Mariana Alves
[email protected]

Selected Tenant:

Mineração Serra Dourada — DEMO

Person:

Rafael Lima

Procedure

  1. Return to Rafael Lima's Person page if necessary.

  2. Use the language selector.

  3. Select:

    English (United States)
    
  4. Confirm the Journey section title changes to:

    Journey History
    
  5. Confirm the description is in English.

  6. Confirm exactly two Journey cards remain visible.

  7. Confirm the first Journey displays:

    Current
    
  8. Confirm its dates are rendered as:

    Started: Jul 30, 2026
    Projected end: Oct 28, 2026
    
  9. Confirm the second Journey displays:

    Closed
    
  10. Confirm its dates are rendered as:

Started: Feb 10, 2026
Closed: Jun 10, 2026
  1. Confirm both cards display the English structural labels:
Work assignment
Compensation
Open Journey
  1. Confirm no raw translation key is visible, for example:
people.journeyHistory.title
people.journeyHistory.current
people.journeyHistory.openJourney
  1. Confirm Portuguese structural labels from the same feature are no longer displayed, including:
Histórico de Jornadas
Atual
Abrir Jornada
  1. Click Open Journey on the historical Closed Journey.
  2. Confirm the same historical Rafael Journey opens successfully.
  3. Confirm its detail page displays:
Journey Closed

and the closure date corresponds to:

Jun 10, 2026

Expected result

Switching locale changes the Journey History presentation without changing:

  • which Person is selected;
  • which Tenant is selected;
  • the number of Journeys;
  • the Journey identities;
  • the lifecycle state of either Journey.

PASS

PASS if the same two Rafael Journeys remain visible and all new Bite 32.1 structural UI is correctly presented in English.

BLOCK PROMOTION

Block promotion if:

  • changing locale changes the Journey data;
  • a Journey disappears or another appears;
  • dates remain formatted as Brazilian Portuguese;
  • new 32.1 labels remain Portuguese;
  • raw I18N keys appear;
  • the historical Journey link stops working.

Test 03 — Membership-specific history does not mix Journeys between People

Purpose

Verify through the UI that Journey History is associated with the selected Person's Membership rather than displaying the Tenant-wide Collaborator catalog.

This is an important regression check because Bite 32.1 deliberately replaced the previous Tenant-wide active-Collaborator lookup on Person detail with a Membership-scoped history query.

Identity and context

Remain signed in as:

Mariana Alves
[email protected]

Selected Tenant:

Mineração Serra Dourada — DEMO

Locale:

Either locale may be used, but keep the same locale throughout this test.

The instructions below use English labels. If pt-BR is active, use the equivalent Portuguese UI labels.


Part A — Person with no Journeys

  1. Open People.

  2. Locate Beatriz Nascimento.

  3. Open Beatriz's Person record.

  4. Confirm the Person page identifies:

    Beatriz Nascimento
    
  5. Locate Journey History.

  6. Confirm the section displays the empty-state message:

    No Collaborator Journeys are recorded for this Person in this Tenant.
    

    Under pt-BR, the expected message is:

    Nenhuma Jornada de Colaborador está registrada para esta Pessoa neste Locatário.
    
  7. Confirm there is no Current Journey card.

  8. Confirm there is no Closed Journey card.

  9. Confirm there is no Open Journey link inside the history section.

  10. Confirm neither of the Rafael Journey IDs recorded during Test 01 appears anywhere in Beatriz's Journey History section.

Expected result

Beatriz's Journey History is empty even though other People in the same Tenant have Journeys.


Part B — Person with only one current Journey

  1. Return to People.
  2. Locate João Ferreira.
  3. Open João's Person record.
  4. Confirm the Person page identifies:
João Ferreira
  1. Locate Journey History.
  2. Count the Journey cards.

Expected:

1
  1. Confirm that Journey is marked:
Current

or under pt-BR:

Atual
  1. Confirm there is no Closed / Encerrada Journey card.
  2. Confirm neither Rafael Journey ID recorded during Test 01 appears in João's Journey History.
  3. Click João's Open Journey / Abrir Jornada link.
  4. Confirm the Journey detail belongs to João Ferreira, not Rafael Lima or another Person.

Expected result

The history shown on a Person page contains only Journeys associated with that Person's current-Tenant Membership:

Beatriz → 0 Journeys
João    → 1 current Journey
Rafael  → 1 current + 1 closed Journey

The Person detail page is therefore not leaking or reusing the Tenant-wide Collaborator catalog.

PASS

PASS if the three Persons expose exactly the fixture-specific histories above.

BLOCK PROMOTION

Block promotion if:

  • Beatriz displays any Journey;
  • João displays Rafael's closed Journey;
  • João displays more than one Journey;
  • any Rafael Journey ID appears on Beatriz or João;
  • clicking João's Journey opens another Person's Journey;
  • the Journey History section appears to contain Tenant-wide results rather than Person-specific results.

Cross-Tenant confidentiality note

No additional manual DevTools/API/SQL test is required for the cross-Tenant predicate in Bite 32.1.

The committed automated backend coverage deliberately creates a Journey in another Tenant using the same Membership identifier and verifies that the Membership-history endpoint does not return it.

That automated integration test is a stronger and more deterministic proof of the repository predicate:

request Tenant
+
membership ID

than manufacturing cross-Tenant data manually for this promotion suite.

The manual promotion tests should therefore remain UI-only.


Final promotion checklist

Before promoting Bite 32.1:

[x] make local-check passes
[x] Feature-branch CI passes
[ ] Test 01 — Portuguese current + closed Rafael history PASS
[ ] Test 02 — English I18N parity PASS
[ ] Test 03 — Person/Membership-specific history PASS

If all three manual tests pass, I consider Bite 32.1 — Tenant Administrator Journey History ready for promotion.