https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43517

            Bug ID: 43517
           Summary: Enable vue-tsc type checking and shared Cypress
                    component-test shims
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Test Suite
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
            Blocks: 41129
  Target Milestone: ---

This patch enables vue-tsc type checking for .vue files project-wide, and adds
shared Cypress component-test environment shims that any future Vue component
test can rely on.

Specifically:
- tsconfig.json: target the language level rspack/swc actually emit (ES2020),
and let JSDoc types in .js files flow into type checking.
- eslint.config.mjs: parse <script> blocks in .vue files with the TypeScript
parser.
- package.json: bump typescript and add vue-tsc as a dev dependency.
- vue/ambient.d.ts: ambient module declarations for third-party libraries that
ship without their own types (flatpickr, bootstrap Modal, vue-select), and for
CSS side-effect imports.
- t/cypress/support/console-hooks.js: shared hooks (used by both e2e and
component tests) that make console.warn throw so real warnings fail tests fast,
and that fail DataTables warnings logged via console.log.
- t/cypress/support/component.ts: mirror the globals normally provided by
page-level includes (window.dayjs, window.flatpickr with Koha's defaults,
window.$timezone(), String.prototype.format) so components that depend on them
can mount in isolation, and wire in the new console-hooks.

None of this is feature-specific; it's split out from bug 41129 (booking
workflows) because it benefits from independent review and several later
patches depend on it.

Test plan:
1. Run: yarn tsc --noEmit (or the project's vue-tsc check script) and confirm
it passes with no new errors.
2. Run the full Cypress component suite and confirm nothing regresses.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129
[Bug 41129] Migrate place_booking.js to a Vue island.
-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to