fix: a slow answer to an approval still reaches the site (closes #540)
Chrome stopped the background worker about six minutes after a site's request even with the approval window open, and the approval and the site's waiting request went with it. Every approval is now added through addPendingApproval(), which starts a timer in the worker that calls runtime.getPlatformInfo() every 20 seconds while any approval is pending; Chrome counts each call as activity. tests/e2e/slowApproval.js, run by make test-e2e, leaves a transaction and a signature approval open for seven minutes in minimized windows and requires the site to receive both results. It drives Chromium over the DevTools pipe because Playwright keeps DevTools attached to the worker. Its loopback dApp server, shared with the Firefox suite, moves to tests/e2e/dapp.js. Model: opus-5-5
This commit was merged in pull request #553.
This commit is contained in:
@@ -17,13 +17,13 @@
|
||||
// note in driver.js), so the two backends have no common substrate to
|
||||
// abstract over. Duplicated steps do not pay for a shim; revisit if this
|
||||
// suite grows to where they do. What IS shared is the dApp page fixture
|
||||
// itself — DAPP_HTML, served here from loopback by dapp.js — so an assertion
|
||||
// about the __dapp API means the same thing on both browsers.
|
||||
// itself — DAPP_HTML, served here from loopback by tests/e2e/dapp.js — so an
|
||||
// assertion about the __dapp API means the same thing on both browsers.
|
||||
//
|
||||
// The dApp steps need an http:// origin, which --network none was thought to
|
||||
// rule out. It does not: loopback survives it, so the page and the stub node
|
||||
// are served from 127.0.0.1 inside the container and the run reaches nothing
|
||||
// but this process. See tests/e2e/firefox/dapp.js.
|
||||
// but this process. See tests/e2e/dapp.js.
|
||||
//
|
||||
// LIMITATION, and the difference from the Chrome suite worth knowing: error
|
||||
// capture here is POLL-BASED, not event-streamed. The console service is
|
||||
@@ -61,7 +61,7 @@ const {
|
||||
} = require("ethers");
|
||||
|
||||
const { ConsoleErrors, EXTENSION_ORIGIN, start, sleep } = require("./driver");
|
||||
const { startDappServer } = require("./dapp");
|
||||
const { startDappServer } = require("../dapp");
|
||||
const { STUB_COUNTERPARTY } = require("../network");
|
||||
const { NETWORKS } = require("../../../src/shared/networks");
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user