Regression-test the full DAO/governance/work-market surface across the live
orgs, read-only (no txs/writes/signing), asserting REAL functionality:
- 30-dao-onchain: BountyV1/ReputationV1/Governor/Safe on Zoo 200200 + Pars
494949 via eth_call/eth_getCode — code present, bountyCount>=1, stateOf(0)==
Paid(6), treasury()==org DAO Safe, ReputationV1.writer()==BountyV1 (wiring).
Lux 96369: canonical CREATE2 Safe suite present, dead Governor asserted 0-byte
(staged post-flag-day). Hanzo 36963 skip-gated until deploy lands.
- 31-vote-surfaces: lux/zoo/hanzo/pars.vote render + correct brand + ZERO cross-
brand/competitor leakage + no white-screen (#root descendants + body text) +
Connect Wallet present. reads-chain gated skip-until-live (Decent-fork shells).
- 32-work-boards: work.zoo.network LIVE badge (green, not FIXTURE), bounty in
Paid column, on-chain ReputationV1 block, UI bounty count == chain bountyCount.
work.{lux,hanzo,pars} skip-until-live.
- 33-bounty-bot: bounties.zoo.network webhook routed+POST-only (405), unsigned
POST rejected (401), healthz internal-scoped (404 public correct). No secrets.
- 34-pars-chain: Pars 494949 chainId + monotonic height + explorer renders.
helpers.ts: additive ethCall/ethGetCode/hasCode/decodeAddress/encodeUint +
HANZO/PARS API domains + orgRpc() (one way to resolve any org's C-Chain RPC).
17-governance: drop dead unused SELECTORS block (on-chain contract asserts now
own their home in 30-dao-onchain). package.json: wire specs into test:full +
per-spec scripts.
36 active tests pass live, 8 skip-gated (ready to flip). Suite stays GREEN.
Co-authored-by: Hanzo Dev <[email protected]>
51 lines
2.3 KiB
TypeScript
51 lines
2.3 KiB
TypeScript
import { test, expect } from '@playwright/test'
|
|
import {
|
|
getUrls, CHAIN_IDS, orgRpc,
|
|
ethChainId, ethBlockNumber,
|
|
} from './helpers'
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Pars chain (494949) — sovereign L1 liveness + explorer
|
|
// ---------------------------------------------------------------------------
|
|
// Pars runs its own primary network. Assert its public C-Chain RPC identifies as
|
|
// 494949, serves a consistent height, and its explorer renders as Pars.
|
|
|
|
const urls = getUrls()
|
|
const rpc = orgRpc('pars', 'mainnet')
|
|
|
|
test.describe('Pars Chain — C-Chain RPC (494949)', () => {
|
|
test('eth_chainId == 494949 (0x78d65)', async ({ request }) => {
|
|
const cid = await ethChainId(request, rpc)
|
|
console.log(` Pars chainId: ${cid} (0x${cid.toString(16)})`)
|
|
expect(cid).toBe(CHAIN_IDS.mainnet.pars)
|
|
})
|
|
|
|
test('eth_blockNumber serves a consistent height (monotonic non-decreasing)', async ({ request }) => {
|
|
const b0 = await ethBlockNumber(request, rpc)
|
|
await new Promise(r => setTimeout(r, 3000))
|
|
const b1 = await ethBlockNumber(request, rpc)
|
|
console.log(` Pars blocks: ${b0} -> ${b1}`)
|
|
// Pars is a single-node, demand-driven L1: it produces blocks on transaction
|
|
// demand, so an idle chain returns the same height twice. Assert the height is
|
|
// real (>0) and never regresses — a decrease would signal a re-org/rollback.
|
|
expect(b0).toBeGreaterThan(0)
|
|
expect(b1).toBeGreaterThanOrEqual(b0)
|
|
})
|
|
})
|
|
|
|
test.describe('Pars Chain — Explorer (explore-pars)', () => {
|
|
test('explorer renders as Pars', async ({ page }) => {
|
|
const res = await page.goto(urls.explorePars, { waitUntil: 'domcontentloaded', timeout: 45_000 })
|
|
await page.waitForTimeout(4000)
|
|
const rootKids = await page.evaluate(() => {
|
|
const r = document.getElementById('root') || document.getElementById('app') || document.getElementById('__next')
|
|
return r ? r.querySelectorAll('*').length : -1
|
|
})
|
|
const bodyText = (await page.evaluate(() => document.body.innerText || '')).replace(/\s+/g, ' ').trim()
|
|
console.log(` explore-pars: HTTP ${res?.status()} · #root kids=${rootKids} · bodyLen=${bodyText.length}`)
|
|
expect(res?.status()).toBe(200)
|
|
expect(rootKids).toBeGreaterThan(20)
|
|
expect(bodyText).toMatch(/\bPars\b/i)
|
|
})
|
|
})
|