mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-15 15:10:31 -08:00
chore: remove robotjs nut-js , because it slow down the process and is not used
This commit is contained in:
parent
8cb186c8e2
commit
668c24d667
3 changed files with 17 additions and 2981 deletions
|
|
@ -2,7 +2,7 @@ import { setDefaultTimeout, World } from '@cucumber/cucumber';
|
|||
import path from 'path';
|
||||
import { delay } from 'bluebird';
|
||||
import { Application } from 'spectron';
|
||||
import { keyboard, Key } from '@nut-tree/nut-js';
|
||||
// import { keyboard, Key } from '@nut-tree/nut-js';
|
||||
|
||||
setDefaultTimeout(30 * 1000);
|
||||
|
||||
|
|
@ -69,21 +69,21 @@ export class TiddlyGitWorld extends World {
|
|||
this.context = this.context === undefined ? context : { ...this.context, ...context };
|
||||
}
|
||||
|
||||
public async type(input: string): Promise<void> {
|
||||
await keyboard.type(input);
|
||||
}
|
||||
// public async type(input: string): Promise<void> {
|
||||
// await keyboard.type(input);
|
||||
// }
|
||||
|
||||
public async hitKey(key: Key, modifier?: Key): Promise<void> {
|
||||
if (modifier !== undefined) {
|
||||
await keyboard.pressKey(modifier);
|
||||
await keyboard.pressKey(key);
|
||||
await keyboard.releaseKey(key);
|
||||
await keyboard.releaseKey(modifier);
|
||||
} else {
|
||||
await keyboard.pressKey(key);
|
||||
await keyboard.releaseKey(key);
|
||||
}
|
||||
}
|
||||
// public async hitKey(key: Key, modifier?: Key): Promise<void> {
|
||||
// if (modifier !== undefined) {
|
||||
// await keyboard.pressKey(modifier);
|
||||
// await keyboard.pressKey(key);
|
||||
// await keyboard.releaseKey(key);
|
||||
// await keyboard.releaseKey(modifier);
|
||||
// } else {
|
||||
// await keyboard.pressKey(key);
|
||||
// await keyboard.releaseKey(key);
|
||||
// }
|
||||
// }
|
||||
|
||||
public async close(): Promise<void> {
|
||||
await this.app?.stop();
|
||||
|
|
|
|||
2965
package-lock.json
generated
2965
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -236,8 +236,5 @@
|
|||
"webpack-node-externals": "^3.0.0",
|
||||
"webpack5-externals-plugin": "^1.0.4"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@nut-tree/nut-js": "1.6.0"
|
||||
},
|
||||
"private": false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue