Workplace Widget 5.10.5
This commit is contained in:
13
hmi-frontend/tests/cheerpj-autostart.mjs
Normal file
13
hmi-frontend/tests/cheerpj-autostart.mjs
Normal file
@@ -0,0 +1,13 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import {shouldAutoStartWidget} from '../src/widgets/cheerpjAutoStart.ts';
|
||||
// Newly created and historic Workplace widgets must start automatically.
|
||||
assert.equal(shouldAutoStartWidget('ui.cheerpj-workplace',{autoStart:true}),true);
|
||||
assert.equal(shouldAutoStartWidget('ui.cheerpj-workplace',{autoStart:false}),true);
|
||||
assert.equal(shouldAutoStartWidget('ui.cheerpj-workplace',{}),true);
|
||||
// Only an explicitly disabled runtime option stops Workplace autostart.
|
||||
assert.equal(shouldAutoStartWidget('ui.cheerpj-workplace',{manualStartOnly:true,autoStart:true}),false);
|
||||
assert.equal(shouldAutoStartWidget('ui.cheerpj-workplace',{manualStartOnly:false,autoStart:false}),true);
|
||||
// Generic JNLP remains opt-in to avoid unexpected Java program execution.
|
||||
assert.equal(shouldAutoStartWidget('ui.cheerpj',{autoStart:false}),false);
|
||||
assert.equal(shouldAutoStartWidget('ui.cheerpj',{autoStart:true}),true);
|
||||
console.log('CheerpJ autostart policy: 7 assertions passed.');
|
||||
Reference in New Issue
Block a user