mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-02-21 00:23:02 +08:00
Remove module testing
This commit is contained in:
parent
5ab9359ca5
commit
91fa6dcf16
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "simple-keyboard",
|
||||
"version": "2.28.3",
|
||||
"version": "2.28.4",
|
||||
"description": "On-screen Javascript Virtual Keyboard",
|
||||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@ -93,11 +93,7 @@
|
||||
"resolve-url-loader": "3.1.1",
|
||||
"sass-loader": "8.0.2",
|
||||
"semver": "7.1.2",
|
||||
"simple-keyboard-autocorrect": "^2.1.3",
|
||||
"simple-keyboard-input-mask": "^2.2.3",
|
||||
"simple-keyboard-key-navigation": "^2.1.3",
|
||||
"style-loader": "1.1.3",
|
||||
"swipe-keyboard": "^2.1.4",
|
||||
"terser-webpack-plugin": "2.3.4",
|
||||
"ts-pnp": "1.1.5",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
|
@ -1,28 +0,0 @@
|
||||
import Keyboard from '../../lib';
|
||||
import SimpleKeyboardAutocorrect from 'simple-keyboard-autocorrect';
|
||||
|
||||
test('Module simple-keyboard-autocorrect runs without crashing', () => {
|
||||
const div = document.createElement('div');
|
||||
|
||||
div.className = "simple-keyboard";
|
||||
document.body.appendChild(div);
|
||||
|
||||
const keyboard = new Keyboard({
|
||||
debug: true,
|
||||
onChange: input => input,
|
||||
onKeyPress: button => button,
|
||||
newLineOnEnter: true,
|
||||
useMouseEvents: true,
|
||||
autocorrectDict: ["dog", "house"],
|
||||
modules: [
|
||||
SimpleKeyboardAutocorrect
|
||||
]
|
||||
});
|
||||
|
||||
keyboard.getButtonElement("d").onclick();
|
||||
keyboard.getButtonElement("o").onclick();
|
||||
keyboard.getButtonElement("{space}").onclick();
|
||||
keyboard.getButtonElement("{bksp}").onclick();
|
||||
|
||||
expect(keyboard.getInput()).toBe("dog");
|
||||
});
|
@ -1,37 +0,0 @@
|
||||
import Keyboard from '../../lib';
|
||||
import SimpleKeyboardInputMask from 'simple-keyboard-input-mask';
|
||||
|
||||
test('Module simple-keyboard-input-mask runs without crashing', () => {
|
||||
const div = document.createElement('div');
|
||||
|
||||
div.className += "simple-keyboard";
|
||||
document.body.appendChild(div);
|
||||
|
||||
const keyboard = new Keyboard({
|
||||
debug: true,
|
||||
onChange: input => input,
|
||||
onKeyPress: button => button,
|
||||
inputMask: "(99) 9999-9999",
|
||||
useMouseEvents: true,
|
||||
modules: [
|
||||
SimpleKeyboardInputMask
|
||||
],
|
||||
});
|
||||
|
||||
keyboard.getButtonElement("d").onclick();
|
||||
keyboard.getButtonElement("o").onclick();
|
||||
keyboard.getButtonElement("{space}").onclick();
|
||||
keyboard.getButtonElement("1").onclick();
|
||||
keyboard.getButtonElement("2").onclick();
|
||||
keyboard.getButtonElement("3").onclick();
|
||||
keyboard.getButtonElement("c").onclick();
|
||||
keyboard.getButtonElement("4").onclick();
|
||||
keyboard.getButtonElement("5").onclick();
|
||||
keyboard.getButtonElement("6").onclick();
|
||||
keyboard.getButtonElement("7").onclick();
|
||||
keyboard.getButtonElement("8").onclick();
|
||||
keyboard.getButtonElement("9").onclick();
|
||||
keyboard.getButtonElement("0").onclick();
|
||||
|
||||
expect(keyboard.getInput()).toBe("(12) 3456-7890");
|
||||
});
|
@ -1,25 +0,0 @@
|
||||
import Keyboard from '../../lib';
|
||||
import SimpleKeyboardKeyNavigation from 'simple-keyboard-key-navigation';
|
||||
|
||||
test('Module simple-keyboard-key-navigation runs without crashing', () => {
|
||||
const div = document.createElement('div');
|
||||
|
||||
div.className = "simple-keyboard";
|
||||
document.body.appendChild(div);
|
||||
|
||||
const keyboard = new Keyboard({
|
||||
debug: true,
|
||||
onChange: input => input,
|
||||
onKeyPress: button => button,
|
||||
enableKeyNavigation: true,
|
||||
modules: [
|
||||
SimpleKeyboardKeyNavigation
|
||||
]
|
||||
});
|
||||
|
||||
keyboard.modules.keyNavigation.right();
|
||||
keyboard.modules.keyNavigation.down();
|
||||
keyboard.modules.keyNavigation.press();
|
||||
|
||||
expect(keyboard.getInput()).toBe("q");
|
||||
});
|
@ -1,23 +0,0 @@
|
||||
import Keyboard from '../../lib';
|
||||
import SimpleKeyboardSwipe from 'swipe-keyboard';
|
||||
|
||||
test('Module swipe-keyboard runs without crashing', () => {
|
||||
const containerDiv = document.createElement('div');
|
||||
containerDiv.className = "keyboardContainer";
|
||||
|
||||
const keyboardDiv = document.createElement('div');
|
||||
keyboardDiv.className = "simple-keyboard";
|
||||
|
||||
containerDiv.appendChild(keyboardDiv);
|
||||
document.body.appendChild(containerDiv);
|
||||
|
||||
new Keyboard({
|
||||
debug: true,
|
||||
onChange: input => input,
|
||||
onKeyPress: button => button,
|
||||
useMouseEvents: true,
|
||||
modules: [
|
||||
SimpleKeyboardSwipe
|
||||
]
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user