Skip to content

Commit

Permalink
fix(cypress): selection key event trigger
Browse files Browse the repository at this point in the history
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Feb 21, 2025
1 parent f0f1f53 commit 2b84449
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/files/files-selection.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ describe('files: Select all files', { testIsolation: true }, () => {
it('Can select range of files with shift key', () => {
cy.get('[data-cy-files-list-row-checkbox]').should('have.length', filesCount)
selectRowForFile('audio.mp3')
cy.window().trigger('keydown', { shiftKey: true })
cy.window().trigger('keydown', { shiftKey: true, key: 'Shift' })
selectRowForFile('readme.md', { shiftKey: true })
cy.window().trigger('keyup', { shiftKey: false })
cy.window().trigger('keyup', { shiftKey: false, key: 'Shift' })

cy.get('.files-list__selected').should('have.text', '4 selected')
cy.get('[data-cy-files-list-row-checkbox] input[type="checkbox"]:checked').should('have.length', 4)
Expand Down

0 comments on commit 2b84449

Please sign in to comment.