Skip to content

Commit fe7b584

Browse files
authored
Release v2.6.0 (#174)
* Cleanup * Fix keyboard test since Linux now also implements numpad keys * Improve flaky test by waiting for dom content * Updated changelog
1 parent 94fe571 commit fe7b584

File tree

10 files changed

+426
-1335
lines changed

10 files changed

+426
-1335
lines changed

.github/workflows/snapshot_release.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
working-directory: ./test/
3737
run: npm cit
3838
- name: Run window tests
39-
if: ${{matrix.os == 'windows-2019'}}
4039
uses: GabrielBB/xvfb-action@v1
4140
with:
4241
working-directory: ./test/window-integration-tests

.github/workflows/tagged_release.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
working-directory: ./test/
3131
run: npm cit
3232
- name: Run window tests
33-
if: ${{matrix.os == 'windows-2019'}}
3433
uses: GabrielBB/xvfb-action@v1
3534
with:
3635
working-directory: ./test/window-integration-tests

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 2.6.0
6+
7+
- Feature: Move/focus/resize window [(#18)](https://github.com/nut-tree/libnut-core/issues/18) Contributed by [@ekrenzin](https://github.com/ekrenzin)
8+
- Enhancement: Adding support for numpad 'clear' key [PR #166)](https://github.com/nut-tree/libnut-core/pull/166) Contributed by [@smithkyle](https://github.com/smithkyle)
9+
- Maintenance: Version upgrades, CI updates, etc.
10+
511
## 2.5.2
612

713
- Bugfix: Screen capture broken on macOS 13 [(nut-tree/nut.js#469)](https://github.com/nut-tree/nut.js/issues/469)

test/integration/keyboard.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

test/integration/mouse.js

Lines changed: 0 additions & 94 deletions
This file was deleted.

test/keyboard.js

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,31 @@ const os = require("os");
44
// TODO: Need tests for keyToggle, typeString, typeStringDelayed, and setKeyboardDelay.
55

66
describe("Keyboard", () => {
7-
it("Tap a key.", function() {
8-
expect(() => libnut.keyTap("a")).not.toThrow();
9-
expect(() => libnut.keyTap("a", "control")).not.toThrow();
10-
expect(() => libnut.keyTap()).toThrowError(/A string was expected/);
11-
});
7+
it("Tap a key.", function () {
8+
expect(() => libnut.keyTap("a")).not.toThrow();
9+
expect(() => libnut.keyTap("a", "control")).not.toThrow();
10+
expect(() => libnut.keyTap()).toThrowError(/A string was expected/);
11+
});
1212

13-
it("Tap a key with modifier array.", function() {
14-
expect(() => libnut.keyTap("a", ["alt", "control"])).not.toThrow();
15-
});
13+
it("Tap a key with modifier array.", function () {
14+
expect(() => libnut.keyTap("a", ["alt", "control"])).not.toThrow();
15+
});
1616

17-
// This it won't fail if there's an issue, but it will help you identify an issue if ran locally.
18-
it("Tap all keys.", function() {
19-
const chars = "abcdefghijklmnopqrstuvwxyz1234567890,./;'[]\\".split("");
17+
// This it won't fail if there's an issue, but it will help you identify an issue if ran locally.
18+
it("Tap all keys.", function () {
19+
const chars = "abcdefghijklmnopqrstuvwxyz1234567890,./;'[]\\".split("");
2020

21-
for (const x in chars) {
22-
expect(() => libnut.keyTap(chars[x])).not.toThrow();
23-
}
24-
});
21+
for (const x in chars) {
22+
expect(() => libnut.keyTap(chars[x])).not.toThrow();
23+
}
24+
});
2525

26-
// This it won't fail if there's an issue, but it will help you identify an issue if ran locally.
27-
it("Tap all numpad keys.", function() {
28-
const nums = "0123456789".split("");
26+
// This it won't fail if there's an issue, but it will help you identify an issue if ran locally.
27+
it("Tap all numpad keys.", function () {
28+
const nums = "0123456789".split("");
2929

30-
for (const x in nums) {
31-
if (os.platform() === "linux") {
32-
expect(() => libnut.keyTap("numpad_" + nums[x])).toThrowError(
33-
/Invalid key code/
34-
);
35-
} else {
36-
expect(() => libnut.keyTap("numpad_" + nums[x])).not.toThrow();
37-
}
38-
}
39-
});
30+
for (const x in nums) {
31+
expect(() => libnut.keyTap("numpad_" + nums[x])).not.toThrow();
32+
}
33+
});
4034
});

0 commit comments

Comments
 (0)