Supporting DOM element param

This commit is contained in:
Francisco Hodge
2020-02-06 00:30:41 -05:00
parent 304f47701e
commit 1a5d917a7d
12 changed files with 235 additions and 77 deletions
+22
View File
@@ -0,0 +1,22 @@
import DOMElementDemo from '../DOMElementDemo';
import Keyboard from '../../lib/components/Keyboard';
it('Demo will load', () => {
new DOMElementDemo();
});
it('Demo keyboards will be instantiated', () => {
const demo = new DOMElementDemo();
expect(demo.keyboard1).toBeInstanceOf(Keyboard);
expect(demo.keyboard2).toBeInstanceOf(Keyboard);
});
it('Demo input change will work', () => {
const demo = new DOMElementDemo();
demo.keyboard1.getButtonElement("q").onclick();
demo.keyboard2.getButtonElement("e").onclick();
expect(demo.keyboard1.getInput()).toBe("q");
expect(demo.keyboard2.getInput()).toBe("e");
});