Skip to content

Commit f239344

Browse files
authored
Merge pull request #618 from WalletConnect/refactor/use-button-click
refactor: button click instead of focus + space
2 parents 5eecc0e + 66ba47c commit f239344

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/shared/pages/WalletPage.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,13 @@ export class WalletPage {
4949
*/
5050
async handleSessionProposal(opts: SessionParams) {
5151
const variant = opts.accept ? `approve` : `reject`
52-
// `.click` doesn't work here, so we use `.focus` and `Space`
5352
await this.page.getByTestId(`session-${variant}-button`).isEnabled()
54-
await this.page.getByTestId(`session-${variant}-button`).focus()
55-
await this.page.keyboard.press('Space')
53+
await this.page.getByTestId(`session-${variant}-button`).click()
5654
}
5755

5856
async handleRequest({ accept }: { accept: boolean }) {
5957
const variant = accept ? `approve` : `reject`
60-
// `.click` doesn't work here, so we use `.focus` and `Space`
6158
await this.page.getByTestId(`session-${variant}-button`).isEnabled()
62-
await this.page.getByTestId(`session-${variant}-button`).focus()
63-
await this.page.keyboard.press('Space')
59+
await this.page.getByTestId(`session-${variant}-button`).click()
6460
}
6561
}

0 commit comments

Comments
 (0)