Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 9a9182d
Author: Simon Edwards <[email protected]>
Date:   Tue Nov 26 22:19:52 2019 +0100

    Fix up the keyboard shortcut unit tests on macOS

commit bcb3d42
Author: Simon Edwards <[email protected]>
Date:   Tue Nov 26 21:58:01 2019 +0100

    Set the node version for all platforms

commit f644d06
Author: Simon Edwards <[email protected]>
Date:   Mon Nov 25 21:53:21 2019 +0100

    Don't stop on a bad `dir`

commit ea6f8b1
Author: Simon Edwards <[email protected]>
Date:   Mon Nov 25 21:15:54 2019 +0100

    Get more info about the gyp set up
  • Loading branch information
sedwards2009 committed Nov 26, 2019
1 parent 8f36bae commit e24feea
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 16 deletions.
5 changes: 4 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.11.0'
- script: yarn install --frozen-lockfile
displayName: "yarn install"
- script: yarn run electron-rebuild
Expand Down Expand Up @@ -99,7 +102,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: '>=8.11.0'
versionSpec: '10.11.0'
- script: yarn install --frozen-lockfile
displayName: "yarn install"
- script: yarn run electron-rebuild
Expand Down
49 changes: 34 additions & 15 deletions extraterm/src/render_process/keybindings/KeyBindingsManager.jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,38 @@ describe.each([
});
});

describe.each([
["open", "Ctrl+O"],
["smeg", "Alt+Shift+S"],
["sleep", "Shift+Z"],
["pageup", "Page Up"],
["gohome", "Home"],
["dedent", "Alt+Tab"],
["finish", "End"],
["up", "Up"],
["rename", "F2"],
])("", (input, output) => {
test(`mapCommandToReadableKeyStroke("${input}")`, () => {
const editorKeybindings = KeybindingsManager.loadKeybindingsFromObject(keyBindingsMap, "linux");
expect(editorKeybindings.mapCommandToReadableKeyStrokes(input)).toEqual([output]);
if (process.platform === "darwin") {
describe.each([
["open", "^O"],
["smeg", "\u2325\u21E7S"],
["sleep", "\u21E7Z"],
["pageup", "Page Up"],
["gohome", "Home"],
["dedent", "\u2325Tab"],
["finish", "End"],
["up", "Up"],
["rename", "F2"],
])("", (input, output) => {
test(`mapCommandToReadableKeyStroke("${input}")`, () => {
const editorKeybindings = KeybindingsManager.loadKeybindingsFromObject(keyBindingsMap, "linux");
expect(editorKeybindings.mapCommandToReadableKeyStrokes(input)).toEqual([output]);
});
});
});
} else {
describe.each([
["open", "Ctrl+O"],
["smeg", "Alt+Shift+S"],
["sleep", "Shift+Z"],
["pageup", "Page Up"],
["gohome", "Home"],
["dedent", "Alt+Tab"],
["finish", "End"],
["up", "Up"],
["rename", "F2"],
])("", (input, output) => {
test(`mapCommandToReadableKeyStroke("${input}")`, () => {
const editorKeybindings = KeybindingsManager.loadKeybindingsFromObject(keyBindingsMap, "linux");
expect(editorKeybindings.mapCommandToReadableKeyStrokes(input)).toEqual([output]);
});
});
}

0 comments on commit e24feea

Please sign in to comment.