export default {
get props() {
return { a: 3, b: 4, c: 5, d: 6 };
},
html: `
Length: 3
Values: 4,5,1
`,
async test({ assert, target, window }) {
const [btn1, btn2, btn3, btn4] = target.querySelectorAll('button');
const clickEvent = new window.MouseEvent('click');
await btn1.dispatchEvent(clickEvent);
assert.htmlEqual(
target.innerHTML,
`
Length: 3
Values: 4,5,1
`
);
await btn2.dispatchEvent(clickEvent);
assert.htmlEqual(
target.innerHTML,
`
Length: 3
Values: 34,5,1
`
);
await btn3.dispatchEvent(clickEvent);
assert.htmlEqual(
target.innerHTML,
`
Length: 3
Values: 34,5,31
`
);
await btn4.dispatchEvent(clickEvent);
assert.htmlEqual(
target.innerHTML,
`
Length: 4
Values: 34,5,31,2
`
);
}
};