Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f93392799 |
@@ -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
|
// The line cuts a message too long for it with an ellipsis (see
|
||||||
// showFlash() in src/popup/views/helpers.js). The assertions that
|
// showFlash() in src/popup/views/helpers.js). The assertions that
|
||||||
// measure that, in a real browser at the documented 396x600 popup, are
|
// measure that, in a real browser at the documented 360x600 popup, are
|
||||||
// "a rejected dust threshold shifts no layout (#233)" and "an over-long
|
// "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
|
// 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
|
// make test-e2e. They are not in make check because REPO_POLICIES.md
|
||||||
|
|||||||
+8
-5
@@ -4193,6 +4193,10 @@ 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
|
// 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).
|
// 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");
|
await assertAddressesFit(popup, "the connection prompt");
|
||||||
|
|
||||||
// Remembered, because the sign and transaction tests below all
|
// Remembered, because the sign and transaction tests below all
|
||||||
@@ -4572,6 +4576,10 @@ test("eth_sendTransaction signs the approved transaction and broadcasts it (#183
|
|||||||
JSON.stringify(screen.data),
|
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");
|
await assertAddressesFit(popup, "the dApp transaction prompt");
|
||||||
|
|
||||||
const broadcastBefore = env.routeOpts.broadcastTransactions.length;
|
const broadcastBefore = env.routeOpts.broadcastTransactions.length;
|
||||||
@@ -5032,12 +5040,7 @@ 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) {
|
async function assertAddressesFit(page, where) {
|
||||||
await page.setViewportSize(POPUP_VIEWPORT);
|
|
||||||
const report = await addressRowReport(page);
|
const report = await addressRowReport(page);
|
||||||
assert(
|
assert(
|
||||||
report.rows.length > 0,
|
report.rows.length > 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user