cycles-quartz/examples/transfers/frontend/tests/e2e/helpers/signTx.ts

17 lines
405 B
TypeScript
Raw Normal View History

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' })
}