Bite 32.6.4 — Journey Extension Collaborator Acceptance - RodrigoMattosoSilveira/EnterpriseRemoteSystems GitHub Wiki
Bite 32.6.4 — Journey Extension + Collaborator Acceptance
Manual Promotion Test Suite
Promotion Candidate
Bite: 32.6.4 — Journey Extension + Collaborator Acceptance
Branch: 915-bite-3264-journey-extension-collaborator-acceptance
SHA: eb5a6c6083a5d1ee2278b87b9129c3b08f0d184e
The supplied HEAD ZIP was verified to contain the exact committed SHA above.
All LOCAL and CI tests pass. Perform the following 5 targeted manual tests before promotion.
The suite is UI-driven. SQL and direct API calls are not required.
Shared Test Environment
Use the Brazilian demo dataset because it provides deterministic Tenant Administrator and Collaborator identities.
Reset the LOCAL demo data
From the repository root:
make brazilian-demo-local-reset
make brazilian-demo-local-verify
Then start the application normally for LOCAL testing.
Entity
Mineração Serra Dourada — DEMO
Tenant Administrator
Name: Mariana Alves
Role: Tenant Administrator
Login: [email protected]
Password: Demo-31.4-Brasil!
Collaborator used for the extension tests
Name: Rafael Lima
Nickname: Rafa
Login: [email protected]
Password: Demo-31.4-Person!
Rafael has one closed historical Journey and one current active Journey in the demo dataset.
One-Time Preparation — Put Rafael's Current Journey Into a State Where Extension Is Offered
The current extension action is intentionally offered from the Journey settlement workflow when the Collaborator owes the Entity.
The demo dataset starts Rafael's current Journey at approximately zero BRL balance, so create an Expense large enough to make the current Journey balance negative.
Sign-In Identity
Sign in as Mariana Alves.
Required Context
Entity: Mineração Serra Dourada — DEMO
Locale: en-US
Steps
-
Open ERS.
-
Sign in as Mariana Alves.
-
Confirm the selected Entity is
Mineração Serra Dourada — DEMO. -
Navigate to Expenses.
-
Click the UI action to create a new Expense.
-
Select Collaborator
Rafael Lima/Rafa. -
Select Expense type/category Canteen.
-
Select price-list item Meal.
-
Enter quantity:
11 -
Confirm the UI calculates approximately:
11 × R$ 35.00 = R$ 385.00
- Save the Expense.
- Navigate to Collaborators.
- Open Rafael's current active Journey, not the historical closed Journey.
- Open the Journey settlement/current-account area.
- Confirm the settlement state indicates that Rafael owes the Entity.
- Confirm the UI now exposes the action:
Propose Journey Extension
PASS Criteria
Preparation is complete only if the current Journey shows a negative BRL balance / Collaborator repayment state and the Propose Journey Extension action is available.
If the balance is not negative, create one additional Meal Expense and recheck.
Test 01 — Tenant Administrator Proposes an Extension and the Journey Does Not Change While Pending
Purpose
Verify the central governance rule:
Creating a proposal must not extend the Journey immediately.
Sign-In Identity
Remain signed in as Mariana Alves.
Required Context
Entity: Mineração Serra Dourada — DEMO
Person: Rafael Lima
Journey: current active Journey
Locale: en-US
Steps
-
Open Rafael's current active Journey.
-
Record the displayed current values:
Extension Days: Projected End Date: -
In the settlement section, click:
Propose Journey Extension -
Confirm an extension proposal panel opens.
-
Confirm the panel displays the current projected end date.
-
In Additional Days, enter:
7 -
Confirm the proposed/new projected end date is exactly 7 calendar days later than the current projected end date.
-
Leave Reason empty.
-
Confirm the submit button is disabled or the UI otherwise prevents submission without a reason.
-
Enter this reason:
Extend the current assignment to complete the planned operational handoff. -
Click:
Submit Extension Proposal -
Wait for the success message.
-
Locate the Journey Extension Requests section.
-
Confirm a new request appears with:
- a receipt number;
- status
Pending; - current/previous projected end date;
- proposed end date;
- additional days
7; - the exact reason entered above.
-
Record the receipt number.
-
Return to the Journey summary.
-
Confirm the Journey still displays the original:
- Extension Days value;
- Projected End Date value.
-
Navigate away from Rafael and reopen his current Journey.
-
Confirm the request is still
Pending. -
Confirm the Journey date still has not changed.
Values to Record
Original Extension Days:
Original Projected End Date:
Proposed Projected End Date:
Extension receipt number:
Status after proposal:
Extension Days after proposal:
Projected End Date after proposal:
Expected Results
- Reason is mandatory.
- A receipt is created.
- Status is
Pending. - The Journey itself remains unchanged while the proposal is pending.
PASS Criteria
PASS only if the proposal is preserved as pending evidence and the current Journey's extension days/projected end date remain unchanged.
Promotion-Blocking Conditions
Block promotion if:
- the proposal can be submitted with a blank reason;
- the Journey date changes before Collaborator acceptance;
- the proposal disappears after navigation;
- no receipt number is displayed;
- the proposal is created directly as Accepted.
Test 02 — Matching Collaborator Accepts the Pending Extension
Purpose
Verify that only the matching Collaborator can accept the proposal and that acceptance applies the Journey extension exactly once.
Sign-In Identity
- Sign out from Mariana.
- Sign in as:
Name: Rafael Lima
Role: Person / current Collaborator self-service
Login: [email protected]
Password: Demo-31.4-Person!
Required Context
Entity: Mineração Serra Dourada — DEMO
Locale: en-US
Prerequisite
Test 01 must have passed and its request must still be Pending.
Steps
-
After signing in as Rafael, confirm the selected Entity is
Mineração Serra Dourada — DEMO. -
Navigate through the normal UI to Rafael's current Journey.
-
Locate Journey Extension Requests.
-
Find the receipt recorded in Test 01.
-
Confirm its status is
Pending. -
Confirm these actions are visible:
Accept Extension Reject Extension -
Confirm this action is not visible:
Cancel Proposal -
Click:
Accept Extension -
Wait for the operation to complete.
-
Confirm the request status becomes:
Accepted -
Confirm the Accept and Reject actions disappear for that terminal request.
-
Record the Journey's displayed:
- Extension Days;
- Projected End Date.
-
Confirm Extension Days increased by exactly
7. -
Confirm Projected End Date now equals the proposed end date recorded in Test 01.
-
Navigate away and reopen the current Journey.
-
Confirm the accepted values persist.
-
Confirm the accepted receipt remains visible as historical evidence.
Values to Record
Receipt number:
Accepted status visible: yes / no
Extension Days after acceptance:
Projected End Date after acceptance:
Terminal actions hidden after acceptance: yes / no
Expected Results
- Rafael can accept his own current Journey proposal.
- Acceptance changes the request to
Accepted. - The Journey changes only after acceptance.
- Exactly 7 days are added.
- The accepted request remains visible and cannot be acted upon again.
PASS Criteria
PASS only if the Journey changes exactly once and the accepted evidence remains terminal after navigation.
Promotion-Blocking Conditions
Block promotion if:
- Rafael cannot see his own pending request;
- acceptance returns an authorization error;
- the date changes by anything other than 7 days;
- the accepted request still offers Accept/Reject;
- refreshing or reopening applies the extension again.
Test 03 — Collaborator Rejects a Second Proposal and the Journey Remains Unchanged
Purpose
Verify rejection creates terminal evidence without changing accepted Journey state.
Phase A — Tenant Administrator creates a second proposal
-
Sign out from Rafael.
-
Sign in as Mariana Alves.
-
Open Rafael's current active Journey.
-
Record the current:
- Extension Days;
- Projected End Date.
-
Click Propose Journey Extension.
-
Enter:
Additional Days: 3 Reason: Additional three days requested for contingency coverage. -
Submit the proposal.
-
Record its receipt number.
-
Confirm its status is
Pending. -
Confirm the Journey itself still shows the values recorded in step 4.
Phase B — Rafael rejects
-
Sign out from Mariana.
-
Sign in as Rafael.
-
Open Rafael's current Journey.
-
Locate the new pending receipt.
-
Click:
Reject Extension -
Confirm its status becomes:
Rejected -
Confirm the Journey's Extension Days remain unchanged from the accepted value from Test 02.
-
Confirm the Projected End Date remains unchanged from the accepted value from Test 02.
-
Navigate away and reopen the Journey.
-
Confirm the rejected receipt remains visible and terminal.
PASS Criteria
PASS only if rejection changes the proposal to Rejected and does not modify Journey dates.
Promotion-Blocking Conditions
Block promotion if:
- rejection extends the Journey;
- the rejected request disappears;
- a rejected request can subsequently be accepted;
- the request returns to Pending after navigation.
Test 04 — Tenant Administrator Cancels a Proposal and Cannot Bypass Governance Through General Edit
Purpose
Verify Tenant Administrator cancellation and verify the legacy direct Extension Days edit path is gone.
Sign-In Identity
Sign out from Rafael and sign in as Mariana Alves.
Required Context
Entity: Mineração Serra Dourada — DEMO
Person: Rafael Lima
Journey: current active Journey
Steps
Phase A — Create and cancel a proposal
-
Open Rafael's current Journey.
-
Record the current Extension Days and Projected End Date.
-
Click Propose Journey Extension.
-
Enter:
Additional Days: 2 Reason: Temporary extension proposal to verify administrator cancellation. -
Submit.
-
Record the new receipt number.
-
Confirm the request is
Pending. -
In Journey Extension Requests, confirm Cancel Proposal is visible.
-
Confirm Accept Extension and Reject Extension are not available to Mariana for that request.
-
Click:
Cancel Proposal -
Confirm status becomes:
Cancelled -
Confirm the Journey's Extension Days and Projected End Date remain unchanged.
-
Navigate away and reopen Rafael.
-
Confirm the cancelled request remains visible as terminal evidence.
Phase B — Verify the general edit form cannot bypass acceptance
-
Use the normal Edit Collaborator action.
-
Inspect the complete edit form.
-
Confirm there is no editable field labeled:
Extension Days -
Change a harmless editable field only if desired, then save.
-
Reopen the Journey summary.
-
Confirm the accepted Extension Days and Projected End Date have not changed because of the general edit.
PASS Criteria
PASS only if Mariana can cancel a pending proposal, cannot accept/reject on Rafael's behalf, and cannot directly edit extension days through the general Collaborator form.
Promotion-Blocking Conditions
Block promotion immediately if:
- Tenant Administrator can accept/reject for the Collaborator;
- a cancelled proposal changes the Journey;
- a cancelled proposal can later be accepted;
- the general edit form still permits direct extension-day editing.
Test 05 — Brazilian Portuguese Presentation and Historical Evidence
Purpose
Verify the new Journey extension lifecycle is understandable in pt-BR and terminal evidence remains visible.
Sign-In Identity
Remain signed in as Mariana Alves.
Required Context
Entity: Mineração Serra Dourada — DEMO
Person: Rafael Lima
Locale: pt-BR
Steps
-
Change the application language to:
Português (Brasil) -
Reopen Rafael's current Journey.
-
Locate the Journey extension request history.
-
Confirm the accepted, rejected, and cancelled receipts created in Tests 01–04 remain visible.
-
Confirm their statuses are presented in Portuguese.
-
Confirm the UI uses Portuguese labels equivalent to:
Propor extensão da Jornada Aceitar extensão Rejeitar extensão Cancelar proposta Recibo de extensão Motivo -
Confirm the surrounding Tenant terminology uses:
Entidadeand not:
Locatário -
Confirm there are no raw translation keys such as:
journeyExtension.* settlement.extension* -
Open Rafael's historical closed Journey through the normal Journey-history UI.
-
Confirm the historical Journey page remains readable and does not expose active-Journey extension mutation controls.
-
Return to Rafael's current Journey and confirm the terminal extension receipts remain intact.
PASS Criteria
PASS only if the new lifecycle is fully localized, terminal evidence remains readable, and a closed historical Journey does not expose extension mutation actions.
Promotion-Blocking Conditions
Block promotion if:
- raw i18n keys are visible;
- English extension-action labels appear in the otherwise Portuguese workflow;
Locatárioreappears;- historical closed Journeys expose active extension mutation controls;
- terminal receipts disappear when switching locale.
Promotion Decision
Bite 32.6.4 is ready for promotion only if all boxes below are checked:
[ ] Test 01 PASS — proposal requires reason and leaves Journey unchanged while Pending
[ ] Test 02 PASS — matching Collaborator accepts and Journey extends exactly once
[ ] Test 03 PASS — Collaborator rejection preserves Journey state
[ ] Test 04 PASS — Tenant Administrator cancellation works and direct-edit bypass is absent
[ ] Test 05 PASS — pt-BR presentation and historical evidence are correct
The following are immediate promotion blockers:
- Journey date changes before Collaborator acceptance
- anyone other than the matching Collaborator can accept/reject
- Tenant Administrator can accept on behalf of the Collaborator
- accepted extension applies more than once
- rejected/cancelled proposal changes Journey dates
- terminal proposal evidence can be acted upon again
- general Collaborator edit can directly change Extension Days
Glossary Impact
Bite 32.6.4 adds the following architecture/glossary subsection to:
docs/02-Architecture/29. Authorization.md
Place it immediately after 4.6 Collaborator / Collaborator Journey and before 4.7 Role:
### 4.6.1 Journey Extension Request
A **Journey Extension Request** is the governed lifecycle artifact used when a Tenant Administrator proposes moving an open Collaborator Journey's projected end date later.
**Ownership and scope**
- The request belongs to exactly one Collaborator Journey and therefore exactly one Tenant and Person–Tenant Membership.
- It is Journey lifecycle evidence, not a financial Ledger Receipt.
- Each request has an immutable receipt number, previous projected end date, proposed projected end date, positive additional-day quantity, required reason, requester identity, and request timestamp.
**Lifecycle**
- A new request begins in `PENDING`.
- A pending request does **not** change the Journey's projected end date or cumulative extension days.
- Only the Collaborator whose current Journey is the target may `ACCEPT` or `REJECT` the pending request.
- Acceptance atomically changes the request to `ACCEPTED`, records the accepting identity/time, adds the request's days to the Journey's cumulative extension days, and changes the projected end date to the proposed date.
- Rejection changes the request to `REJECTED`, records the rejecting identity/time, and leaves the Journey unchanged.
- A Tenant Administrator may cancel a pending request, producing `CANCELLED` evidence, and may then issue a new proposal.
- At most one `PENDING` extension request may exist for a Journey.
- A Journey cannot close while an extension request remains `PENDING`.
**Immutability**
- `ACCEPTED`, `REJECTED`, and `CANCELLED` requests are terminal evidence and cannot be updated or deleted.
- Changing a proposal requires cancellation of the pending request followed by creation of a new request and receipt.