Skip to content

Commit

Permalink
Remove wallet connect tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yivlad committed Jul 4, 2023
1 parent ff8afb5 commit e25102c
Showing 1 changed file with 0 additions and 58 deletions.
58 changes: 0 additions & 58 deletions packages/example/playwright/with-metamask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,63 +294,5 @@ export const withMetamaskTest = (baseUrl: string) => {
})
})
})

describe('Connectors', () => {
it('Can connect to WalletConnect', async () => {
await page.goto(`${baseUrl}connectors`)

let pagesNumber = context.pages().length
await page.click(XPath.text('button', 'Disconnect'))
await page.click(XPath.id('button', 'WalletConnectButton'))
await page.click(XPath.text('a', 'Desktop'))
await page.click(XPath.text('div', 'Ambire'))

// waiting for the ambire page to open
await waitForExpect(() => {
expect(context.pages().length).to.be.equal(pagesNumber + 1)
})

const ambirePage = context.pages()[context.pages().length - 1]
pagesNumber = context.pages().length
await ambirePage.click(XPath.svgWithClass('AddAccount_metamask'))

// waiting for the metamask page to open
await waitForExpect(() => {
expect(context.pages().length).to.be.equal(pagesNumber + 1)
})

const metamaskPage = context.pages()[context.pages().length - 1]

await metamaskPage.click(XPath.text('button', 'Next'))
await metamaskPage.click(XPath.text('button', 'Connect'))
log('Metamask connected to the app.')

await waitForExpect(async () => {
expect(await page.isVisible(XPath.text('span', 'Account:'))).to.be.true
expect(await page.isVisible(XPath.text('span', 'Eth balance:'))).to.be.true
expect(await page.isVisible(XPath.text('span', 'Chain Id:'))).to.be.true
expect(await page.isVisible(XPath.text('span', 'ETH2 staking contract holds:'))).to.be.true
})

await waitForExpect(async () => {
expect(await page.isVisible(XPath.text('p', 'Send transaction'))).to.be.true
})
})

it('Holds WalletConnect session', async () => {
await page.reload()

await waitForExpect(async () => {
expect(await page.isVisible(XPath.text('span', 'Account:'))).to.be.true
expect(await page.isVisible(XPath.text('span', 'Eth balance:'))).to.be.true
expect(await page.isVisible(XPath.text('span', 'Chain Id:'))).to.be.true
expect(await page.isVisible(XPath.text('span', 'ETH2 staking contract holds:'))).to.be.true
})

await waitForExpect(async () => {
expect(await page.isVisible(XPath.text('p', 'Send transaction'))).to.be.true
})
})
})
})
}

0 comments on commit e25102c

Please sign in to comment.