diff --git a/src/lib/components/tests/Keyboard.test.js b/src/lib/components/tests/Keyboard.test.js index aa8bf7fa..e8112d58 100644 --- a/src/lib/components/tests/Keyboard.test.js +++ b/src/lib/components/tests/Keyboard.test.js @@ -1298,4 +1298,31 @@ it('Keyboard onKeyReleased will work', () => { expect(pressed).toBeTruthy(); expect(firedTimes).toBe(1); 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 + } + ] + }); }); \ No newline at end of file diff --git a/src/lib/services/tests/Utilities.test.js b/src/lib/services/tests/Utilities.test.js index b846526e..01252561 100644 --- a/src/lib/services/tests/Utilities.test.js +++ b/src/lib/services/tests/Utilities.test.js @@ -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', () => {