mirror of
https://github.com/luxdao/app.git
synced 2026-10-30 18:14:05 +00:00
The estate has two shapes of the same instrument: vLUX, deployed on 96369, which is Curve-style with no delegation, and the generic vote-escrow votes token being written into luxfi/standard, which adds IVotes on a timestamp clock. `read/ve` states what an escrow has to answer and binds the first; binding the second is an entry in `abi.ts`, a slot in `chain.ts` and an object of that shape, and nothing on the screen changes. The escrow was also read in `read/power`, against the same contract under a second set of names for the same values. One reading now, so the two cannot drift. `ends()` rounds a lock end UP. `createLock` floors it to a week and then requires the floored end to still clear now + MIN_LOCK_TIME, so the shortest lock the contract advertises, asked for exactly, reverts on six days of every seven. The weight the contract reports is drawn beside the weight the decay line predicts, because a reader shown only one of them cannot tell whether the decay is running. Co-authored-by: Hanzo Dev <[email protected]>
45 lines
1.6 KiB
TypeScript
45 lines
1.6 KiB
TypeScript
/**
|
|
* Every screen this interface serves.
|
|
*
|
|
* One list, imported by each suite, so a screen added without being measured is
|
|
* not possible — the suites cannot drift apart because there is only one.
|
|
*/
|
|
export const SCREENS = [
|
|
'/',
|
|
'/proposals',
|
|
'/proposals/new',
|
|
// A proposal id that is not on the register. The screen has to say so rather
|
|
// than throw, and it is the only route here that reads a path parameter.
|
|
'/proposals/0',
|
|
'/delegate',
|
|
'/stake',
|
|
'/treasury',
|
|
'/work',
|
|
'/roles',
|
|
'/karma',
|
|
'/gauges',
|
|
// The survey reaches four chains rather than one, so it is the slowest screen
|
|
// and the one most likely to be measured mid-read.
|
|
'/deployment',
|
|
'/settings',
|
|
// A link nobody wrote, which still has to name itself.
|
|
'/nothing-here',
|
|
] as const
|
|
|
|
/**
|
|
* Wait until the screen itself is on the page.
|
|
*
|
|
* Every route is lazy, so `#root` has children — the shell, the nav, a
|
|
* "Loading…" fallback — a beat before the screen mounts. A check that runs at
|
|
* that moment measures the fallback and passes, which is how a suite comes to
|
|
* cover the shell thirteen times and no screen at all. Found by a negative
|
|
* control: a utility class deliberately added to a route did not fail the
|
|
* class check, because the route had not rendered when the check ran.
|
|
*
|
|
* The level-one heading is the marker because only a screen draws one.
|
|
*/
|
|
export async function ready(page: import('@playwright/test').Page) {
|
|
await page.locator('#root > *').first().waitFor({ state: 'visible' })
|
|
await page.locator('h1').first().waitFor({ state: 'visible', timeout: 45_000 })
|
|
}
|