You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "pruthvi-builds (via GitHub)" <gi...@apache.org> on 2026/08/24 20:32:50 UTC

[PR] test: migrate loans specs to Vitest [fineract-backoffice-ui]

pruthvi-builds opened a new pull request, #453:
URL: https://github.com/apache/fineract-backoffice-ui/pull/453

   Closes part of #406 (part of #403) — migrates the `features/loans` half (13 specs).
   
   ## What changed
   
   - 12 of 13 specs converted mechanically with `scripts/codemod-jasmine-to-vitest.mjs`.
   - `loan-view.component.spec.ts` needed one manual decision: it uses the object-form
     `jasmine.createSpyObj('AuthService', ['hasPermission'], { currentUser: signal(...) })`,
     which mixes a spied method with a plain property — not representable by this repo's
     method-list-only `createSpyObj` helper (`src/app/testing/mocks.ts`), by design per that
     file's doc comment. Rewrote it as:
     ```ts
     const authServiceSpy = {
       ...createSpyObj<AuthService>(['hasPermission']),
       currentUser: signal({ ... }),
     };
     ```
     then re-ran the codemod on that one file, which converted everything else (imports,
     `.and.returnValue` → `.mockReturnValue`, `spyOn` → `vi.spyOn`, `toBeTrue`/`toBeFalse` →
     `toBe(true/false)`) mechanically.
   - `karma-baseline.json` updated via `check-test-runner.mjs --write`.
   - `eslint-suppressions.json`: the 10 pre-existing `no-restricted-imports` suppressions under
     the old `.spec.ts` paths were re-keyed to the new `.test.ts` paths. Used
     `eslint --suppress-rule no-restricted-imports --suppressions-location eslint-suppressions.json`
     scoped to just the 13 changed files, so nothing outside this PR's scope got touched. Net
     diff on that file is +10/-10 — count unchanged, only paths moved, per the issue's note.
   
   ## Verification
   
   - `npm run test:unit` — 805 passed (150 files)
   - `npm test -- --watch=false` (Karma, headless Chrome) — 568 passed
   - Combined total unchanged: before this PR, Karma had 568+13=581 and Vitest had 805-59=746
     (the 13 files carry 59 `it()` cases total, confirmed by diffing `it(` counts per file
     against the pre-migration `.spec.ts` versions — none dropped, none duplicated).
     568 + 805 = 581 + 746 = 1373.
   - `npm run lint` — clean
   - `npm run format:check` — clean (ran `npm run format` once to fix 4 files)
   - `npm run check:icons` — clean
   - `npm run i18n:check` — clean
   - `npm run build` — succeeds
   - `./scripts/check-license.sh` — clean (no new files)
   
   `package-lock.json` reverted after `npm install` — the version-field/lockfile-metadata drift
   it produced locally was unrelated to this change and out of scope.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test: migrate loans specs to Vitest [fineract-backoffice-ui]

Posted by "Aman-Mittal (via GitHub)" <gi...@apache.org>.
Aman-Mittal closed pull request #453: test: migrate loans specs to Vitest
URL: https://github.com/apache/fineract-backoffice-ui/pull/453


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test: migrate loans specs to Vitest [fineract-backoffice-ui]

Posted by "Aman-Mittal (via GitHub)" <gi...@apache.org>.
Aman-Mittal commented on PR #453:
URL: https://github.com/apache/fineract-backoffice-ui/pull/453#issuecomment-5462392669

   Closing  due to inactivity. Please recreate new PR with sign commits


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test: migrate loans specs to Vitest [fineract-backoffice-ui]

Posted by "Aman-Mittal (via GitHub)" <gi...@apache.org>.
Aman-Mittal commented on PR #453:
URL: https://github.com/apache/fineract-backoffice-ui/pull/453#issuecomment-5408910144

   @pruthvi-builds Please sign commits first 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test: migrate loans specs to Vitest [fineract-backoffice-ui]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #453:
URL: https://github.com/apache/fineract-backoffice-ui/pull/453#issuecomment-5400979116

   <!-- signed-commits -->
   
   ## Commits on this pull request are not verified
   
   1 of 1 commit is not showing as **Verified** on GitHub, so this pull request cannot be merged into `main` yet.
   
   ### `unsigned`
   
   These commits carry no signature at all.
   
   - `9bbd66e1` test: migrate loans specs to Vitest
   
   **How to fix:** Set up commit signing, then re-sign the commits already on this branch. [CONTRIBUTING.md](https://github.com/apache/fineract-backoffice-ui/blob/main/CONTRIBUTING.md#commit-signing) has the setup.
   
   ### Re-signing
   
   ```bash
   # only for the identity reasons above (no_user / unverified_email):
   git config user.email "you@example.com"
   
   # re-sign every commit on this branch:
   git rebase --exec 'git commit --amend --no-edit --reset-author -S' origin/main
   git push --force-with-lease
   ```
   
   Force-pushing is expected here — re-signing rewrites the commits, so their hashes change.
   
   ---
   
   This comment is posted automatically and updates itself when you push; it disappears once every commit verifies. If you believe this is wrong, say so on the pull request — a maintainer can check.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org