mirror of https://github.com/sveltejs/svelte
parent
5980f0752c
commit
7c47cc19f7
@ -0,0 +1,27 @@
|
|||||||
|
export default {
|
||||||
|
data: {
|
||||||
|
props: {
|
||||||
|
disabled: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
html: `
|
||||||
|
<button disabled>click me</button>
|
||||||
|
`,
|
||||||
|
|
||||||
|
test(assert, component, target) {
|
||||||
|
const button = target.querySelector('button');
|
||||||
|
|
||||||
|
assert.ok(button.disabled);
|
||||||
|
|
||||||
|
component.set({
|
||||||
|
props: { disabled: false }
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.htmlEqual(
|
||||||
|
target.innerHTML,
|
||||||
|
`<button>click me</button>`
|
||||||
|
);
|
||||||
|
assert.ok(!button.disabled);
|
||||||
|
},
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
<button {{...props}} >click me</button>
|
Loading…
Reference in new issue