Run against a local dev node, both specs failed for reasons in the specs
themselves:
- CreateAccount looked for an "Add account" button that is now "Account",
and that button only shows when accounts can be stored, which the spec
never turned on. The page has to be wrapped in KeyringCtxRoot and start
on its route. The button is awaited for up to 20s: the page draws once
the api and keyring are ready, which takes longer than the 1s default
on a busy machine.
- Bounties started outside its route and used a fixed title, so a node
that already held a bounty from an earlier run had two matches.
- Neither closed its connections, so the test process never exited.
Both stay skipped until the nightly run starts a dev node.
The account, address, sidebar and bounties specs replaced hooks with
jest.mock, which the node:test runner does not have, so all five failed
to load and were excluded from yarn test. They now register mocks with
mock.module from node:test and import the page under test afterwards,
since Node only swaps a module that has not been loaded yet.
- test-support/mocks: mockPageHooks() replaces the hooks a Page reads.
An ES module mock replaces every export, so each mock lists them all
(useBestNumber's useBestNumberRelay included). The real useAccountInfo
is wrapped, typed now, with the fixture identity merged in a typed
helper.
- The page-specific mocks live with their page: useMultisigApprovals in
page-accounts/test, useAddresses in page-addresses/test.
- jest-dom matchers were never registered for this runner; specs and
page elements use assertHasClass, assertTextContent and assertVisible
from test-support, with the same meaning.
- Page's mock api gains apiIdentity, which useAccountInfo reads.
- The bounties voting tooltip renders hidden and fades in, so the spec
waits for it to become visible.
- jest/expect-expect counts the assert* helpers as assertions; the
disable comments that only existed for that are removed.
Create and Bounties run green. Accounts, Addresses and Sidebar load and
stay skipped as upstream left them (their FIXMEs are about the reworked
tables). Needs @pezkuwi/dev 0.86.6 for the module mocks flag and the
fuller browser env.
- The static metadata in @pezkuwi/types-support predates the rename and
only knows Pallet* names, while the app (and the test-support creation
helpers) use PezpalletBountiesBountyStatus, PezpalletAllianceCid, ...
createAugmentedApi now also registers the @pezkuwi/types-augment
lookup definitions, and createLookupRegistry gives specs a plain
registry that knows them.
- calculateBountyBond: the description had been rewritten from
"Kusama" (24 bytes) to "Dicle" (23 bytes) with the expected bond left
for 24; now "Pezkuwi network UI Bounty" (25 bytes) and its value.
- page-alliance had no tsconfig.spec.json, so its spec was never
type-checked; added, and specs are excluded from its build config.
- dev ^0.86.4 at the root and in packages/apps; directives renamed by
pezkuwi-dev-migrate-eslint10.
- eslint --fix with the 0.86.4 config; one fix broke syntax
(typescript-eslint prefer-optional-chain turned
`(isStarted && onStart) && onStart()` into `(isStarted && onStart?.();`
in TxButton) and is corrected by hand.
- The remaining findings fixed rather than disabled: optional chains
(each suggestion reviewed), `cause` on rethrown errors, `if` instead of
`a && promise` in effects, parallel instead of sequential awaits in
Promise.all, Error rejections, no `delete` on arrays (the storage query
cache is a Map; an upload's file list no longer keeps a hole), no
`[object Object]` stringification (TFunction's second argument is text
or options), dead code removed (referenda's never-shown expand button,
react-query's unused CoreDescriptor).
Only the Electron renderer ever set isElectron to true; the web entry passed
false. With that package gone the flag is constant, so remove it from
ApiCtxRoot, the context types and its consumers, together with the
pezkuwi.js.org link base it selected. In-browser account storage and the
WebUSB ledger option now follow the settings alone, as they already did on
the web.
Runtime environment detection (getEnvironment, ExternalWarning) reads the
user agent and is left as is.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Update @pezkuwi/extension-inject to ^0.62.13 with proper /types exports
- Update @pezkuwi/extension-dapp to ^0.62.13
- Update @pezkuwi/extension-compat-metamask to ^0.62.13
- Fix IconTheme type to include 'bizinikiwi' and 'pezkuwi' themes
- Fix endpoint array issues (getTeleports -> direct array references)
- Add type assertions for external package compatibility (acala, moonbeam, parallel)
- Fix subspace.ts dynamic class typing
- Fix conviction type in page-referenda
- Update Pallet type names to Pezpallet prefix across codebase
- Define InjectedExtension types locally for module resolution
- Add styled-components DefaultTheme augmentation
- Add react-copy-to-clipboard type declaration for React 18
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>