UNPKG

@coinbase/onchaintestkit

Version:

End-to-end testing toolkit for blockchain applications, powered by Playwright

17 lines (16 loc) 567 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.connectToDapp = connectToDapp; /** * Handles the connect to dapp notification in Phantom Wallet * * @param page - The Playwright page object representing the notification page */ async function connectToDapp(page) { // Wait for the notification to appear await page.waitForLoadState("domcontentloaded"); await page.waitForLoadState("networkidle"); await page.reload(); await page.waitForTimeout(1500); await page.getByTestId("primary-button").click(); }