Implements window.__testHelpers.fillStakeForm() to enable stable E2E testing of the staking form without fragile UI selectors. ## Changes - Add window.__testHelpers interface (dev mode only) - Implement fillStakeForm() in StakeHolder.vue with input validation - Add TypeScript declarations in env.d.ts - Update E2E test to use helper and verify full user journey - Create INTEGRATION_TEST_STATUS.md documenting test coverage - Document helper in web-app/README.md ## Test Coverage Playwright E2E now validates complete flow: - Mint ETH via cheats page UI - Swap KRK via cheats page UI - Stake KRK via stake page UI (helper + click) - Verify position via GraphQL Both Playwright and verify-swap.sh tests now work independently. resolves #62 Co-authored-by: johba <johba@harb.eth> Reviewed-on: https://codeberg.org/johba/harb/pulls/66
14 lines
287 B
TypeScript
14 lines
287 B
TypeScript
/// <reference types="vite/client" />
|
|
|
|
import type { EIP1193Provider } from 'viem';
|
|
|
|
declare global {
|
|
interface Window {
|
|
ethereum?: EIP1193Provider;
|
|
__testHelpers?: {
|
|
fillStakeForm: (params: { amount: number; taxRate: number }) => Promise<void>;
|
|
};
|
|
}
|
|
}
|
|
|
|
export {};
|