mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-05 18:20:39 -08:00
* feat: basic git gui using @tomplum/react-git-log * Replace menu bar toggle with mini window shortcut Removed the menu bar toggle option and its Windows-specific logic from the View menu. Added a new menu item for toggling the Tidgi mini window, using a configurable keyboard shortcut from preferences. * update i18n * refactor: use table for default view for cleaner timeline * test: commit * Add realtime git log updates and e2e test support Implements detection and display of uncommitted changes in the Git Log window, adds a commit button for uncommitted changes, and refreshes data in response to git state changes using an observable. Adds e2e test step definitions and log markers for commit, revert, and checkout operations to support automated testing. Removes alert popups from commit, revert, and checkout actions in the UI. * refactor: steps with descripton * fix: watch fs on git checkout * fix: echo of file on start * feat: loading state on revert * feat: ai commit message * feat: check free model * fix: remove duplicated backup action * fix: git method wrong place * fix: model not auto filled * refactor: preload $:/info/tidgi/workspaceID by 'module-type': 'info', * fix: workspace context menu * fix: show correct menu on view * feat: let tooltip show files instead of hash * feat: view dark theme * feat: better diff ui, and upgrade dugite * Update aiCommitMessage.ts * Update gitLog.feature * fix: menu click test * fix: The isInitialLoad check is computed twice * fix: import wiki form cursor position wrong * fix: git log frequently load data * fix: hide wiki menu * fix: import wiki form not working * fix: timer not cleared * onBlur handler that resets the field to the current valid preference value * fix: review error * Update useGitLogData.ts * Update newAgent.feature * Update newAgent.feature * fix: test randomly fail * fix * fix * Update wiki.ts * fix: wait for mark * Git-Sync-JS logger fix * Git-Sync-JS more logs * Git-sync-js fix no commiter email * Update gitOperations.ts
51 lines
3.1 KiB
Gherkin
51 lines
3.1 KiB
Gherkin
Feature: AI-Generated Git Commit Messages
|
||
As a user
|
||
I want AI to automatically generate commit messages
|
||
So that I can have meaningful backup titles based on my changes
|
||
|
||
Background:
|
||
Given I cleanup test wiki so it could create a new one on start
|
||
Given I add test ai settings:
|
||
| freeModel | true |
|
||
| aiGenerateBackupTitle | true |
|
||
And I launch the TidGi application
|
||
And I wait for the page to load completely
|
||
Then I should see a "default wiki workspace" element with selector "div[data-testid^='workspace-']:has-text('wiki')"
|
||
When I click on a "default wiki workspace button" element with selector "div[data-testid^='workspace-']:has-text('wiki')"
|
||
Then the browser view should be loaded and visible
|
||
And I wait for SSE and watch-fs to be ready
|
||
And I wait for "git initialization" log marker "[test-id-git-init-complete]"
|
||
|
||
@git @mockOpenAI
|
||
Scenario: AI generates commit message based on file changes
|
||
And I have started the mock OpenAI server
|
||
| response | stream |
|
||
| 更新 Index 条目:添加关于 AI 测试的内容 | false |
|
||
# Modify a file to create changes
|
||
When I modify file "{tmpDir}/wiki/tiddlers/Index.tid" to contain "AI-generated commit message test content"
|
||
Then I wait for tiddler "Index" to be updated by watch-fs
|
||
And I wait for 3 seconds for "git to detect file changes"
|
||
# Open Git Log window to commit using the button
|
||
When I click menu "知识库 > 查看历史备份"
|
||
And I switch to "gitHistory" window
|
||
And I wait for the page to load completely
|
||
# Should see uncommitted changes row
|
||
Then I should see a "uncommitted changes row" element with selector "tr:has-text('未提交')"
|
||
# Click on the uncommitted changes row
|
||
When I click on a "uncommitted changes row" element with selector "tr:has-text('未提交')"
|
||
# Verify we can see the modified Index.tid file
|
||
Then I should see a "Index.tid file in uncommitted list" element with selector "li:has-text('Index.tid')"
|
||
# Switch to Actions tab
|
||
When I click on a "actions tab" element with selector "button[role='tab']:has-text('操作'), button[role='tab']:has-text('Actions')"
|
||
# Verify the commit now button is visible
|
||
Then I should see a "commit now button" element with selector "button[data-testid='commit-now-button']"
|
||
# Click the commit now button - this will trigger AI generation
|
||
When I click on a "commit now button" element with selector "button[data-testid='commit-now-button']"
|
||
Then I wait for "git commit completed" log marker "[test-id-git-commit-complete]"
|
||
# Wait for git log data to be updated and rendered to DOM
|
||
Then I wait for "git log data rendered to DOM" log marker "[test-id-git-log-data-rendered]"
|
||
# After commit, verify AI-generated message and file in git log table
|
||
# Message is in p.MuiTypography-body2, file div has aria-label
|
||
Then I should see "commit with AI message and Index.tid file" elements with selectors:
|
||
| p.MuiTypography-body2:has-text('更新 Index 条目') |
|
||
| div.MuiBox-root[aria-label*='Index.tid'] |
|