From e1eae1067b505f9607dde4738635c9c3be1780b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 07:23:26 +0200 Subject: [PATCH 1/4] Bump tj-actions/changed-files from 39.2.1 to 39.2.2 (#647) Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39.2.1 to 39.2.2. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/v39.2.1...v39.2.2) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/check-api-changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-api-changes.yml b/.github/workflows/check-api-changes.yml index 816aec653..4d76da8ad 100644 --- a/.github/workflows/check-api-changes.yml +++ b/.github/workflows/check-api-changes.yml @@ -52,7 +52,7 @@ jobs: - name: Get API changes id: api-changed - uses: tj-actions/changed-files@v39.2.1 + uses: tj-actions/changed-files@v39.2.2 with: base_sha: 'HEAD~1' sha: 'HEAD' From 9bf4c4736bb961f9bba19b464b0ad4973f03e8ae Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Fri, 20 Oct 2023 13:58:11 +0000 Subject: [PATCH 2/4] Changed tests to reflect mod keys creating events --- packages/commands/tests/src/index.spec.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/commands/tests/src/index.spec.ts b/packages/commands/tests/src/index.spec.ts index d19e07325..2eeed2255 100644 --- a/packages/commands/tests/src/index.spec.ts +++ b/packages/commands/tests/src/index.spec.ts @@ -1171,7 +1171,7 @@ describe('@lumino/commands', () => { ctrlKey: true }) ); - expect(count).to.equal(0); + expect(count).to.equal(1); // User presses `ctrl` again - this should not break the sequence. elem.dispatchEvent( new KeyboardEvent('keydown', { @@ -1179,7 +1179,7 @@ describe('@lumino/commands', () => { ctrlKey: true }) ); - expect(count).to.equal(0); + expect(count).to.equal(1); elem.dispatchEvent( new KeyboardEvent('keydown', { keyCode: 76, // `L` key @@ -1218,11 +1218,11 @@ describe('@lumino/commands', () => { ctrlKey: true }); elem.dispatchEvent(eventShift); - expect(count).to.equal(0); + expect(count).to.equal(1); elem.dispatchEvent(eventK); - expect(count).to.equal(0); + expect(count).to.equal(1); elem.dispatchEvent(eventCtrl); - expect(count).to.equal(0); + expect(count).to.equal(1); elem.dispatchEvent(eventL); expect(count).to.equal(1); }); @@ -1335,11 +1335,11 @@ describe('@lumino/commands', () => { expect(keystroke).to.equal(''); }); - it('should return nothing for keys that are marked as modifier in keyboard layout', () => { + it('should return keys that are marked as modifier in keyboard layout', () => { let keystroke = CommandRegistry.keystrokeForKeydownEvent( new KeyboardEvent('keydown', { keyCode: 17, ctrlKey: true }) ); - expect(keystroke).to.equal(''); + expect(keystroke).to.equal('Ctrl'); }); }); }); From 85a1362a48f0b7dba890d21a15fdde987645433c Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Fri, 20 Oct 2023 14:21:56 +0000 Subject: [PATCH 3/4] Changed tests to match key bindings --- packages/commands/tests/src/index.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/commands/tests/src/index.spec.ts b/packages/commands/tests/src/index.spec.ts index 2eeed2255..594036b99 100644 --- a/packages/commands/tests/src/index.spec.ts +++ b/packages/commands/tests/src/index.spec.ts @@ -1179,7 +1179,7 @@ describe('@lumino/commands', () => { ctrlKey: true }) ); - expect(count).to.equal(1); + expect(count).to.equal(0); elem.dispatchEvent( new KeyboardEvent('keydown', { keyCode: 76, // `L` key @@ -1218,11 +1218,11 @@ describe('@lumino/commands', () => { ctrlKey: true }); elem.dispatchEvent(eventShift); - expect(count).to.equal(1); + expect(count).to.equal(0); elem.dispatchEvent(eventK); expect(count).to.equal(1); elem.dispatchEvent(eventCtrl); - expect(count).to.equal(1); + expect(count).to.equal(0); elem.dispatchEvent(eventL); expect(count).to.equal(1); }); @@ -1339,7 +1339,7 @@ describe('@lumino/commands', () => { let keystroke = CommandRegistry.keystrokeForKeydownEvent( new KeyboardEvent('keydown', { keyCode: 17, ctrlKey: true }) ); - expect(keystroke).to.equal('Ctrl'); + expect(keystroke).to.equal('Ctrl '); }); }); }); From 5ed4103a5ffb627391fe3bc1c368d6cce7ee4225 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Fri, 20 Oct 2023 14:39:05 +0000 Subject: [PATCH 4/4] Revert test changes --- packages/commands/tests/src/index.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/commands/tests/src/index.spec.ts b/packages/commands/tests/src/index.spec.ts index 594036b99..d81b84343 100644 --- a/packages/commands/tests/src/index.spec.ts +++ b/packages/commands/tests/src/index.spec.ts @@ -1171,7 +1171,7 @@ describe('@lumino/commands', () => { ctrlKey: true }) ); - expect(count).to.equal(1); + expect(count).to.equal(0); // User presses `ctrl` again - this should not break the sequence. elem.dispatchEvent( new KeyboardEvent('keydown', { @@ -1220,7 +1220,7 @@ describe('@lumino/commands', () => { elem.dispatchEvent(eventShift); expect(count).to.equal(0); elem.dispatchEvent(eventK); - expect(count).to.equal(1); + expect(count).to.equal(0); elem.dispatchEvent(eventCtrl); expect(count).to.equal(0); elem.dispatchEvent(eventL);