Skip to content

Unit tests for JavaScript Data Models #365

Closed

Description

@suraj-yadav0

Part of #357

Add unit test coverage for domain data models and query logic.

Target Modules

  • models/task.js: Comma-separated assignee parsing/formatting, task state updates, filter logic, query builders
  • models/timesheet.js: Duration arithmetic, quadrant calculations, date range filtering, timesheet aggregations
  • models/project.js: Local ID to Odoo ID resolution, project hierarchy handling
  • models/activity.js: Activity state checks, activity validation, activity list filters
  • models/accounts.js: Default account resolution, active account checks, account validation
  • models/notifications.js: Notification payload formatting, unread counts, type filters
  • models/Main.js: Quadrant calculation helpers, analytics aggregation logic

Implementation

  • Can be tested via Qt Quick Test (TestCase importing .js files via .import) or a headless test harness with mock SQLite data fixtures.

Activity

  1. linked a pull request that will close this issueTest/365 js data models unit tests #379on Oct 13, 2026
  2. suraj-yadav0 commented on Oct 13, 2026

    @suraj-yadav0
    CollaboratorAuthor

    Resolved and merged in PR #379.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions