Verify transport geometry, playback states and themed icons across both engines
This commit is contained in:
@@ -8,6 +8,7 @@ test('transport symbols cover all actions and layouts with monochrome SVG',()=>{
|
||||
for(const kind of ['play','pause','previous','next','back10','forward10','back15','forward']){
|
||||
assert.match(transport.svg(kind),new RegExp(`href="#transport-${kind}"`));
|
||||
assert.match(transport.svg(kind),/stroke="currentColor"/);
|
||||
assert.equal((transport.svg(kind).match(/<use /g)||[]).length,4,'layout selection lives on visible use elements');
|
||||
for(const layout of ['classic','f7-swipe','glass-stage','bento-hub'])assert.ok(transport.variants[layout][kind]);
|
||||
}
|
||||
assert.throws(()=>transport.svg('unknown'),/Unknown transport/);
|
||||
@@ -38,3 +39,10 @@ test('runtime sources never render legacy transport glyphs',()=>{
|
||||
}
|
||||
assert.deepEqual(failures,[]);
|
||||
});
|
||||
|
||||
test('state changes preserve named SVG nodes used by editor controls',()=>{
|
||||
let icon={id:'playIcon'};
|
||||
const button={querySelector(){return icon;},set innerHTML(value){this.markup=value;icon={id:''};},setAttribute(name,value){this[name]=value;}};
|
||||
transport.set(button,'pause');
|
||||
assert.equal(icon.id,'playIcon');assert.equal(button['aria-label'],'Pause');assert.match(button.markup,/#transport-pause-f7-swipe/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user