From b24a4a47fc51bf7755e96d487bed1575407884f9 Mon Sep 17 00:00:00 2001 From: KHeo Date: Mon, 17 Aug 2020 14:56:10 +0900 Subject: [PATCH] Remove unnecessary issue-5650.html. --- .../driver/cypress/fixtures/issue-5650.html | 18 ------------------ .../integration/commands/actions/type_spec.js | 15 +++++++++++---- 2 files changed, 11 insertions(+), 22 deletions(-) delete mode 100644 packages/driver/cypress/fixtures/issue-5650.html diff --git a/packages/driver/cypress/fixtures/issue-5650.html b/packages/driver/cypress/fixtures/issue-5650.html deleted file mode 100644 index 951d30179a89..000000000000 --- a/packages/driver/cypress/fixtures/issue-5650.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Test input event - - - -
- - - \ No newline at end of file diff --git a/packages/driver/cypress/integration/commands/actions/type_spec.js b/packages/driver/cypress/integration/commands/actions/type_spec.js index 9bab40637b1b..3ae5a4a3039c 100644 --- a/packages/driver/cypress/integration/commands/actions/type_spec.js +++ b/packages/driver/cypress/integration/commands/actions/type_spec.js @@ -185,11 +185,18 @@ describe('src/cy/commands/actions/type - #type', () => { }) // https://github.com/cypress-io/cypress/issues/5650 - it('should trigger KeyboardEvent, not Event, for event listeners', () => { - cy.visit('fixtures/issue-5650.html') + it('should trigger KeyboardEvent, not Event, for event listeners', (done) => { + cy.$$('input:first').on('keydown', (e) => { + if (e.originalEvent instanceof e.currentTarget.ownerDocument.defaultView.KeyboardEvent) { + done() + + return + } + + throw new Error('event was not instanceOf KeyboardEvent') + }) - cy.get('#test-input').type('A') - cy.get('#result').contains('isKeyboardEvent: true') + cy.get('input:first').type('A') }) describe('actionability', () => {