cycles-quartz/examples/transfers/frontend/tests/e2e/helpers/signTx.ts
Daniel Gushchyan 14a6913632
refactor: refactor repo as standard rust monorepo (#222)
Co-authored-by: hu55a1n1 <sufialhussaini@gmail.com>
2024-09-30 23:33:22 +04:00

17 lines
405 B
TypeScript

import { BrowserContext, Page } from '@playwright/test'
export const signTx = async ({
context,
page,
}: {
context: BrowserContext
page: Page
}) => {
// Sign tx
const signPage = await context.waitForEvent('page')
await signPage.getByRole('button', { name: /approve/i }).click()
await signPage.waitForEvent('close')
await page.getByText(/successfully/i).waitFor({ state: 'visible' })
}