Expect ID-only result links for both layout families
This commit is contained in:
@@ -12,7 +12,8 @@ test('geometric templates retain their distinct silhouettes without bitmap masks
|
||||
assert.equal(imageShape(layouts[4],layouts[4].elements.find(s=>s.id==='I03')).borderRadius,'50%');
|
||||
assert.ok(imageShape(layouts[21],layouts[21].elements.find(s=>s.id==='I02')).clipPath.startsWith('polygon('));
|
||||
assert.notEqual(imageShape(layouts[21],layouts[21].elements.find(s=>s.id==='I02')).clipPath,imageShape(layouts[26],layouts[26].elements.find(s=>s.id==='I02')).clipPath);
|
||||
assert.equal(designUrl('ref-01','abc'),'/studio/layouts/ref-01?id=abc');
|
||||
assert.equal(designUrl('ref-01','abc'),'/studio/template-layout?id=abc');
|
||||
assert.equal(designUrl('standard-01','abc'),'/studio/template-layout?id=abc');
|
||||
});
|
||||
|
||||
test('element IDs work on HTTP origins without secure-context randomUUID',()=>{const saved=Object.getOwnPropertyDescriptor(globalThis,'crypto');let calls=0;Object.defineProperty(globalThis,'crypto',{configurable:true,value:{getRandomValues(array){for(let i=0;i<array.length;i++)array[i]=++calls;return array}}});try{const first=newElementId(),second=newElementId();assert.match(first,/^user-[a-f0-9]{32}$/);assert.notEqual(first,second)}finally{Object.defineProperty(globalThis,'crypto',saved)}});
|
||||
|
||||
Reference in New Issue
Block a user