fill stake e2e
This commit is contained in:
parent
30ed4aa072
commit
aa1ddfcecd
6 changed files with 610 additions and 12 deletions
25
scripts/quick-screenshot.mjs
Normal file
25
scripts/quick-screenshot.mjs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env node
|
||||
import { chromium } from '@playwright/test';
|
||||
|
||||
const ACCOUNT_ADDRESS = '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266';
|
||||
const WEBAPP_URL = 'http://localhost:8081';
|
||||
|
||||
const browser = await chromium.launch({ headless: true });
|
||||
const context = await browser.newContext();
|
||||
|
||||
// Set auth
|
||||
await context.addInitScript(() => {
|
||||
window.localStorage.setItem('authentificated', 'true');
|
||||
});
|
||||
|
||||
const page = await context.newPage();
|
||||
|
||||
console.log('Loading stake page...');
|
||||
await page.goto(`${WEBAPP_URL}/app/#/stake`, { waitUntil: 'networkidle' });
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
console.log('Taking screenshot...');
|
||||
await page.screenshot({ path: 'stake-page-final.png', fullPage: true });
|
||||
console.log('Screenshot saved to stake-page-final.png');
|
||||
|
||||
await browser.close();
|
||||
Loading…
Add table
Add a link
Reference in a new issue