mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-02-22 01:29:39 +08:00
Tests update
This commit is contained in:
parent
477972f26f
commit
0d82696868
@ -647,6 +647,7 @@ class SimpleKeyboard {
|
|||||||
return buttonThemesParsed;
|
return buttonThemesParsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* istanbul ignore next */
|
||||||
onTouchDeviceDetected() {
|
onTouchDeviceDetected() {
|
||||||
/**
|
/**
|
||||||
* Processing autoTouchEvents
|
* Processing autoTouchEvents
|
||||||
@ -676,6 +677,7 @@ class SimpleKeyboard {
|
|||||||
/**
|
/**
|
||||||
* Process autoTouchEvents option
|
* Process autoTouchEvents option
|
||||||
*/
|
*/
|
||||||
|
/* istanbul ignore next */
|
||||||
processAutoTouchEvents() {
|
processAutoTouchEvents() {
|
||||||
if (this.options.autoUseTouchEvents) {
|
if (this.options.autoUseTouchEvents) {
|
||||||
this.options.useTouchEvents = true;
|
this.options.useTouchEvents = true;
|
||||||
@ -711,6 +713,7 @@ class SimpleKeyboard {
|
|||||||
/**
|
/**
|
||||||
* Performing actions when touch device detected
|
* Performing actions when touch device detected
|
||||||
*/
|
*/
|
||||||
|
/* istanbul ignore next */
|
||||||
if (this.utilities.isTouchDevice()) {
|
if (this.utilities.isTouchDevice()) {
|
||||||
this.onTouchDeviceDetected();
|
this.onTouchDeviceDetected();
|
||||||
}
|
}
|
||||||
|
@ -977,31 +977,6 @@ it('Keyboard inputPattern will work by input name', () => {
|
|||||||
expect(keyboard.getInput()).toBe("q1");
|
expect(keyboard.getInput()).toBe("q1");
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Keyboard processAutoTouchEvents will work', () => {
|
|
||||||
testUtil.setDOM();
|
|
||||||
|
|
||||||
navigator.maxTouchPoints = true;
|
|
||||||
|
|
||||||
let keyboard = new Keyboard({
|
|
||||||
autoUseTouchEvents: true
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(keyboard.options.useTouchEvents).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('Keyboard processAutoTouchEvents will work with debugging enabled', () => {
|
|
||||||
testUtil.setDOM();
|
|
||||||
|
|
||||||
navigator.maxTouchPoints = true;
|
|
||||||
|
|
||||||
let keyboard = new Keyboard({
|
|
||||||
autoUseTouchEvents: true,
|
|
||||||
debug: true
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(keyboard.options.useTouchEvents).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('Keyboard beforeFirstRender method will work', () => {
|
it('Keyboard beforeFirstRender method will work', () => {
|
||||||
testUtil.setDOM();
|
testUtil.setDOM();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user