Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
56 lines
2 KiB
JavaScript
56 lines
2 KiB
JavaScript
const { chromium } = require('@playwright/test');
|
|
const path = require('path');
|
|
const fs = require('fs');
|
|
const http = require('http');
|
|
|
|
const OUTPUT_DIR = 'C:/Users/encep/.gemini/antigravity-cli/brain/3ab7ae82-5634-41d5-93a7-3c12c22503e2/screenshots/ad_services_live';
|
|
|
|
async function captureSettlementLedgerFull() {
|
|
const SITE_DIR = path.resolve(__dirname, '../site/dist');
|
|
const serverSite = http.createServer((req, res) => {
|
|
let filePath = path.join(SITE_DIR, req.url === '/' ? 'launch-readiness.html' : req.url);
|
|
if (!fs.existsSync(filePath)) filePath = path.join(SITE_DIR, 'launch-readiness.html');
|
|
const ext = path.extname(filePath);
|
|
let contentType = 'text/html';
|
|
if (ext === '.js') contentType = 'application/javascript';
|
|
if (ext === '.css') contentType = 'text/css';
|
|
if (ext === '.json') contentType = 'application/json';
|
|
if (ext === '.png') contentType = 'image/png';
|
|
if (ext === '.svg') contentType = 'image/svg+xml';
|
|
res.writeHead(200, { 'Content-Type': contentType });
|
|
res.end(fs.readFileSync(filePath));
|
|
});
|
|
await new Promise((resolve) => serverSite.listen(4895, resolve));
|
|
|
|
const browser = await chromium.launch({ channel: 'msedge', headless: true });
|
|
const context = await browser.newContext({
|
|
viewport: { width: 1440, height: 1200 },
|
|
deviceScaleFactor: 2,
|
|
});
|
|
|
|
const page = await context.newPage();
|
|
await page.goto('http://localhost:4895/launch-readiness.html', { waitUntil: 'networkidle' });
|
|
await page.waitForTimeout(1000);
|
|
|
|
// Switch to Admin Tab
|
|
await page.evaluate(() => {
|
|
if (typeof window.switchTab === 'function') {
|
|
window.switchTab('admin');
|
|
}
|
|
});
|
|
await page.waitForTimeout(1000);
|
|
|
|
await page.screenshot({
|
|
path: path.join(OUTPUT_DIR, '12_admin_settlement_ledger_withholding_tax.png'),
|
|
fullPage: true,
|
|
});
|
|
|
|
await browser.close();
|
|
serverSite.close();
|
|
console.log('--- Full Settlement Ledger Captured! ---');
|
|
}
|
|
|
|
captureSettlementLedgerFull().catch((err) => {
|
|
console.error('Capture error:', err);
|
|
process.exit(1);
|
|
});
|