Tests update

This commit is contained in:
Francisco Hodge 2019-08-11 20:23:59 -04:00
parent 74bb07d46a
commit 618800f455
2 changed files with 28 additions and 1 deletions

View File

@ -1298,4 +1298,31 @@ it('Keyboard onKeyReleased will work', () => {
expect(pressed).toBeTruthy(); expect(pressed).toBeTruthy();
expect(firedTimes).toBe(1); expect(firedTimes).toBe(1);
expect(buttonPressed).toBe("q"); expect(buttonPressed).toBe("q");
});
it('Keyboard buttonAttribute will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
buttonAttributes: [
{
attribute: "aria-label",
value: "bee",
buttons: "b B"
}
]
});
});
it('Keyboard buttonAttribute will warn about invalid entries', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
buttonAttributes: [
{
attribute: false,
value: null
}
]
});
}); });

View File

@ -13,7 +13,7 @@ it('Keyboard mergeDisplay will work', () => {
} }
}); });
expect(keyboard.getButtonElement("q").getAttribute("data-displaylabel")).toBe("qreplaced"); expect(keyboard.getButtonElement("q").querySelector("span").innerHTML).toBe("qreplaced");
}); });
it('Keyboard function buttons will work', () => { it('Keyboard function buttons will work', () => {