Skip to content

Commit

Permalink
test: code fix
Browse files Browse the repository at this point in the history
  • Loading branch information
d-rita committed Feb 24, 2025
1 parent 72eebcc commit ea7a9f9
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,13 @@ describe('Command Palette - List View - Search Results', () => {
expect(firstResult).toHaveClass('highlighted')

// scroll down to fifth result
for (let keyPress = 1; keyPress < 5; keyPress++) {
await user.keyboard('{ArrowDown}')
}
await user.keyboard('{ArrowDown}'.repeat(4))

expect(fifthResult).toHaveTextContent('Test App 5')
expect(fifthResult).toHaveClass('highlighted')

// clear search field
for (let keyPress = 0; keyPress < searchTerm.length; keyPress++) {
await user.keyboard('{Backspace}')
}
await user.keyboard('{Backspace}'.repeat(searchTerm.length))

expect(searchField).toHaveValue('')

Expand Down Expand Up @@ -197,9 +193,7 @@ describe('Command Palette - List View - Search Results', () => {
expect(resultsListItems[0]).toHaveClass('highlighted')

// clear search field
for (let keyPress = 0; keyPress < searchTerm.length; keyPress++) {
await user.keyboard('{Backspace}')
}
await user.keyboard('{Backspace}'.repeat(searchTerm.length))

expect(searchField).toHaveValue('')
expect(browseCommandsAction).toHaveClass('highlighted')
Expand Down

0 comments on commit ea7a9f9

Please sign in to comment.