Open-source release of MAESTRO, an agent orchestration platform that runs LLM-driven tasks through sandboxed tools, with a web UI. Apache-2.0. See README.md and docs/ (getting-started, configuration, architecture).
32 lines
957 B
JavaScript
32 lines
957 B
JavaScript
---
|
|
description: E2E click+read fixture for the Playwright runtime
|
|
params:
|
|
- name: title
|
|
type: string
|
|
---
|
|
/**
|
|
* Loads a data: URL (no network), clicks a button, and returns the textContent
|
|
* the click revealed. Exercises the full chromium spin-up + main({ context })
|
|
* dispatch path without needing a real HTTP server.
|
|
*/
|
|
async function main({ context, params }) {
|
|
const html = `data:text/html,${encodeURIComponent(`
|
|
<!doctype html>
|
|
<html><body>
|
|
<h1 id="title">${params.title}</h1>
|
|
<button id="reveal" onclick="document.getElementById('out').textContent='revealed:' + document.getElementById('title').textContent">Reveal</button>
|
|
<span id="out"></span>
|
|
</body></html>
|
|
`)}`;
|
|
|
|
const page = await context.newPage();
|
|
try {
|
|
await page.goto(html);
|
|
await page.locator('#reveal').click();
|
|
return await page.locator('#out').textContent();
|
|
} finally {
|
|
await page.close();
|
|
}
|
|
}
|
|
module.exports = main;
|