Maximize Workplace within its frame and add versioned Design Studio
This commit is contained in:
@@ -184,8 +184,9 @@ assert.ok(result.called.some(c=>Array.isArray(c)&&c[0]==='library'&&c[1].endsWit
|
||||
assert.equal(typeof result.called.find(c=>Array.isArray(c)&&c[0]==='init')[1].natives.Java_com_sun_security_auth_module_UnixSystem_getUnixInfo,'function');
|
||||
assert.ok(result.called.some(c=>Array.isArray(c)&&c[0]==='runMain'&&c[2].endsWith('workplace-window-monitor-v3.jar')));
|
||||
const workplaceCall=result.called.find(c=>Array.isArray(c)&&c[0]==='runMain');
|
||||
assert.equal(workplaceCall[1],'com.itac.mes.suite.presentation.MesSuiteFrameWebstartLauncher');
|
||||
assert.equal(workplaceCall[3],'itac.appid=Workplace');
|
||||
assert.equal(workplaceCall[1],'com.widgetworkbench.cheerpj.WorkplaceLauncher');
|
||||
assert.equal(workplaceCall[3],'com.itac.mes.suite.presentation.MesSuiteFrameWebstartLauncher');
|
||||
assert.equal(workplaceCall[4],'itac.appid=Workplace');
|
||||
assert.ok(result.called.find(c=>c[0]==='init')[1].javaProperties.includes('os.name=CheerpJ Browser'));
|
||||
assert.ok(result.called.find(c=>c[0]==='init')[1].javaProperties.includes('user.name=cheerpj-client'));
|
||||
|
||||
@@ -193,7 +194,7 @@ assert.ok(result.called.some(c=>c[0]==='setProperty'&&c[1]==='os.name'&&c[2]==='
|
||||
assert.ok(result.called.some(c=>c[0]==='setProperty'&&c[1]==='user.name'&&c[2]==='cheerpj-client'));
|
||||
assert.ok(result.called.findIndex(c=>c[0]==='setProperty'&&c[1]==='os.name')<runIndex);
|
||||
|
||||
assert.equal(workplaceCall[2].split(':').length,132);
|
||||
assert.equal(workplaceCall[2].split(':').length,133);
|
||||
assert.ok(!result.called.some(c=>c[0]==='sysparamPatchVerify'));
|
||||
assert.ok(!result.called.some(c=>c[0]==='sysparamProbe'));
|
||||
assert.match(workplaceCall[2],/\/app\/backend\/hmi\/cheerpj-libs\/javax\.json-1\.1\.4\.jar/);
|
||||
|
||||
5
hmi-frontend/tests/design-package.mjs
Normal file
5
hmi-frontend/tests/design-package.mjs
Normal file
@@ -0,0 +1,5 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import {validateDesign,newDesign} from '../src/designs.ts';
|
||||
for(const base of ['ios','neon','dark','light']){const d=newDesign(base);assert.deepEqual(validateDesign(JSON.parse(JSON.stringify(d))),d);}
|
||||
for(const bad of [null,{}, {...newDesign('ios'),version:2},{...newDesign('ios'),baseTheme:'unknown'},{...newDesign('ios'),tokens:{'--bg':'url(https://example.org)'}},{...newDesign('ios'),tokens:{'--unknown':'#123456'}}])assert.throws(()=>validateDesign(bad));
|
||||
console.log('PASS design import/export schema: four bases, roundtrip and invalid payloads');
|
||||
Reference in New Issue
Block a user