Skip to content

Fix Qt app tests - enable migrations in demo mode#59

Merged
doumdi merged 4 commits intomainfrom
copilot/fix-all-tests
Jan 2, 2026
Merged

Fix Qt app tests - enable migrations in demo mode#59
doumdi merged 4 commits intomainfrom
copilot/fix-all-tests

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

Qt app tests were failing due to database schema mismatches and build configuration issues.

Changes

  • CMakeLists.txt: Moved qt6_add_translations after executable target creation to fix "target does not exist" error during CMake configuration

  • database.cpp: Removed conditional that skipped migrations in demo mode. Schema version 7 adds task_id and subtask_id columns required by TimeEntryManager::createTimeEntry(), causing "Parameter count mismatch" errors when migrations were skipped

  • test_timeentrymanager.cpp: Added initTestCase() to initialize database and create test project. Added QVERIFY assertions for SQL operations

The root cause was migrations being skipped for in-memory databases, leaving the schema at v1 while application code expected v7 schema.

// Before: migrations skipped in demo mode
if (!m_demoMode) {
    if (!runMigrations()) { ... }
}

// After: migrations always run
if (!runMigrations()) { ... }

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)
  • www.electronjs.org
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/project-time-tracker/project-time-tracker/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/project-time-tracker/project-time-tracker/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js -I as time�� racker/project-t-I ir/build.make ir/build -I racker/project-t-c /tests" manager_autogen/timestamp atic�� ager_autogen/include anager.dir/build.make anager.dir/build ends "Unix Makefgit /home/REDACTED/worshow --64 as (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Fix all tests</issue_title>
<issue_description>Some tests are not working. Fix implementation if needed.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 2, 2026 20:48
…sing test initialization

Co-authored-by: doumdi <711286+doumdi@users.noreply.github.com>
Co-authored-by: doumdi <711286+doumdi@users.noreply.github.com>
Co-authored-by: doumdi <711286+doumdi@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix implementation for failing tests Fix Qt app tests - enable migrations in demo mode Jan 2, 2026
Copilot AI requested a review from doumdi January 2, 2026 20:54
@doumdi doumdi marked this pull request as ready for review January 2, 2026 20:59
@doumdi doumdi merged commit 4e51a87 into main Jan 2, 2026
1 check passed
@doumdi doumdi deleted the copilot/fix-all-tests branch January 2, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix all tests

2 participants