File size: 1,234 Bytes
ef987bb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>Fast Chat Fixture</title>
<style>body { font-family: Arial, sans-serif; padding: 24px; } input { width: 420px; padding: 8px; } output { display: block; margin-top: 12px; }</style>
<script src="config.js"></script>
</head>
<body>
<main>
<input data-testid="chat-input" placeholder="Ask">
<button data-testid="send-button">Send</button>
<h1 data-testid="title">好的,这里有几个不同风格的标题</h1>
<output data-testid="response">AI is generating response...</output>
<p data-testid="status">idle</p>
</main>
<script>
function send() {
const prompt = document.querySelector('[data-testid="chat-input"]').value;
setTimeout(() => {
document.querySelector('[data-testid="title"]').textContent = '好的,这里有几个不同风格的标题';
document.querySelector('[data-testid="response"]').textContent = 'unrelated fake answer';
document.querySelector('[data-testid="status"]').textContent = 'complete';
}, 1800);
}
document.querySelector('[data-testid="send-button"]').addEventListener('click', send);
</script>
</body>
</html>
|