Repository navigation
fix(e2e): attribute change-detection errors to the URL they fired on - #659
Conversation
The change-detection fixture accumulated NG0100 errors for a whole test and printed page.url() only when it flushed, so a long multi-page journey blamed every error on wherever the test happened to end up. teller-cash-management.spec.ts visits the GL account and financial activity mapping forms early and finishes on a cashier transactions page, which is why those components were reported under that URL. Each error is now tagged with page.url() as it arrives instead. Also determines the open question of whether the ng-untouched/ ng-touched/etc. NG0100 shape at NgControlStatus_HostBindings is an application defect: it is not. exhaustiveCheckNoChangesInterval (@angular/core) schedules its sweep on a plain setTimeout, decoupled from the zone-driven render scheduler apart from a best-effort pendingRenderTaskId/runningTick guard, so it can occasionally diff a live control-status getter against a stale render during that gap. The ordinary checkNoChanges pass Angular always pairs with a real tick in dev mode has no such gap and cannot produce this. It also is not reactive-forms-specific, since NgControlStatus attaches to ngModel controls too. Narrows what ENFORCE_CD_ERRORS treats as a failure to exclude this known artifact (still reported via console.warn) rather than treating it as a defect to fix in the components themselves. Fixes apache#572
E2E — mocked backend🎭 E2E Tests✅ All green — 409 passed · 0 failed · 1 skipped, across 38 spec files in 6m 51s. By spec file
All 410 tests — click to expand
Slowest 10 — what the shard counts should be tuned against
📼 Download the HTML report, videos and traces — see the Generated by run 36996950653 from |
E2E — real Fineract🎭 E2E Tests✅ All green — 114 passed · 0 failed · 0 skipped · 1 flaky, across 35 spec files in 6m 36s.
|
| Spec | ✅ | ❌ | ⏭️ | 🔒 | Time |
|---|---|---|---|---|---|
| backend.setup.ts | 3 | 0 | 0 | 0 | 5.6s |
| accounting-closure-backend.spec.ts | 2 | 0 | 0 | 0 | 13.0s |
| batch-api-operations.spec.ts | 5 | 0 | 0 | 0 | 29.6s |
| center-servicing.spec.ts | 2 | 0 | 0 | 0 | 18.0s |
| client-legal-form-search.spec.ts | 1 | 0 | 0 | 0 | 5.2s |
| client-transfer.spec.ts | 4 | 0 | 0 | 0 | 46.1s |
| deposit-account-servicing.spec.ts | 3 | 0 | 0 | 0 | 26.2s |
| deposit-product-configuration.spec.ts | 3 | 0 | 0 | 0 | 16.5s |
| form-layout-reflow.spec.ts | 6 | 0 | 0 | 0 | 31.7s |
| group-membership.spec.ts | 3 | 0 | 0 | 0 | 48.0s |
| loan-account-actions.spec.ts | 3 | 0 | 0 | 0 | 24.1s |
| loan-approved-amount-revision.spec.ts | 3 | 0 | 0 | 0 | 20.4s |
| loan-charge-off.spec.ts | 2 | 0 | 0 | 0 | 21.0s |
| loan-product-accounting.spec.ts | 1 | 0 | 0 | 0 | 34.0s |
| loan-servicing.spec.ts | 2 | 0 | 0 | 0 | 20.1s |
| login.spec.ts | 4 | 0 | 0 | 0 | 5.7s |
| oidc-login-backend.spec.ts | 2 | 0 | 0 | 0 | 4.8s |
| parity-screens.spec.ts | 8 | 0 | 0 | 0 | 45.5s |
| rbac-backend-restricted-user.spec.ts | 7 | 0 | 0 | 0 | 37.5s |
| rbac-disabled-flag-backend.spec.ts | 6 | 0 | 0 | 0 | 27.9s |
| rbac-multi-permission.spec.ts | 9 | 0 | 0 | 0 | 1m 1s |
| bulk-import-entity-types.spec.ts | 1 | 0 | 0 | 0 | 7.3s |
| delinquency-configuration.spec.ts | 2 | 0 | 0 | 0 | 13.0s |
| full-demo.spec.ts | 1 | 0 | 0 | 0 | 43.7s |
| interest-rate-charts.spec.ts | 1 | 0 | 0 | 0 | 5.4s |
| loan-lifecycle.spec.ts | 4 | 0 | 0 | 0 | 1m 28s |
| loan-schedule-type.spec.ts | 3 | 0 | 0 | 0 | 21.5s |
| rbac-office-scoped-user.spec.ts | 6 | 0 | 0 | 0 | 20.3s |
| rbac-permissionless-user.spec.ts | 4 | 0 | 0 | 0 | 16.3s |
| report-mailing-job.spec.ts | 3 | 0 | 0 | 0 | 13.5s |
| report-parameter-backend.spec.ts | 4 | 0 | 0 | 0 | 16.7s |
| savings-transaction-correction.spec.ts | 1 | 0 | 0 | 0 | 4.7s |
| share-account-servicing.spec.ts | 2 | 0 | 0 | 0 | 15.4s |
| share-product-accounting.spec.ts | 1 | 0 | 0 | 0 | 19.3s |
| teller-cash-management.spec.ts | 2 | 0 | 0 | 0 | 28.4s |
All 114 tests — click to expand
backend.setup.ts
- ✅ seed backend reference data —
2.2s - ✅ seed backend reference data —
2.2s - ✅ seed backend reference data —
1.2s
accounting-closure-backend.spec.ts
- ✅ Accounting closures against Fineract › a closed period reads as Closed, and the platform refuses a posting inside it —
7.0s - ✅ Accounting closures against Fineract › the form keeps the user on the page and names the reason when Fineract refuses —
6.0s
batch-api-operations.spec.ts
- ✅ Batch API Operations against Fineract › runs the sample batch scenario — create client, create loan, add and read back a charge —
5.8s - ✅ Batch API Operations against Fineract › shows a parse error instead of submitting when the batch input is not valid JSON —
8.3s - ✅ Batch API enclosingTransaction semantics against Fineract › rolls back the earlier steps when enclosingTransaction is true and a later step fails —
4.9s - ✅ Batch API enclosingTransaction semantics against Fineract › does not roll back the earlier steps when enclosingTransaction is false and a later step fails —
5.4s(retried 2×) - ✅ Batch API Operations on a mobile viewport against Fineract › the sample batch scenario is reachable and works by touch at mobile width —
5.3s
center-servicing.spec.ts
- ✅ Center servicing › a center is activated, staffed and given a group —
12.8s - ✅ Center servicing › notes are recorded against the center —
5.2s
client-legal-form-search.spec.ts
- ✅ Client list: legal form filtering › an entity client appears in the main client list —
5.2s
client-transfer.spec.ts
- ✅ Client transfer between offices › a proposed transfer is held until the destination accepts, and then the client moves —
11.5s - ✅ Client transfer between offices › a rejected transfer leaves the client on hold, and withdrawing is the way back —
12.6s - ✅ Client transfer between offices › a client can be transferred in one step when the user may act for both offices —
10.8s - ✅ Client staff assignment › an officer can be assigned and then removed —
11.2s
deposit-account-servicing.spec.ts
- ✅ Term deposit account servicing › an account is approved, activated and closed before maturity —
11.5s - ✅ Term deposit account servicing › a deposit is recorded, listed, and reversed without leaving the list —
8.3s - ✅ Term deposit account servicing › an application can be rejected instead of approved —
6.4s
deposit-product-configuration.spec.ts
- ✅ Deposit product configuration › a fixed deposit product survives being edited —
6.0s - ✅ Deposit product configuration › a recurring deposit product can be created at all —
4.5s - ✅ Deposit product configuration › a savings product carries its accounting configuration —
6.0s
form-layout-reflow.spec.ts
- ✅ form layout at the narrow viewport › Create GL Account gives every field a usable width at 320px —
4.6s - ✅ form layout at the narrow viewport › Create Loan gives every field a usable width at 320px —
4.6s - ✅ form layout at the narrow viewport › Create Office gives every field a usable width at 320px —
4.6s - ✅ form layout at the narrow viewport › Create Staff gives every field a usable width at 320px —
5.0s - ✅ form layout at the narrow viewport › no page-level horizontal scroll at 320px —
8.9s - ✅ form layout at the wide viewport › Create GL Account still uses more than one column at 1280px —
4.1s
group-membership.spec.ts
- ✅ Group membership and lifecycle › a group is activated, staffed, given members and a committee, then emptied —
20.1s - ✅ Group membership and lifecycle › notes are recorded against the group and can be removed again —
8.1s - ✅ Group membership and lifecycle › an empty group is closed with a reason, and a group with members is refused —
19.8s
loan-account-actions.spec.ts
- ✅ Loan account lifecycle actions › new action menu items appear only for active loans —
6.9s - ✅ Loan account lifecycle actions › undo disbursal shows a confirm dialog and reverts the loan to Approved —
8.9s - ✅ Loan account lifecycle actions › write off requires confirmation and moves the loan out of Active status —
8.4s
loan-approved-amount-revision.spec.ts
- ✅ Loan approved and available-disbursement amount revision › revises the approved amount on an active, partially-disbursed loan —
7.0s - ✅ Loan approved and available-disbursement amount revision › revises the available disbursement amount, which also changes the approved amount —
6.9s - ✅ Loan approved and available-disbursement amount revision › shows the platform’s own refusal, not a generic validation message —
6.6s
loan-charge-off.spec.ts
- ✅ Loan servicing commands › charges a loan off through the UI and reverses it —
11.0s - ✅ Loan servicing commands › records a goodwill credit through the shared transaction form —
9.9s
loan-product-accounting.spec.ts
- ✅ Loan product accounting › a cash-accounting product is configured, round-trips on edit, and posts to the ledger —
34.0s
loan-servicing.spec.ts
- ✅ Loan servicing: notes and transaction adjustment › notes can be added and removed, with a confirm dialog on delete —
9.2s - ✅ Loan servicing: notes and transaction adjustment › a repayment transaction can be viewed and adjusted with a corrected amount —
10.8s
login.spec.ts
- ✅ Login › login page displays correctly —
1.5s - ✅ Login › login form has required fields —
1.5s - ✅ Login › submit button is disabled when form is empty —
1.4s - ✅ Login › submit button is enabled when form is filled —
1.4s
oidc-login-backend.spec.ts
- ✅ identity-provider route against a real Fineract › is offered beside the password form, and pressing it sends nothing to Fineract —
1.4s - ✅ identity-provider route against a real Fineract › a real password sign-in still gets a session with the route offered —
3.3s
parity-screens.spec.ts
- ✅ Screens added for platform parity › a manual journal entry can be read whole and reversed —
5.5s - ✅ Screens added for platform parity › an entry that is already reversed is not offered again —
5.4s - ✅ Screens added for platform parity › a report definition can be created, edited and deleted; a core one cannot —
6.1s - ✅ Screens added for platform parity › a core report opens read-only with only its in-use setting —
4.7s - ✅ Screens added for platform parity › a pending loan is approved from the queue, in a batch —
6.6s - ✅ Screens added for platform parity › a fixed deposit is listed as a deposit, not as a savings account —
5.2s - ✅ Screens added for platform parity › an office has a screen, and it carries its custom fields —
5.0s - ✅ Screens added for platform parity › a savings account carries notes, and the note survives a reload —
7.1s
rbac-backend-restricted-user.spec.ts
- ✅ a genuinely restricted Fineract user › holds exactly the permissions their role was granted —
245ms - ✅ a genuinely restricted Fineract user › reaches the screen their permission covers —
5.0s - ✅ a genuinely restricted Fineract user › is refused a screen their permission does not cover, by URL and by the backend —
4.7s - ✅ a genuinely restricted Fineract user › is refused a write screen they can read the list for, and the write itself —
7.5s - ✅ a genuinely restricted Fineract user › is not offered the actions it would be refused for —
4.1s - ✅ a genuinely restricted Fineract user › is shown an action it cannot take, disabled and saying what it needs —
6.5s - ✅ a genuinely restricted Fineract user › the superuser the rest of the suite uses is unaffected —
9.5s
rbac-disabled-flag-backend.spec.ts
- ✅ rbacEnabled: false, with a user who holds only READ_CLIENT › is shown the whole navigation, including modules their role does not cover —
3.5s - ✅ rbacEnabled: false, with a user who holds only READ_CLIENT › is admitted by the route guard to a screen their role does not cover —
7.3s - ✅ rbacEnabled: false, with a user who holds only READ_CLIENT › is still refused by Fineract, which the flag does not reach —
608ms - ✅ rbacEnabled: false, with a user who holds only READ_CLIENT › is told the list is beyond their role, and not offered a retry that cannot succeed —
5.5s - ✅ rbacEnabled: false, with a user who holds only READ_CLIENT › gets the same treatment on a second refused list, not a one-screen fix —
5.4s - ✅ rbacEnabled: false, with a user who holds only READ_CLIENT › still loads the list their role does cover, with no failure state at all —
5.6s
rbac-multi-permission.spec.ts
- ✅ a route declaring more than one permission code (OR semantics) › is admitted by either declared code alone —
5.0s - ✅ a route declaring more than one permission code (OR semantics) › is admitted by the other declared code alone —
5.0s - ✅ a route declaring more than one permission code (OR semantics) › is refused when holding neither declared code, by the router and by the backend —
5.0s - ✅ ALL_FUNCTIONS_READ, against the real Fineract permission catalogue › reaches read screens across modules it holds no specific code for —
9.4s - ✅ ALL_FUNCTIONS_READ, against the real Fineract permission catalogue › is refused every write screen, and the writes themselves —
7.4s - ✅ a restricted session across a real page reload › keeps the same permission boundary after reloading, not just after a fresh login —
10.5s - ✅ a second real action-level gate, distinct from loan repayment › is shown the Approve action disabled and naming what it needs, refused by the backend too —
6.3s - ✅ Security module writes (users, roles), against the real backend › reaches the list screens but is refused the write screens —
11.7s - ✅ Security module writes (users, roles), against the real backend › is refused creating a user and modifying a role, by the backend itself —
304ms
bulk-import-entity-types.spec.ts
- ✅ every offered entity type is one the platform accepts —
7.3s
delinquency-configuration.spec.ts
- ✅ creates a delinquency range, then edits it —
6.2s - ✅ creates a delinquency bucket from the ranges the template offers —
6.8s
full-demo.spec.ts
- ✅ Full feature demo recording › walk through loan schedule type, lifecycle, custom fields, collateral, and disbursement —
43.7s
interest-rate-charts.spec.ts
- ✅ lists charts without a server error —
5.4s
loan-lifecycle.spec.ts
- ✅ Loan lifecycle: creation, approval, disbursement › create, approve, and disburse a Cumulative loan —
23.1s - ✅ Loan lifecycle: creation, approval, disbursement › create, approve, and disburse a Progressive loan —
23.3s - ✅ Loan lifecycle: creation, approval, disbursement › an approved loan can be returned to pending approval —
21.1s - ✅ Loan lifecycle: creation, approval, disbursement › the delinquency tab reads a real loan, and the empty data tabs stay hidden —
20.6s
loan-schedule-type.spec.ts
- ✅ Loan Schedule Type (Cumulative vs Progressive) › loan products list shows a schedule type chip per product —
5.6s - ✅ Loan Schedule Type (Cumulative vs Progressive) › create a Progressive loan product end-to-end and verify it round-trips —
9.1s - ✅ Loan Schedule Type (Cumulative vs Progressive) › loan creation shows the schedule type badge for a Progressive product —
6.8s
rbac-office-scoped-user.spec.ts
- ✅ an account scoped to a branch office › differs from a head-office account in office alone, not in permissions —
274ms - ✅ an account scoped to a branch office › is shown only its own office in the client list, and told which office it is in —
3.7s - ✅ an account scoped to a branch office › sees a shorter list than an identically-permissioned head-office account —
3.7s - ✅ an account scoped to a branch office › is refused another office’s client by the platform, and told so once —
3.9s - ✅ an account scoped to a branch office › can still open the record that is in its own office —
3.5s - ✅ an account scoped to a branch office › is not offered an edit it would be refused for on the Offices screen —
5.3s
rbac-permissionless-user.spec.ts
- ✅ an account whose role grants nothing › is authenticated by Fineract and authorized by it for nothing —
504ms - ✅ an account whose role grants nothing › is signed in and landed on a screen rather than stranded at the login form —
3.6s - ✅ an account whose role grants nothing › is offered no permission-gated module, and refused each one by URL and by Fineract —
8.6s - ✅ an account whose role grants nothing › is left a navigation whose entries actually work —
3.6s
report-mailing-job.spec.ts
- ✅ report mailing job creation › is no longer refused for a missing parameter —
4.2s - ✅ report mailing job creation › the payload carries the locale and the schedule —
3.9s - ✅ report mailing job creation at the narrow viewport › every field is reachable and the job still saves at 320px —
5.3s
report-parameter-backend.spec.ts
- ✅ Dynamic report parameters against Fineract › keeps the parameter form available when a report has cascading lookups —
3.0s - ✅ Dynamic report parameters against Fineract › changing Office changes the Client Listing row set —
5.2s - ✅ Cascading report parameters against Fineract › sends the parent value to the child lookup and clears the child when it changes —
5.2s - ✅ Chart reports against Fineract › renders a chart report as a chart rather than a table —
3.3s
savings-transaction-correction.spec.ts
- ✅ Savings transaction correction › a deposit is reversed and a hold is released —
4.7s
share-account-servicing.spec.ts
- ✅ Share account servicing › an account is approved, activated, traded and closed —
11.3s - ✅ Share account servicing › an application can be rejected —
4.1s
share-product-accounting.spec.ts
- ✅ Share product accounting › a share product is mapped to equity and round-trips on edit —
19.3s
teller-cash-management.spec.ts
- ✅ Teller cash management › a cashier is listed, receives an allocation, and settles cash back —
19.3s - ✅ Teller cash management › settling more than the cashier holds is refused and the form stays usable —
9.2s
Slowest 10 — what the shard counts should be tuned against
| Test | Spec | Time |
|---|---|---|
| Full feature demo recording › walk through loan schedule type, lifecycle, custom fields, collateral, and disbursement | full-demo.spec.ts |
43.7s |
| Loan product accounting › a cash-accounting product is configured, round-trips on edit, and posts to the ledger | loan-product-accounting.spec.ts |
34.0s |
| Loan lifecycle: creation, approval, disbursement › create, approve, and disburse a Progressive loan | loan-lifecycle.spec.ts |
23.3s |
| Loan lifecycle: creation, approval, disbursement › create, approve, and disburse a Cumulative loan | loan-lifecycle.spec.ts |
23.1s |
| Loan lifecycle: creation, approval, disbursement › an approved loan can be returned to pending approval | loan-lifecycle.spec.ts |
21.1s |
| Loan lifecycle: creation, approval, disbursement › the delinquency tab reads a real loan, and the empty data tabs stay hidden | loan-lifecycle.spec.ts |
20.6s |
| Group membership and lifecycle › a group is activated, staffed, given members and a committee, then emptied | group-membership.spec.ts |
20.1s |
| Group membership and lifecycle › an empty group is closed with a reason, and a group with members is refused | group-membership.spec.ts |
19.8s |
| Share product accounting › a share product is mapped to equity and round-trips on edit | share-product-accounting.spec.ts |
19.3s |
| Teller cash management › a cashier is listed, receives an allocation, and settles cash back | teller-cash-management.spec.ts |
19.3s |
📼 Download the HTML report, videos and traces — see the playwright-report-backend artifact.
Generated by run 36996950653 from 6cf52a2. The run executed a fork branch, so treat its contents as unverified.
What and why
Determines, for issue #572, whether the
ng-untouched/ng-touchedNG0100 shape (atNgControlStatus_HostBindings/NgControlStatusGroup_HostBindings) is a real application defect or a sampling artifact — it's the latter — and fixes the e2e fixture's wrong URL attribution that made the original report misleading.The change-detection fixture accumulated NG0100 errors for a whole test and printed
page.url()only when it flushed, so a long multi-page journey blamed every error on wherever the test happened to end up.teller-cash-management.spec.tsvisits the GL account and financial activity mapping forms early and finishes on a cashier transactions page, which is why those components were reported under that URL. Each error is now tagged withpage.url()as it arrives instead.Also determines the open question of whether the
ng-untouched/ng-touched/etc. NG0100 shape is an application defect: it is not.exhaustiveCheckNoChangesInterval(@angular/core) schedules its sweep on a plainsetTimeout, decoupled from the zone-driven render scheduler apart from a best-effortpendingRenderTaskId/runningTickguard, so it can occasionally diff a live control-status getter against a stale render during that gap. The ordinarycheckNoChangespass Angular always pairs with a real tick in dev mode has no such gap and cannot produce this. It also is not reactive-forms-specific, sinceNgControlStatusattaches tongModelcontrols too.Narrows what
ENFORCE_CD_ERRORStreats as a failure to exclude this known artifact (still reported viaconsole.warn) rather than treating it as a defect to fix in the components themselves. FlippingENFORCE_CD_ERRORSto the default is out of scope — the issue ties that to the companion two-way-binding issue as well.Closes #572
Verification
checkNoChangesInternalin@angular/core(core.mjs,_debug_node-chunk.mjs) to confirm the interval sweep is the only path that can observe this kind of drift; the per-tickcheckNoChangesinApplicationRef.tickImplhas no time gap to drift in.gl-account-formdirectly against themockedproject — 40 rapid fill/select cycles through bothion-selectpopovers and everyngModelfield, the same interactionteller-cash-management.spec.tsperforms once — and could not reproduce the NG0100 shape, consistent with a rare scheduler-timing race rather than a deterministic template bug.npm run typecheck:e2e— clean.npm run format:check— clean.npm run test:unit— 1812/1816 passing; the 4 failures are pre-existingTestBedhook timeouts in unrelated components (share-dividend-form,working-capital-loan), untouched by this change.npx playwright test --project=mocked e2e/functional-coverage.spec.ts e2e/login.spec.ts e2e/client.spec.ts— 43/43 passing. Covers the GL-account and financial-activity-mapping form creation flows directly, plus the login flow every test in the suite exercises through this fixture.mockedproject to completion locally (environment time constraints); the subset above is the part of the suite this change can affect. Nobackendproject run — no backend-dependent behavior changed.Screenshots
Not applicable — this changes e2e test infrastructure only, no UI or user-visible behavior.
AI assistance (optional)
Checklist
src/app/api/.src/app/core/adapters/instead of direct browser globals or imperative third-party APIs. (N/A — no component or service code changed)