The suite asserted that the two screens #150 and #151 broke now open without
throwing. The four remaining definition-of-done items are asserted here.
Additive: four tests and one fixture flag, no existing test or helper changed.
What is asserted
Back navigation out of Add Token. Against the persisted navigation stack,
read from extension storage, as a delta: the round trip Home -> AddressDetail
-> AddToken -> Back -> Back must leave the stack exactly as it found it, with ["main"] and then ["main","address"] on top at the two forward steps. A
stale entry is invisible on screen until the user presses Back one time too
many — the second-order damage of #150 — so the stack rather than the visible
view is what gets asserted. Stating it as a delta makes it independent of
whatever depth earlier tests leave behind.
The common-token quick-pick. Clicks the first button and requires #add-token-address to hold that button's data-address; the field is
asserted empty first. The old test counted the buttons rendered.
The native ETH detail path. This needed a fixture: the Blockscout
normal-transactions endpoint answered {items: []} unconditionally, so there
was no non-ERC-20 row to open at all. seedNativeTransfer serves one 0.25 ETH
transfer (above the default dust threshold, its own hash so mergeTransactions() does not fold it into the token transfer). The detail
screen must show the native hash, type Native ETH Transfer, the value, the
raw wei quantity, and no token contract row — that row's branch is where a
regression of the non-ERC-20 case lands. The flag is cleared again at the end
of the test, so every later test sees the list it was written against.
Tap-to-copy. Reads the real clipboard back rather than watching the handler
run, after seeding a sentinel so an untouched clipboard cannot pass. Clipboard
permissions are granted context-wide: an origin-scoped grant is refused for chrome-extension: URLs (Permission can't be granted to opaque origins).
Nothing was weakened and no item was dropped. All four are driven from the
Chrome harness; the Firefox suite was not touched.
Each assertion demonstrated failing
One deliberate break at a time, full make test-e2e run, source reverted after
each. In every case the pre-existing tests 4 and 5 stayed green, so each
failure is attributable to the new assertion.
Back stack — src/popup/index.js, showAddTokenView pushes twice:
ok 4 - add token screen opens from address detail (#150)
ok 5 - transaction detail renders an ERC-20 transfer (#151)
not ok 6 - Back from Add Token unwinds the stack exactly once (#150)
navigation stack on the add token screen is ["main","address","address","main","address","address"], expected ["main","address","address","main","address"]
A screen-only assertion does not see this: the first Back still lands on the
address screen.
Quick-pick — src/popup/views/addToken.js, the click handler made a no-op:
not ok 7 - a common-token quick-pick fills in the contract address (#150)
clicking the WETH quick-pick left the address field as "", expected "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
Native ETH, two breaks. The token-contract guard in src/popup/views/transactionDetail.js removed, i.e. the ERC-20 branch running
for a transfer with no contract:
not ok 8 - the native ETH transaction detail still renders (#151)
page.waitForSelector: Timeout 15000ms exceeded.
Call log:
- waiting for locator('#view-transaction') to be visible
35 x locator resolved to hidden <div class="view hidden" id="view-transaction">...</div>
pageerror: Cannot read properties of null (reading 'slice')
And the same row left visible without throwing, which is what isolates the
hidden-row assertion itself:
not ok 8 - the native ETH transaction detail still renders (#151)
the token contract row is showing on a transfer that has no token contract
Tap-to-copy — attachCopyHandlers() in src/popup/views/helpers.js keeps
the flash and drops the writeText:
not ok 9 - tap-to-copy on the transaction detail screen copies the address (#151)
tapping the token contract address put "e2e-clipboard-untouched" on the clipboard, expected 0xe2e0000000000000000000000000000000000e2e
The flash-only half of the assertion passes against this break; the clipboard
read is what catches it.
Verification
Ran, after rebasing onto next at 0be20d7 (which reworked goBack(), so the
whole suite was re-run rather than trusted):
make check — green. 703 tests in 29 suites, test-verify-build 18 cases, prettier --check clean twice (lint and fmt-check).
make test-e2e — green, 44/44, with the four new tests at 6-9.
make fmt — run, result committed.
Not run: make test-e2e-firefox. This change adds nothing to the Firefox
suite. script/lint here is prettier --check on the host, not containerized;
that is the repo's current entrypoint, and ESLint for it is #152.
Closes https://git.eeqj.de/sneak/AutistMask/issues/188.
The suite asserted that the two screens
https://git.eeqj.de/sneak/AutistMask/issues/150 and
https://git.eeqj.de/sneak/AutistMask/issues/151 broke now open without
throwing. The four remaining definition-of-done items are asserted here.
Additive: four tests and one fixture flag, no existing test or helper changed.
## What is asserted
**Back navigation out of Add Token.** Against the persisted navigation stack,
read from extension storage, as a delta: the round trip Home -> AddressDetail
-> AddToken -> Back -> Back must leave the stack exactly as it found it, with
`["main"]` and then `["main","address"]` on top at the two forward steps. A
stale entry is invisible on screen until the user presses Back one time too
many — the second-order damage of #150 — so the stack rather than the visible
view is what gets asserted. Stating it as a delta makes it independent of
whatever depth earlier tests leave behind.
**The common-token quick-pick.** Clicks the first button and requires
`#add-token-address` to hold that button's `data-address`; the field is
asserted empty first. The old test counted the buttons rendered.
**The native ETH detail path.** This needed a fixture: the Blockscout
normal-transactions endpoint answered `{items: []}` unconditionally, so there
was no non-ERC-20 row to open at all. `seedNativeTransfer` serves one 0.25 ETH
transfer (above the default dust threshold, its own hash so
`mergeTransactions()` does not fold it into the token transfer). The detail
screen must show the native hash, type `Native ETH Transfer`, the value, the
raw wei quantity, and no token contract row — that row's branch is where a
regression of the non-ERC-20 case lands. The flag is cleared again at the end
of the test, so every later test sees the list it was written against.
**Tap-to-copy.** Reads the real clipboard back rather than watching the handler
run, after seeding a sentinel so an untouched clipboard cannot pass. Clipboard
permissions are granted context-wide: an origin-scoped grant is refused for
`chrome-extension:` URLs (`Permission can't be granted to opaque origins`).
Nothing was weakened and no item was dropped. All four are driven from the
Chrome harness; the Firefox suite was not touched.
## Each assertion demonstrated failing
One deliberate break at a time, full `make test-e2e` run, source reverted after
each. In every case the pre-existing tests 4 and 5 stayed green, so each
failure is attributable to the new assertion.
1. Back stack — `src/popup/index.js`, `showAddTokenView` pushes twice:
```
ok 4 - add token screen opens from address detail (#150)
ok 5 - transaction detail renders an ERC-20 transfer (#151)
not ok 6 - Back from Add Token unwinds the stack exactly once (#150)
navigation stack on the add token screen is ["main","address","address","main","address","address"], expected ["main","address","address","main","address"]
```
A screen-only assertion does not see this: the first Back still lands on the
address screen.
2. Quick-pick — `src/popup/views/addToken.js`, the click handler made a no-op:
```
not ok 7 - a common-token quick-pick fills in the contract address (#150)
clicking the WETH quick-pick left the address field as "", expected "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
```
3. Native ETH, two breaks. The token-contract guard in
`src/popup/views/transactionDetail.js` removed, i.e. the ERC-20 branch running
for a transfer with no contract:
```
not ok 8 - the native ETH transaction detail still renders (#151)
page.waitForSelector: Timeout 15000ms exceeded.
Call log:
- waiting for locator('#view-transaction') to be visible
35 x locator resolved to hidden <div class="view hidden" id="view-transaction">...</div>
pageerror: Cannot read properties of null (reading 'slice')
```
And the same row left visible without throwing, which is what isolates the
hidden-row assertion itself:
```
not ok 8 - the native ETH transaction detail still renders (#151)
the token contract row is showing on a transfer that has no token contract
```
4. Tap-to-copy — `attachCopyHandlers()` in `src/popup/views/helpers.js` keeps
the flash and drops the `writeText`:
```
not ok 9 - tap-to-copy on the transaction detail screen copies the address (#151)
tapping the token contract address put "e2e-clipboard-untouched" on the clipboard, expected 0xe2e0000000000000000000000000000000000e2e
```
The flash-only half of the assertion passes against this break; the clipboard
read is what catches it.
## Verification
Ran, after rebasing onto `next` at `0be20d7` (which reworked `goBack()`, so the
whole suite was re-run rather than trusted):
- `make check` — green. 703 tests in 29 suites, `test-verify-build` 18 cases,
`prettier --check` clean twice (lint and fmt-check).
- `make test-e2e` — green, 44/44, with the four new tests at 6-9.
- `make fmt` — run, result committed.
Not run: `make test-e2e-firefox`. This change adds nothing to the Firefox
suite. `script/lint` here is `prettier --check` on the host, not containerized;
that is the repo's current entrypoint, and ESLint for it is
https://git.eeqj.de/sneak/AutistMask/issues/152.
The suite asserted that the two screens those issues broke now open
without throwing, which is narrower than their definition of done. The
four remaining items are asserted here, additively; nothing existing was
restructured.
Back navigation out of Add Token is checked against the persisted
navigation stack, read from extension storage, as a delta: the round trip
Home -> AddressDetail -> AddToken -> Back -> Back must leave the stack
exactly as it found it. A stale entry is invisible on screen until the
user presses Back one time too many, which is precisely the second-order
damage of #150, so the stack rather than the visible view is what gets
asserted. Stating it as a delta keeps it independent of whatever depth
earlier tests leave behind.
The quick-pick test clicks a button and requires the address field to
hold that button's contract address; the old assertion only counted the
buttons rendered.
The native ETH detail path needed a fixture: the normal-transactions
endpoint answered with an empty list unconditionally, so there was no
non-ERC-20 row to open at all. seedNativeTransfer serves one, and the
detail screen must show the native type, the value, the raw wei quantity
and no token contract row - the row whose branch is where a regression of
the non-ERC-20 case would land.
Tap-to-copy reads the real clipboard back rather than watching the
handler run, after seeding a sentinel so an untouched clipboard cannot
pass. Clipboard permissions are granted context-wide because an
origin-scoped grant is refused for chrome-extension: URLs.
Each of the four was demonstrated failing against a deliberately broken
build; the captured output is in the pull request.
PASS — independently verified on my own clone of head e53bcb6: make check green, make test-e2e 44/44, all four items of #188 asserted, and each new assertion re-demonstrated failing here (duplicate pushCurrentView() in showAddTokenView reds test 6 alone; no-op quick-pick handler reds 7; tx.contractAddress guard forced true reds 8 with the pageerror; the same guard's else branch left unhidden reds 8 on the hidden-row assertion alone; dropping navigator.clipboard.writeText from attachCopyHandlers() reds 9), tree restored after each; head contains current next, no Claude/Anthropic references, no attribution trailers.
Disclosures: my first e2e run failed tests 38 and 44 in the dApp section, green on the rerun and on all five mutation runs — the known flake of #287 and #290, not attributable to this change. Outside the four items #188 scoped, these definition-of-done items of #150 and #151 remain unasserted anywhere in the suite after this closes: adding a token by contract address and seeing it in the balance list, opening a token-transfer row from AddressToken, the etherscan token link on the contract row, and Back returning to the originating view — a follow-up issue, not a defect in this PR. script/lint is host prettier --check, not containerized (#152), so the lint evidence is only as good as that entrypoint.
PASS — independently verified on my own clone of head `e53bcb6`: `make check` green, `make test-e2e` 44/44, all four items of https://git.eeqj.de/sneak/AutistMask/issues/188 asserted, and each new assertion re-demonstrated failing here (duplicate `pushCurrentView()` in `showAddTokenView` reds test 6 alone; no-op quick-pick handler reds 7; `tx.contractAddress` guard forced true reds 8 with the `pageerror`; the same guard's else branch left unhidden reds 8 on the hidden-row assertion alone; dropping `navigator.clipboard.writeText` from `attachCopyHandlers()` reds 9), tree restored after each; head contains current `next`, no Claude/Anthropic references, no attribution trailers.
Disclosures: my first e2e run failed tests 38 and 44 in the dApp section, green on the rerun and on all five mutation runs — the known flake of https://git.eeqj.de/sneak/AutistMask/issues/287 and https://git.eeqj.de/sneak/AutistMask/issues/290, not attributable to this change. Outside the four items https://git.eeqj.de/sneak/AutistMask/issues/188 scoped, these definition-of-done items of https://git.eeqj.de/sneak/AutistMask/issues/150 and https://git.eeqj.de/sneak/AutistMask/issues/151 remain unasserted anywhere in the suite after this closes: adding a token by contract address and seeing it in the balance list, opening a token-transfer row from AddressToken, the etherscan token link on the contract row, and Back returning to the originating view — a follow-up issue, not a defect in this PR. `script/lint` is host `prettier --check`, not containerized (https://git.eeqj.de/sneak/AutistMask/issues/152), so the lint evidence is only as good as that entrypoint.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #188.
The suite asserted that the two screens
#150 and
#151 broke now open without
throwing. The four remaining definition-of-done items are asserted here.
Additive: four tests and one fixture flag, no existing test or helper changed.
What is asserted
Back navigation out of Add Token. Against the persisted navigation stack,
read from extension storage, as a delta: the round trip Home -> AddressDetail
-> AddToken -> Back -> Back must leave the stack exactly as it found it, with
["main"]and then["main","address"]on top at the two forward steps. Astale entry is invisible on screen until the user presses Back one time too
many — the second-order damage of #150 — so the stack rather than the visible
view is what gets asserted. Stating it as a delta makes it independent of
whatever depth earlier tests leave behind.
The common-token quick-pick. Clicks the first button and requires
#add-token-addressto hold that button'sdata-address; the field isasserted empty first. The old test counted the buttons rendered.
The native ETH detail path. This needed a fixture: the Blockscout
normal-transactions endpoint answered
{items: []}unconditionally, so therewas no non-ERC-20 row to open at all.
seedNativeTransferserves one 0.25 ETHtransfer (above the default dust threshold, its own hash so
mergeTransactions()does not fold it into the token transfer). The detailscreen must show the native hash, type
Native ETH Transfer, the value, theraw wei quantity, and no token contract row — that row's branch is where a
regression of the non-ERC-20 case lands. The flag is cleared again at the end
of the test, so every later test sees the list it was written against.
Tap-to-copy. Reads the real clipboard back rather than watching the handler
run, after seeding a sentinel so an untouched clipboard cannot pass. Clipboard
permissions are granted context-wide: an origin-scoped grant is refused for
chrome-extension:URLs (Permission can't be granted to opaque origins).Nothing was weakened and no item was dropped. All four are driven from the
Chrome harness; the Firefox suite was not touched.
Each assertion demonstrated failing
One deliberate break at a time, full
make test-e2erun, source reverted aftereach. In every case the pre-existing tests 4 and 5 stayed green, so each
failure is attributable to the new assertion.
src/popup/index.js,showAddTokenViewpushes twice:A screen-only assertion does not see this: the first Back still lands on the
address screen.
src/popup/views/addToken.js, the click handler made a no-op:src/popup/views/transactionDetail.jsremoved, i.e. the ERC-20 branch runningfor a transfer with no contract:
And the same row left visible without throwing, which is what isolates the
hidden-row assertion itself:
attachCopyHandlers()insrc/popup/views/helpers.jskeepsthe flash and drops the
writeText:The flash-only half of the assertion passes against this break; the clipboard
read is what catches it.
Verification
Ran, after rebasing onto
nextat0be20d7(which reworkedgoBack(), so thewhole suite was re-run rather than trusted):
make check— green. 703 tests in 29 suites,test-verify-build18 cases,prettier --checkclean twice (lint and fmt-check).make test-e2e— green, 44/44, with the four new tests at 6-9.make fmt— run, result committed.Not run:
make test-e2e-firefox. This change adds nothing to the Firefoxsuite.
script/linthere isprettier --checkon the host, not containerized;that is the repo's current entrypoint, and ESLint for it is
#152.
PASS — independently verified on my own clone of head
e53bcb6:make checkgreen,make test-e2e44/44, all four items of #188 asserted, and each new assertion re-demonstrated failing here (duplicatepushCurrentView()inshowAddTokenViewreds test 6 alone; no-op quick-pick handler reds 7;tx.contractAddressguard forced true reds 8 with thepageerror; the same guard's else branch left unhidden reds 8 on the hidden-row assertion alone; droppingnavigator.clipboard.writeTextfromattachCopyHandlers()reds 9), tree restored after each; head contains currentnext, no Claude/Anthropic references, no attribution trailers.Disclosures: my first e2e run failed tests 38 and 44 in the dApp section, green on the rerun and on all five mutation runs — the known flake of #287 and #290, not attributable to this change. Outside the four items #188 scoped, these definition-of-done items of #150 and #151 remain unasserted anywhere in the suite after this closes: adding a token by contract address and seeing it in the balance list, opening a token-transfer row from AddressToken, the etherscan token link on the contract row, and Back returning to the originating view — a follow-up issue, not a defect in this PR.
script/lintis hostprettier --check, not containerized (#152), so the lint evidence is only as good as that entrypoint.clawbot referenced this pull request2026-08-17 08:09:34 +02:00
e53bcb655dtod8fcbaac5aclawbot referenced this pull request2026-08-17 08:23:41 +02:00