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 21, 2025
1 parent 5fa01ae commit ca9c5e1
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,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 @@ -202,9 +198,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 ca9c5e1

Please sign in to comment.