desktop: the notification plugin's refused is_permission_granted probe at page load (macOS, Linux; the webview has no plugin API) is no longer logged as a start error in webview.log
This commit is contained in:
parent
7901beee1e
commit
2e66aa42b6
3 changed files with 23 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import { runInNewContext } from 'node:vm';
|
|||
import { parseAst } from 'vite';
|
||||
import { rewrite } from '../build/freeze-safe';
|
||||
import { DEFAULT_SETTINGS } from '../src/api';
|
||||
import { ignoredRejection } from '../src/lib/crash';
|
||||
import { NO_OVERRIDES } from '../src/lib/identity';
|
||||
import { normalizeAccounts, normalizeProjects, normalizeSettings, normalizeWorkspace } from '../src/lib/normalize';
|
||||
|
||||
|
|
@ -85,6 +86,15 @@ describe('error screens are wired in', () => {
|
|||
expect(src('src/main.tsx')).toContain("dataset.booted = '1'");
|
||||
expect(src('src/main.tsx')).toContain('<ErrorBoundary where="app" full>');
|
||||
});
|
||||
test("the notification plugin's refused permission probe is not reported (boot.js and crash.ts)", () => {
|
||||
// seen on Linux in CI (Xvfb): the plugin's init script calls is_permission_granted, which the capability refuses
|
||||
const probe = 'Command plugin:notification|is_permission_granted not allowed by ACL';
|
||||
expect(ignoredRejection(probe)).toBe(true);
|
||||
expect(ignoredRejection(new Error(probe))).toBe(true);
|
||||
expect(ignoredRejection('Command plugin:notification|notify not allowed by ACL')).toBe(false);
|
||||
expect(ignoredRejection(new Error('sidecar did not start'))).toBe(false);
|
||||
expect(src('public/boot.js')).toContain('/plugin:notification\\|is_permission_granted not allowed/.test(text(e))');
|
||||
});
|
||||
test('every screen and app tab has its own boundary', () => {
|
||||
expect(src('src/App.tsx')).toMatch(/<ErrorBoundary key=\{route\.screen === 'app'/);
|
||||
expect(src('src/screens/AppView.tsx')).toMatch(/<ErrorBoundary key=\{tab\}/);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue