You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/component-slot-attribute-order/_config.js

16 lines
394 B

export default {
html: `
<button>Disable</button>
<button slot="footer">Button</button>
<button slot="footer">Button</button>
`,
async test({ assert, component, target, window }) {
const [btn, btn1, btn2] = target.querySelectorAll('button');
await btn.dispatchEvent(new window.MouseEvent('click'));
assert.equal(btn1.disabled, true);
assert.equal(btn2.disabled, true);
}
};