MCPcopy Index your code
hub / github.com/callstack/agent-device / fixtureHtml

Function fixtureHtml

test/integration/smoke-web-platform.test.ts:401–453  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

399}
400
401function fixtureHtml(): string {
402 return `<!doctype html>
403<html lang="en">
404 <head>
405 <meta charset="utf-8" />
406 <title>Agent Device Web Smoke</title>
407 <style>
408 body {
409 font-family: system-ui, sans-serif;
410 margin: 32px;
411 }
412 main {
413 max-width: 420px;
414 }
415 label,
416 button,
417 input {
418 display: block;
419 font: inherit;
420 margin-block: 12px;
421 }
422 input,
423 button {
424 min-height: 40px;
425 min-width: 220px;
426 }
427 </style>
428 </head>
429 <body>
430 <main>
431 <h1>Agent Device Web Smoke</h1>
432 <button id="ready" type="button">Ready marker</button>
433 <label for="email">Email</label>
434 <input id="email" name="email" aria-label="Email" autocomplete="off" />
435 <button id="submit" type="button">Submit order</button>
436 <p id="status" role="status" aria-live="polite">Idle</p>
437 </main>
438 <script>
439 const email = document.querySelector('#email');
440 const status = document.querySelector('#status');
441 const submit = document.querySelector('#submit');
442 submit.addEventListener('click', () => {
443 submit.textContent = 'Submitted';
444 status.textContent = 'Clicked submit';
445 });
446 email.addEventListener('input', () => {
447 email.setAttribute('aria-label', 'Email ' + email.value);
448 status.textContent = 'Email: ' + email.value;
449 });
450 </script>
451 </body>
452</html>`;
453}

Callers 1

startFixtureServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected