You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Share one fake desktop runtime across e2e specs #134
Several e2e specs fake the Tauri desktop runtime by setting window.isTauri and replacing window.__TAURI_INTERNALS__, and each spec writes its own fake. Fakes installed before the app loads (addInitScript) run against every native call the desktop app makes at startup: get_app_version and check_for_updates for the update check, and take_opened_file and plugin:event|listen for the opened-file inbox. Each of those fakes has to know about every startup command.
When the opened-file inbox was added in 2dc843a, the release notes test in tests/e2e/i18n.spec.ts was not updated. Its fake threw on take_opened_file, the app showed its "Could not open file" dialog, and the modal hid the settings button, so the test timed out for more than a month without anyone noticing (it is not tagged @smoke). That fake is fixed now, but the next startup command will break specs the same way.
Specs that install a fake before load: i18n.spec.ts, settings-legal-links.spec.ts, and desktop-file-open.spec.ts. The *-desktop-save.spec.ts specs switch to desktop mode after load, so startup code has already run as the web version there.
Proposal: add a shared helper, for example tests/e2e/helpers/fakeDesktop.ts, that installs isTauri and __TAURI_INTERNALS__ (including transformCallback). It should answer all startup commands with neutral defaults (no update, no opened file, event listen and unlisten succeed) and let each spec override or record only the commands it tests. Unknown commands should still throw, so new calls are noticed. Move the three specs above onto it, and consider whether the desktop-save specs should use it too.
Fixed in #139 (merged into develop as 83403f2): adds tests/e2e/helpers/fakeDesktop.ts and moves the seven specs that faked the desktop runtime onto it.
Activity
test: keep opened-file queue and signal atomic in the fake desktop
vycdev commentedon Nov 7, 2026
Fixed in #139 (merged into develop as 83403f2): adds tests/e2e/helpers/fakeDesktop.ts and moves the seven specs that faked the desktop runtime onto it.