fix: fix error handling in generateFaucetWallet (#1671)

* fix: handle error correctly in generateFaucetWallet
* test: Adds generateFaucetWallet integration + browser tests
This commit is contained in:
Nathan Nichols
2021-09-27 13:05:15 -07:00
committed by Mayukha Vadari
parent edcdd3a0fc
commit 9e3654d7d6
6 changed files with 98 additions and 15 deletions

View File

@@ -3,17 +3,23 @@ import path from 'path'
import { expect, assert } from 'chai'
import puppeteer from 'puppeteer'
const TIMEOUT = 60000
describe('Browser Tests', function () {
this.timeout(TIMEOUT)
it('Integration Tests', async function () {
const browser = await puppeteer.launch({ headless: true })
try {
const page = await browser.newPage().catch()
page.setDefaultNavigationTimeout(0)
await page.goto(
path.join('file:///', __dirname, '../localIntegrationRunner.html'),
)
await page.waitForFunction(
'document.querySelector("body").innerText.includes("submit multisigned transaction")',
{ timeout: TIMEOUT },
)
const fails = await page.evaluate(() => {