TidGi-Desktop/features/tidgiMiniWindow.feature
lin onetwo 19ef74a4a6
Feat/mini window (#642)
* feat: new config for tidgi mini window

* chore: upgrade electron-forge

* fix: use 汉语 和 漢語

* feat: shortcut to open mini window

* test: TidGiMenubarWindow

* feat: allow updateWindowProperties on the fly

* fix: wrong icon path

* fix: log not showing error message and stack

* refactor: directly log error when using logger.error

* feat: shortcut to open window

* fix: menubar not closed

* test: e2e for menubar

* test: keyboard shortcut

* test: wiki web content, and refactor to files

* test: update command

* Update Testing.md

* test: menubar settings about menubarSyncWorkspaceWithMainWindow, menubarFixedWorkspaceId

* test: simplify menubar test and cleanup test config

* fix: view missing when execute several test all together

* refactor: use hook to cleanup menubar setting

* refactor: I clear test ai settings to before hook

* Add option to show title bar on menubar window

Introduces a new preference 'showMenubarWindowTitleBar' allowing users to toggle the title bar visibility on the menubar window. Updates related services, interfaces, and UI components to support this feature, and adds corresponding localization strings for English and Chinese.

* refactor: tidgiminiwindow

* refactor: preference keys to right order

* Refactor window dimension checks to use constants

Replaces hardcoded window dimensions with values from windowDimension and WindowNames constants for improved maintainability and consistency in window identification and checks.

* I cleanup test wiki

* Update defaultPreferences.ts

* test: mini window workspace switch

* fix: image broken by ai, and lint

* fix: can't switch to mini window

* refactor: useless todo

* Update index.ts

* refactor: reuse serialize-error

* Update index.ts

* Update testKeyboardShortcuts.ts

* refactor: dup logic

* Update ui.ts

* fix: electron-ipc-cat
2025-10-21 20:07:04 +08:00

38 lines
2.2 KiB
Gherkin

@tidgiminiwindow
Feature: TidGi Mini Window
As a user
I want to enable and use the TidGi mini window
So that I can quickly access TidGi from the system tray
Scenario: Enable tidgi mini window and test keyboard shortcut
Given I cleanup test wiki so it could create a new one on start
And I launch the TidGi application
And I wait for the page to load completely
And I click on an "open preferences button" element with selector "#open-preferences-button"
And I switch to "preferences" window
When I click on a "tidgi mini window section" element with selector "[data-testid='preference-section-tidgiMiniWindow']"
And I confirm the "tidgiMiniWindow" window does not exist
When I click on an "attach to tidgi mini window switch" element with selector "[data-testid='attach-to-tidgi-mini-window-switch']"
And I confirm the "tidgiMiniWindow" window exists
And I confirm the "tidgiMiniWindow" window not visible
Then I should see "always on top toggle and workspace sync toggle" elements with selectors:
| [data-testid='tidgi-mini-window-always-on-top-switch'] |
| [data-testid='tidgi-mini-window-sync-workspace-switch'] |
Then I click on a "shortcut register button" element with selector "[data-testid='shortcut-register-button']"
And I press the key combination "CommandOrControl+Shift+M"
And I click on a "shortcut confirm button" element with selector "[data-testid='shortcut-confirm-button']"
And I close "preferences" window
Then I switch to "main" window
When I press the key combination "CommandOrControl+Shift+M"
And I confirm the "tidgiMiniWindow" window exists
And I confirm the "tidgiMiniWindow" window visible
And I confirm the "tidgiMiniWindow" window browser view is positioned within visible window bounds
And I switch to "tidgiMiniWindow" window
Then the browser view should be loaded and visible
And I should see " TiddlyWiki" in the browser view content
Then I switch to "main" window
When I press the key combination "CommandOrControl+Shift+M"
And I wait for 2 seconds
And I confirm the "tidgiMiniWindow" window exists
And I confirm the "tidgiMiniWindow" window not visible