feat(tests): add api e2e tests (#3617)

* feat(tests): add api e2e tests

* lockfile

* mobile

* try linux fix [skip ci]

* ios fix

* fix test on windows

* improve cache

* fix pnpm audit [skip ci]
This commit is contained in:
Lucas Fernandes Nogueira
2026-09-22 18:58:14 -03:00
committed by GitHub
parent 7f87091288
commit 684feb2510
47 changed files with 10292 additions and 107 deletions
+8 -2
View File
@@ -21,10 +21,16 @@ import type { Options } from './index'
let permissionValue = 'default'
async function isPermissionGranted(): Promise<boolean> {
// @ts-expect-error __TEMPLATE_windows__ will be replaced in rust before it's injected.
if (window.Notification.permission !== 'default' || __TEMPLATE_windows__) {
if (window.Notification.permission !== 'default') {
return await Promise.resolve(window.Notification.permission === 'granted')
}
// Windows always grants the permission, and asking the backend for it from
// the init script makes the WebView throw a STATUS_ACCESS_VIOLATION on
// remote websites, so answer it here instead of invoking.
// @ts-expect-error __TEMPLATE_windows__ will be replaced in rust before it's injected.
if (__TEMPLATE_windows__) {
return true
}
return await invoke('plugin:notification|is_permission_granted')
}