1 Commits
Author SHA1 Message Date
sneak 09e6454545 fix: the Chrome layout tests and popup comments use the popup's real 396x600 size (closes #556)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s
POPUP_VIEWPORT in tests/e2e/run.js said 360x600, while body in
src/popup/styles/main.css is 396px wide and the background opens an
approval window at 396x600. It is now 396x600, defined once near the top
of the file, and the hostile token symbol's frame takes its size from it.

assertAddressesFit() now sets the page it measures to that size first.
Every page it measured, the popup's own screens and the two approval
prompts, was 1280x720, where a page never scrolls sideways, so its
sideways-scroll check could not fail. README's list of what the Chrome
suite leaves out says what sizing the page does not cover.

Comments in src/popup/index.html and tests/dustThreshold.test.js that
said 360x600 now say 396x600.

Model: opus-5-5
2026-10-20 10:13:59 +00:00
2 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ describe("the flash line the message is shown in", () => {
//
// The line cuts a message too long for it with an ellipsis (see
// showFlash() in src/popup/views/helpers.js). The assertions that
// measure that, in a real browser at the documented 360x600 popup, are
// measure that, in a real browser at the documented 396x600 popup, are
// "a rejected dust threshold shifts no layout (#233)" and "an over-long
// flash message keeps to one line (#252)" in tests/e2e/run.js, run by
// make test-e2e. They are not in make check because REPO_POLICIES.md
+5 -8
View File
@@ -4193,10 +4193,6 @@ test("eth_requestAccounts approved returns the selected address (#183)", async (
);
// The text above is there even when the row is too narrow to show it
// all; this measures that the whole address is visible (#517).
// The prompt is driven here in a 1280x720 tab or window, where the
// page can never scroll sideways, so it is measured at the popup's
// size.
await popup.setViewportSize(POPUP_VIEWPORT);
await assertAddressesFit(popup, "the connection prompt");
// Remembered, because the sign and transaction tests below all
@@ -4576,10 +4572,6 @@ test("eth_sendTransaction signs the approved transaction and broadcasts it (#183
JSON.stringify(screen.data),
);
// Headless Chromium opens the approval window at 1280x720 whatever size
// the extension asks for, and at that width the page can never scroll
// sideways. So it is measured at the size the window is opened at.
await popup.setViewportSize(POPUP_VIEWPORT);
await assertAddressesFit(popup, "the dApp transaction prompt");
const broadcastBefore = env.routeOpts.broadcastTransactions.length;
@@ -5040,7 +5032,12 @@ function addressRowReport(page) {
});
}
// Measured at the popup's 396x600 (POPUP_VIEWPORT). Every page in this
// context, approval windows included, is otherwise 1280x720 whatever size
// the extension asks for, and a page that wide never scrolls sideways. The
// page keeps the new size afterwards.
async function assertAddressesFit(page, where) {
await page.setViewportSize(POPUP_VIEWPORT);
const report = await addressRowReport(page);
assert(
report.rows.length > 0,