Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1631 from gnosis/simplify-text-selectors
Browse files Browse the repository at this point in the history
Simplify text selectors
  • Loading branch information
anxolin committed Nov 19, 2020
2 parents 444b09d + 1afc557 commit 2724138
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion playwright/integration/about.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('About', () => {

// WHEN: Click on the "About" link in the footer
// can use css-selector + xpath syntax, with >> in-between
await page.click('footer >> text=About') // inside footer element with textContent='About'
await page.click('footer >> "About"') // inside footer element with textContent='About'

// THEN: We navigate to the about page
expect(page.url()).toContain('/about')
Expand Down
8 changes: 3 additions & 5 deletions playwright/integration/connect_wallet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ describe('Connect Wallet', () => {
await page.goto(baseURL)

// WHEN: connected a Wallet
// Click text=/.*Connect Wallet.*/
await page.click('text=/.*Connect Wallet.*/')

await page.click('text=Web3')
await page.click('"Connect Wallet"')
await page.click('"Web3"')

// WHEN: Wallet popup is open
await page.click('header >> text=Web3')
await page.click('header >> "Web3"')

// THEN: wallet connected & address available
// XPATH: closest ancestor with 0x* text of element with text "Copy address to clipboard"
Expand Down

0 comments on commit 2724138

Please sign in to comment.